libimobiledevice/mobilesync.h File Reference

MobileSync Implementation. More...

Typedefs

typedef int16_t mobilesync_error_t
 Represents an error code.
typedef mobilesync_client_privatemobilesync_client_t
 The client handle.

Functions

mobilesync_error_t mobilesync_client_new (idevice_t device, uint16_t port, mobilesync_client_t *client)
 Connects to the mobilesync service on the specified device.
mobilesync_error_t mobilesync_client_free (mobilesync_client_t client)
 Disconnects a mobilesync client from the device and frees up the mobilesync client data.
mobilesync_error_t mobilesync_receive (mobilesync_client_t client, plist_t *plist)
 Polls the device for mobilesync data.
mobilesync_error_t mobilesync_send (mobilesync_client_t client, plist_t plist)
 Sends mobilesync data to the device.

Error Codes



#define MOBILESYNC_E_SUCCESS   0
#define MOBILESYNC_E_INVALID_ARG   -1
#define MOBILESYNC_E_PLIST_ERROR   -2
#define MOBILESYNC_E_MUX_ERROR   -3
#define MOBILESYNC_E_BAD_VERSION   -4
#define MOBILESYNC_E_UNKNOWN_ERROR   -256

Detailed Description

MobileSync Implementation.


Typedef Documentation

typedef int16_t mobilesync_error_t

Represents an error code.


Function Documentation

mobilesync_error_t mobilesync_client_free ( mobilesync_client_t  client  ) 

Disconnects a mobilesync client from the device and frees up the mobilesync client data.

Parameters:
client The mobilesync client to disconnect and free.
Returns:
MOBILESYNC_E_SUCCESS on success, or MOBILESYNC_E_INVALID_ARG if client is NULL.
mobilesync_error_t mobilesync_client_new ( idevice_t  device,
uint16_t  port,
mobilesync_client_t client 
)

Connects to the mobilesync service on the specified device.

Parameters:
device The device to connect to.
port Destination port (usually given by lockdownd_start_service).
client Pointer that will be set to a newly allocated mobilesync_client_t upon successful return.
Returns:
MOBILESYNC_E_SUCCESS on success, MOBILESYNC_E_INVALID ARG if one or more parameters are invalid, or DEVICE_LINK_SERVICE_E_BAD_VERSION if the mobilesync version on the device is newer.
mobilesync_error_t mobilesync_receive ( mobilesync_client_t  client,
plist_t *  plist 
)

Polls the device for mobilesync data.

Parameters:
client The mobilesync client
plist A pointer to the location where the plist should be stored
Returns:
an error code
mobilesync_error_t mobilesync_send ( mobilesync_client_t  client,
plist_t  plist 
)

Sends mobilesync data to the device.

Note:
This function is low-level and should only be used if you need to send a new type of message.
Parameters:
client The mobilesync client
plist The location of the plist to send
Returns:
an error code
Generated on Mon Oct 4 16:38:48 2010 for libimobiledevice by  doxygen 1.6.3