summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2010-01-09use new plist helper functionsGravatar Nikias Bassen1-128/+27
2010-01-09use new plist helper functionsGravatar Nikias Bassen1-108/+54
2010-01-09use new plist helper functionsGravatar Nikias Bassen1-79/+19
2010-01-09Added plist communication helper functionsGravatar Nikias Bassen2-0/+294
2010-01-08Detect pairing failure for device having a password setGravatar Martin Szulecki1-2/+16
[#101 state:resolved] The first pairing fails if a user has a password set on the device.
2010-01-08Implement lockdown activate and deactiveGravatar Martin Szulecki1-0/+88
Passing the right activiation record allows activating a phone using this functionality.
2010-01-08Implement lockdown unpair requestGravatar Martin Szulecki1-2/+23
2010-01-08Enforce a set of notifications for observing instead of using defaultsGravatar Martin Szulecki2-17/+2
We don't need to maintain defaults, applications should know and specifiy which notification ids they want to observe themselfs.
2010-01-08Add userpref helper to allow removal of the stored device public keyGravatar Martin Szulecki2-0/+25
2010-01-08Lowercase HostID parameter like everywhere elseGravatar Martin Szulecki2-8/+8
2010-01-08Add more known notification ids for notification_proxyGravatar Martin Szulecki1-15/+0
2010-01-08Allow set the label of a lockdown request, usually set to the program nameGravatar Martin Szulecki2-1/+46
2010-01-04Add options to instproxy_archive functionGravatar Nikias Bassen1-1/+16
This change allows to specify the following options: INSTPROXY_ARCHIVE_APP_ONLY - Archive only the application data INSTPROXY_ARCHIVE_SKIP_UNINSTALL - Do not uninstall the application. Combine these options with logical OR to specify both. These two options combined are used by iTunes to create app archives of on-device downloaded apps that are later copied as *.ipa files to the computer. [#104 state:resolved] Signed-off-by: Matt Colyer <matt@colyer.name>
2010-01-04New installation_proxy interface.Gravatar Nikias Bassen3-0/+844
Allows enumeration, install, uninstall, upgrade, and some other stuff with apps.
2009-12-15Support for new SBServices interfaceGravatar Nikias Bassen3-0/+325
This lockdown service has been introduced in firmware 3.1 and allows to re-arrange the Spr*ngboard icons from the computer. [#99 state:resolved] Signed-off-by: Matt Colyer <matt@colyer.name>
2009-12-11Documentation cleanup and a new error codeGravatar Nikias Bassen1-10/+29
[#96 state:resolved] Signed-off-by: Matt Colyer <matt@colyer.name>
2009-12-07New function lockdownd_validate_pair()Gravatar Nikias Bassen1-7/+40
This function allows the current host (or the host specified by the given HostID to become the trusted host of the device. [#89 state:resolved] Signed-off-by: Matt Colyer <matt@colyer.name>
2009-12-07Allow passing NULL as HostID to lockdownd_pair()Gravatar Nikias Bassen1-1/+11
When NULL is given as HostID, lockdownd_pair() will use the HostID available from userprefs.
2009-12-07cache device uuid in client structGravatar Nikias Bassen2-26/+26
When accessing/storing key info with userprefs, a device uuid is required that makes it possible to distinguish between different devices. On execution of lockdownd_client_new, the uuid is queried via lockdown and now stored in the client struct for later reuse. This patch also removes the uuid parameter from lockdownd_pair().
2009-12-07fix lockdownd_pair returning success on errorGravatar Nikias Bassen1-3/+2
This fixes a bug where lockdown_check_result() might return -1 and lockdownd_pair() still returns success. Thanks to dborca for spotting this.
2009-12-07better handling of session_idGravatar Nikias Bassen2-22/+27
This will change session_id out of the lockdownd_client_int struct to a pointer instead of using a buffer of fixed size. The session_id is allocated anyway by libplist when reading it from the plist received from the device, so why don't just use it? [#94 state:resolved] Signed-off-by: Matt Colyer <matt@colyer.name>
2009-12-07fix signature of lockdownd_stop_sessionGravatar Nikias Bassen1-3/+3
This removes the session_id parameter from lockdownd_stop_session because the session_id is stored in the lockdownd_client_int structure anyway.
2009-11-30Evaluate EnableSessionSSL key on session startupGravatar Nikias Bassen1-2/+18
This is required if the device does not send the EnableSessionSSL:true key-value pair in the answer to the StartSession request. [#92 state:resolved] Signed-off-by: Matt Colyer <matt@colyer.name>
2009-11-30afc_truncate: use uint64_t instead of off_tGravatar Nikias Bassen1-1/+1
This makes afc_truncate look more like afc_file_truncate which is also using uint64_t for the file size. [#82 state:resolved] Signed-off-by: Matt Colyer <matt@colyer.name>
2009-11-30uint32_t type fixes for afc_file_read/afc_file_writeGravatar Nikias Bassen1-108/+122
This patch also adapts all corresponding internal functions. The buffer lengths are now consistently handled as uint32_t.
2009-11-30added endian safety to AFCGravatar Nikias Bassen2-15/+31
This should make libiphone compatible with big endian machines. [#85 state:resolved] Signed-off-by: Matt Colyer <matt@colyer.name>
2009-11-25Fix linking on MandrivaGravatar Christophe Fergeau1-1/+1
2009-11-19set ssl_certificate to NULL in lockdownd_client_newGravatar Nikias Bassen1-0/+1
[#87 state:resolved]
2009-11-17simplify gnutls_session_t useGravatar Christophe Fergeau2-20/+19
gnutls_session_t is already a pointer, we don't need to manipulate a gnutls_session_t* [#87 state:resolved] Signed-off-by: Matt Colyer <matt@colyer.name>
2009-11-17don't leak memory allocated for gnutls credentialsGravatar Christophe Fergeau2-6/+7
2009-11-11Finish migration to latest plist API.Gravatar Jonathan Beck3-72/+53
[#77 state:resolved] Signed-off-by: Matt Colyer <matt@colyer.name>
2009-11-10hide symbols that should not get exportedGravatar Nikias Bassen2-10/+13
2009-11-05afc_dispatch_packet optimization: remove additional bufferGravatar Nikias Bassen1-20/+29
This patch removes the additional buffer that was used inside afc_dispatch_packet. So instead of 'alloc, copy header, copy data, send, free' it will now simply do 'send header, send data'. This should reduce cpu usage.
2009-11-05MAXIMUM_PACKET_SIZE should be staticGravatar Christophe Fergeau1-1/+1
2009-11-05make sure 'length' is >=0 in afc_file_readGravatar Christophe Fergeau1-1/+1
trying to read a negative amount of data doesn't make much sense, and the returned 'bytes' value will overflow if we try to do that. Just treat negative length values as an invalid argument. An alternative way of handling it would be to silently return OK/0 bytes read.
2009-11-05make sure 'length' is >=0 in afc_file_writeGravatar Christophe Fergeau1-1/+1
trying to write a negative amount of data doesn't make much sense, and bad things will happen if we try to do that. Just treat negative length values as an invalid argument. An alternative way of handling it would be to silently return OK/0 bytes written.
2009-11-02AFC: new function afc_set_file_timeGravatar Nikias Bassen2-1/+45
This function allows to set the modification time of a file. The time value needs to be specified as nanoseconds since epoch. [#81 state:resolved] Signed-off-by: Matt Colyer <matt@colyer.name>
2009-10-13Update to latest libplist API.Gravatar Jonathan Beck3-69/+38
Signed-off-by: Matt Colyer <matt@colyer.name> [#77 state:resolved]
2009-09-12Use correct usbmuxd function to free device listGravatar Martin Szulecki1-1/+1
2009-09-12Rename iphone_free_device_list to follow overall naming styleGravatar Martin Szulecki1-1/+1
2009-09-12Fix iphone_device_recv making receive operational againGravatar Martin Szulecki1-0/+3
2009-09-12Public API rework, extension and adaption to latest libusbmuxd-1.0 API.Gravatar Nikias Bassen12-136/+383
2009-09-12Update the afc_get_device_info helper to return an afc_error_tGravatar Martin Szulecki1-11/+17
We should return any underlying error afc_get_device_info returns so one is able to act properly. Also renamed it to "key" instead of "field" to be more generic.
2009-08-04Invalid check for host_id in userpref_get_host_idGravatar Nikias Bassen1-1/+1
On a system without a previous pairing, libiphone fails to connect to the device: userpref_get_host_id: Using (null) as HostID The code checks if host_id is NULL but it needs to check if *host_id is NULL, otherwise it won't generate a new HostID. [#69 state:resolved] Signed-off-by: Matt Colyer <matt@colyer.name>
2009-08-03Add afc_get_device_info_field() helper functionGravatar Bastien Nocera1-0/+29
For use in front-end applications, also serves to document the available keys.
2009-08-03Avoid invalid memory accesses in lockdownd_client_new()Gravatar Bastien Nocera1-1/+1
Valgrind complains: ==2678== Conditional jump or move depends on uninitialised value(s) ==2678== at 0x3ACD40646C: lockdownd_client_new (lockdown.c:662) ==2678== by 0x405BA6: g_vfs_afc_volume_new (afc-volume.c:113) ==2678== by 0x406541: g_vfs_afc_monitor_device_added (afc-volume-monitor.c:46) ==2678== by 0x4066B1: g_vfs_afc_volume_monitor_constructor (afc-volume-monitor.c:173) ==2678== by 0x3A7FE11A38: g_object_newv (in /lib64/libgobject-2.0.so.0.2000.4) ==2678== by 0x3A7FE12584: g_object_new_valist (in /lib64/libgobject-2.0.so.0.2000.4) ==2678== by 0x3A7FE126DB: g_object_new (in /lib64/libgobject-2.0.so.0.2000.4) ==2678== by 0x408AD5: monitor_try_create (gvfsproxyvolumemonitordaemon.c:1651) ==2678== by 0x408C20: g_vfs_proxy_volume_monitor_daemon_main (gvfsproxyvolumemonitordaemon.c:1694) ==2678== by 0x37E881EA2C: (below main) (in /lib64/libc-2.10.1.so) ==2678== Uninitialised value was created by a stack allocation ==2678== at 0x405B00: g_vfs_afc_volume_new (afc-volume.c:138)
2009-07-29Add handling of afc_remove_path's unknown error code which is an ENOTEMPTYGravatar Martin Szulecki1-0/+4
2009-07-28Fix potential memory corruption in calls to gnutls function on 64 bit archGravatar Nikias Bassen2-15/+25
[#60 state:resolved] Signed-off-by: Matt Colyer <matt@colyer.name>
2009-07-26Merge commit 'martin-s/martin'Gravatar Matt Colyer14-835/+811
[#46 state:resolved]
2009-07-26fix most -Wall warningsGravatar Christophe Fergeau2-1/+2
add missing includes, add some casts to avoid format warnings, mark one function as static. There are still warnings about unused argc/argv [#61 state:resolved] Signed-off-by: Matt Colyer <matt@colyer.name>