libimobiledevice  1.3.0
API Documentation - Return to Homepage
Data Structures | Typedefs | Enumerations | Functions
libimobiledevice.h File Reference

Description

Device/Connection handling and communication.

Data Structures

struct  idevice_event_t
 Provides information about the occurred event. More...
 

Typedefs

typedef idevice_private * idevice_t
 The device handle.
 
typedef idevice_connection_private * idevice_connection_t
 The connection handle.
 
typedef void(* idevice_event_cb_t) (const idevice_event_t *event, void *user_data)
 Callback to notifiy if a device was added or removed.
 
typedef struct idevice_subscription_context * idevice_subscription_context_t
 Event subscription context type.
 

Enumerations

enum  idevice_error_t {
  IDEVICE_E_SUCCESS = 0 ,
  IDEVICE_E_INVALID_ARG = -1 ,
  IDEVICE_E_UNKNOWN_ERROR = -2 ,
  IDEVICE_E_NO_DEVICE = -3 ,
  IDEVICE_E_NOT_ENOUGH_DATA = -4 ,
  IDEVICE_E_CONNREFUSED = -5 ,
  IDEVICE_E_SSL_ERROR = -6 ,
  IDEVICE_E_TIMEOUT = -7
}
 Error Codes.
 
enum  idevice_options {
  IDEVICE_LOOKUP_USBMUX = 1 << 1 ,
  IDEVICE_LOOKUP_NETWORK = 1 << 2 ,
  IDEVICE_LOOKUP_PREFER_NETWORK = 1 << 3
}
 Options for idevice_new_with_options() More...
 
enum  idevice_connection_type {
  CONNECTION_USBMUXD = 1 ,
  CONNECTION_NETWORK
}
 Type of connection a device is available on. More...
 
enum  idevice_event_type {
  IDEVICE_DEVICE_ADD = 1 ,
  IDEVICE_DEVICE_REMOVE ,
  IDEVICE_DEVICE_PAIRED
}
 The event type for device add or removal. More...
 

Functions

void idevice_set_debug_level (int level)
 Set the level of debugging.
 
idevice_error_t idevice_events_subscribe (idevice_subscription_context_t *context, idevice_event_cb_t callback, void *user_data)
 Subscribe a callback function that will be called when device add/remove events occur.
 
idevice_error_t idevice_events_unsubscribe (idevice_subscription_context_t context)
 Unsubscribe the event callback function that has been registered with idevice_events_subscribe().
 
idevice_error_t idevice_event_subscribe (idevice_event_cb_t callback, void *user_data)
 (DEPRECATED) Register a callback function that will be called when device add/remove events occur.
 
idevice_error_t idevice_event_unsubscribe (void)
 (DEPRECATED) Release the event callback function that has been registered with idevice_event_subscribe().
 
idevice_error_t idevice_get_device_list (char ***devices, int *count)
 Get a list of UDIDs of currently available devices (USBMUX devices only).
 
idevice_error_t idevice_device_list_free (char **devices)
 Free a list of device UDIDs.
 
idevice_error_t idevice_get_device_list_extended (idevice_info_t **devices, int *count)
 Get a list of currently available devices.
 
idevice_error_t idevice_device_list_extended_free (idevice_info_t *devices)
 Free an extended device list retrieved through idevice_get_device_list_extended().
 
idevice_error_t idevice_new (idevice_t *device, const char *udid)
 Creates an idevice_t structure for the device specified by UDID, if the device is available (USBMUX devices only).
 
idevice_error_t idevice_new_with_options (idevice_t *device, const char *udid, enum idevice_options options)
 Creates an idevice_t structure for the device specified by UDID, if the device is available, with the given lookup options.
 
idevice_error_t idevice_free (idevice_t device)
 Cleans up an idevice structure, then frees the structure itself.
 
idevice_error_t idevice_connect (idevice_t device, uint16_t port, idevice_connection_t *connection)
 Set up a connection to the given device.
 
idevice_error_t idevice_disconnect (idevice_connection_t connection)
 Disconnect from the device and clean up the connection structure.
 
idevice_error_t idevice_connection_send (idevice_connection_t connection, const char *data, uint32_t len, uint32_t *sent_bytes)
 Send data to a device via the given connection.
 
idevice_error_t idevice_connection_receive_timeout (idevice_connection_t connection, char *data, uint32_t len, uint32_t *recv_bytes, unsigned int timeout)
 Receive data from a device via the given connection.
 
idevice_error_t idevice_connection_receive (idevice_connection_t connection, char *data, uint32_t len, uint32_t *recv_bytes)
 Receive data from a device via the given connection.
 
idevice_error_t idevice_connection_enable_ssl (idevice_connection_t connection)
 Enables SSL for the given connection.
 
idevice_error_t idevice_connection_disable_ssl (idevice_connection_t connection)
 Disable SSL for the given connection.
 
idevice_error_t idevice_connection_disable_bypass_ssl (idevice_connection_t connection, uint8_t sslBypass)
 Disable bypass SSL for the given connection without sending out terminate messages.
 
idevice_error_t idevice_connection_get_fd (idevice_connection_t connection, int *fd)
 Get the underlying file descriptor for a connection.
 
idevice_error_t idevice_get_handle (idevice_t device, uint32_t *handle)
 Gets the handle or (USBMUX device id) of the device.
 
idevice_error_t idevice_get_udid (idevice_t device, char **udid)
 Gets the Unique Device ID for the device.
 
const char * libimobiledevice_version ()
 Returns a static string of the libimobiledevice version.