diff options
Diffstat (limited to 'include/libimobiledevice/libimobiledevice.h')
-rw-r--r-- | include/libimobiledevice/libimobiledevice.h | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/include/libimobiledevice/libimobiledevice.h b/include/libimobiledevice/libimobiledevice.h index 40edd71..c3b87cd 100644 --- a/include/libimobiledevice/libimobiledevice.h +++ b/include/libimobiledevice/libimobiledevice.h | |||
@@ -47,10 +47,10 @@ typedef enum { | |||
47 | IDEVICE_E_TIMEOUT = -7 | 47 | IDEVICE_E_TIMEOUT = -7 |
48 | } idevice_error_t; | 48 | } idevice_error_t; |
49 | 49 | ||
50 | typedef struct idevice_private idevice_private; | 50 | typedef struct idevice_private idevice_private; /**< \private */ |
51 | typedef idevice_private *idevice_t; /**< The device handle. */ | 51 | typedef idevice_private *idevice_t; /**< The device handle. */ |
52 | 52 | ||
53 | typedef struct idevice_connection_private idevice_connection_private; | 53 | typedef struct idevice_connection_private idevice_connection_private; /**< \private */ |
54 | typedef idevice_connection_private *idevice_connection_t; /**< The connection handle. */ | 54 | typedef idevice_connection_private *idevice_connection_t; /**< The connection handle. */ |
55 | 55 | ||
56 | /** Options for idevice_new_with_options() */ | 56 | /** Options for idevice_new_with_options() */ |
@@ -62,23 +62,24 @@ enum idevice_options { | |||
62 | 62 | ||
63 | /** Type of connection a device is available on */ | 63 | /** Type of connection a device is available on */ |
64 | enum idevice_connection_type { | 64 | enum idevice_connection_type { |
65 | CONNECTION_USBMUXD = 1, | 65 | CONNECTION_USBMUXD = 1, /**< device is available via USBMUX */ |
66 | CONNECTION_NETWORK | 66 | CONNECTION_NETWORK /**< device is available via network */ |
67 | }; | 67 | }; |
68 | 68 | ||
69 | /** Device information returned by #idevice_get_device_list_extended API */ | ||
69 | struct idevice_info { | 70 | struct idevice_info { |
70 | char *udid; | 71 | char *udid; /**< UDID of the device */ |
71 | enum idevice_connection_type conn_type; | 72 | enum idevice_connection_type conn_type; /**< Type of connection the device is available on */ |
72 | void* conn_data; | 73 | void* conn_data; /**< Connection data, depending on the connection type */ |
73 | }; | 74 | }; |
74 | typedef struct idevice_info* idevice_info_t; | 75 | typedef struct idevice_info* idevice_info_t; |
75 | 76 | ||
76 | /* discovery (events/asynchronous) */ | 77 | /* discovery (events/asynchronous) */ |
77 | /** The event type for device add or removal */ | 78 | /** The event type for device add or removal */ |
78 | enum idevice_event_type { | 79 | enum idevice_event_type { |
79 | IDEVICE_DEVICE_ADD = 1, | 80 | IDEVICE_DEVICE_ADD = 1, /**< device was added */ |
80 | IDEVICE_DEVICE_REMOVE, | 81 | IDEVICE_DEVICE_REMOVE, /**< device was removed */ |
81 | IDEVICE_DEVICE_PAIRED | 82 | IDEVICE_DEVICE_PAIRED /**< device completed pairing process */ |
82 | }; | 83 | }; |
83 | 84 | ||
84 | /* event data structure */ | 85 | /* event data structure */ |
@@ -338,12 +339,22 @@ idevice_error_t idevice_connection_get_fd(idevice_connection_t connection, int * | |||
338 | /* misc */ | 339 | /* misc */ |
339 | 340 | ||
340 | /** | 341 | /** |
341 | * Gets the handle or (usbmux device id) of the device. | 342 | * Gets the handle or (USBMUX device id) of the device. |
343 | * | ||
344 | * @param device The device to get the USBMUX device id for. | ||
345 | * @param handle Pointer to a uint32_t that will be set to the USBMUX handle value. | ||
346 | * | ||
347 | * @return IDEVICE_E_SUCCESS on success, otherwise an error code. | ||
342 | */ | 348 | */ |
343 | idevice_error_t idevice_get_handle(idevice_t device, uint32_t *handle); | 349 | idevice_error_t idevice_get_handle(idevice_t device, uint32_t *handle); |
344 | 350 | ||
345 | /** | 351 | /** |
346 | * Gets the unique id for the device. | 352 | * Gets the Unique Device ID for the device. |
353 | * | ||
354 | * @param device The device to get the Unique Device ID for. | ||
355 | * @param udid Pointer that will be set to an allocated buffer with the device UDID. The consumer is responsible for releasing the allocated memory. | ||
356 | * | ||
357 | * @return IDEVICE_E_SUCCESS on success, otherwise an error code. | ||
347 | */ | 358 | */ |
348 | idevice_error_t idevice_get_udid(idevice_t device, char **udid); | 359 | idevice_error_t idevice_get_udid(idevice_t device, char **udid); |
349 | 360 | ||