diff options
| author | 2022-04-12 02:26:34 +0200 | |
|---|---|---|
| committer | 2022-04-12 02:26:34 +0200 | |
| commit | dca3cf8c5bd804bf563fd43a6cdfdb1a5b85d490 (patch) | |
| tree | 56a21e7f928fd20da792772d8a899c7f3df64db7 | |
| parent | ea6084c4ed624b6191b4b47737e33d88911bebc8 (diff) | |
| download | libimobiledevice-dca3cf8c5bd804bf563fd43a6cdfdb1a5b85d490.tar.gz libimobiledevice-dca3cf8c5bd804bf563fd43a6cdfdb1a5b85d490.tar.bz2 | |
Documentation fixes
26 files changed, 177 insertions, 86 deletions
diff --git a/include/libimobiledevice/afc.h b/include/libimobiledevice/afc.h index b59b070..a2d70d3 100644 --- a/include/libimobiledevice/afc.h +++ b/include/libimobiledevice/afc.h | |||
| @@ -31,6 +31,7 @@ extern "C" { | |||
| 31 | #include <libimobiledevice/libimobiledevice.h> | 31 | #include <libimobiledevice/libimobiledevice.h> |
| 32 | #include <libimobiledevice/lockdown.h> | 32 | #include <libimobiledevice/lockdown.h> |
| 33 | 33 | ||
| 34 | /** Service identifier passed to lockdownd_start_service() to start the AFC service */ | ||
| 34 | #define AFC_SERVICE_NAME "com.apple.afc" | 35 | #define AFC_SERVICE_NAME "com.apple.afc" |
| 35 | 36 | ||
| 36 | /** Error Codes */ | 37 | /** Error Codes */ |
| @@ -89,7 +90,7 @@ typedef enum { | |||
| 89 | AFC_LOCK_UN = 8 | 4 /**< unlock */ | 90 | AFC_LOCK_UN = 8 | 4 /**< unlock */ |
| 90 | } afc_lock_op_t; | 91 | } afc_lock_op_t; |
| 91 | 92 | ||
| 92 | typedef struct afc_client_private afc_client_private; | 93 | typedef struct afc_client_private afc_client_private; /**< \private */ |
| 93 | typedef afc_client_private *afc_client_t; /**< The client handle. */ | 94 | typedef afc_client_private *afc_client_t; /**< The client handle. */ |
| 94 | 95 | ||
| 95 | /* Interface */ | 96 | /* Interface */ |
diff --git a/include/libimobiledevice/companion_proxy.h b/include/libimobiledevice/companion_proxy.h index 19c88eb..d786766 100644 --- a/include/libimobiledevice/companion_proxy.h +++ b/include/libimobiledevice/companion_proxy.h | |||
| @@ -30,6 +30,7 @@ extern "C" { | |||
| 30 | #include <libimobiledevice/libimobiledevice.h> | 30 | #include <libimobiledevice/libimobiledevice.h> |
| 31 | #include <libimobiledevice/lockdown.h> | 31 | #include <libimobiledevice/lockdown.h> |
| 32 | 32 | ||
| 33 | /** Service identifier passed to lockdownd_start_service() to start the companion proxy service */ | ||
| 33 | #define COMPANION_PROXY_SERVICE_NAME "com.apple.companion_proxy" | 34 | #define COMPANION_PROXY_SERVICE_NAME "com.apple.companion_proxy" |
| 34 | 35 | ||
| 35 | /** Error Codes */ | 36 | /** Error Codes */ |
| @@ -48,9 +49,10 @@ typedef enum { | |||
| 48 | COMPANION_PROXY_E_UNKNOWN_ERROR = -256 | 49 | COMPANION_PROXY_E_UNKNOWN_ERROR = -256 |
| 49 | } companion_proxy_error_t; | 50 | } companion_proxy_error_t; |
| 50 | 51 | ||
| 51 | typedef struct companion_proxy_client_private companion_proxy_client_private; | 52 | typedef struct companion_proxy_client_private companion_proxy_client_private; /**< \private */ |
| 52 | typedef companion_proxy_client_private *companion_proxy_client_t; /**< The client handle. */ | 53 | typedef companion_proxy_client_private *companion_proxy_client_t; /**< The client handle. */ |
| 53 | 54 | ||
| 55 | /** Callback for companion device events */ | ||
| 54 | typedef void (*companion_proxy_device_event_cb_t) (plist_t event, void* userdata); | 56 | typedef void (*companion_proxy_device_event_cb_t) (plist_t event, void* userdata); |
| 55 | 57 | ||
| 56 | /** | 58 | /** |
| @@ -119,7 +121,7 @@ companion_proxy_error_t companion_proxy_receive(companion_proxy_client_t client, | |||
| 119 | * Retrieves a list of paired devices. | 121 | * Retrieves a list of paired devices. |
| 120 | * | 122 | * |
| 121 | * @param client The companion_proxy client | 123 | * @param client The companion_proxy client |
| 122 | * @param devices Point that will receive a PLIST_ARRAY with paired device UDIDs | 124 | * @param paired_devices Point that will receive a PLIST_ARRAY with paired device UDIDs |
| 123 | * | 125 | * |
| 124 | * @note The device closes the connection after sending the reply. | 126 | * @note The device closes the connection after sending the reply. |
| 125 | * | 127 | * |
| @@ -161,6 +163,8 @@ companion_proxy_error_t companion_proxy_stop_listening_for_devices(companion_pro | |||
| 161 | * @param client The companion_proxy client | 163 | * @param client The companion_proxy client |
| 162 | * @param companion_udid UDID of the (paired) companion device | 164 | * @param companion_udid UDID of the (paired) companion device |
| 163 | * @param key The key to retrieve the value for | 165 | * @param key The key to retrieve the value for |
| 166 | * @param value A pointer to a plist_t that will receive the value for the given key. | ||
| 167 | * The consumer is responsible for freeing the value with plist_free() when no longer needed. | ||
| 164 | * | 168 | * |
| 165 | * @note The device closes the connection after sending the reply. | 169 | * @note The device closes the connection after sending the reply. |
| 166 | * | 170 | * |
diff --git a/include/libimobiledevice/debugserver.h b/include/libimobiledevice/debugserver.h index 90ba514..eaa7c48 100644 --- a/include/libimobiledevice/debugserver.h +++ b/include/libimobiledevice/debugserver.h | |||
| @@ -30,7 +30,9 @@ extern "C" { | |||
| 30 | #include <libimobiledevice/libimobiledevice.h> | 30 | #include <libimobiledevice/libimobiledevice.h> |
| 31 | #include <libimobiledevice/lockdown.h> | 31 | #include <libimobiledevice/lockdown.h> |
| 32 | 32 | ||
| 33 | /** Service identifier passed to lockdownd_start_service() to start the debugserver service */ | ||
| 33 | #define DEBUGSERVER_SERVICE_NAME "com.apple.debugserver" | 34 | #define DEBUGSERVER_SERVICE_NAME "com.apple.debugserver" |
| 35 | /** Service identifier passed to lockdownd_start_service() to start the secure debugserver service */ | ||
| 34 | #define DEBUGSERVER_SECURE_SERVICE_NAME DEBUGSERVER_SERVICE_NAME ".DVTSecureSocketProxy" | 36 | #define DEBUGSERVER_SECURE_SERVICE_NAME DEBUGSERVER_SERVICE_NAME ".DVTSecureSocketProxy" |
| 35 | 37 | ||
| 36 | /** Error Codes */ | 38 | /** Error Codes */ |
| @@ -44,10 +46,10 @@ typedef enum { | |||
| 44 | DEBUGSERVER_E_UNKNOWN_ERROR = -256 | 46 | DEBUGSERVER_E_UNKNOWN_ERROR = -256 |
| 45 | } debugserver_error_t; | 47 | } debugserver_error_t; |
| 46 | 48 | ||
| 47 | typedef struct debugserver_client_private debugserver_client_private; | 49 | typedef struct debugserver_client_private debugserver_client_private; /**< \private */ |
| 48 | typedef debugserver_client_private *debugserver_client_t; /**< The client handle. */ | 50 | typedef debugserver_client_private *debugserver_client_t; /**< The client handle. */ |
| 49 | 51 | ||
| 50 | typedef struct debugserver_command_private debugserver_command_private; | 52 | typedef struct debugserver_command_private debugserver_command_private; /**< \private */ |
| 51 | typedef debugserver_command_private *debugserver_command_t; /**< The command handle. */ | 53 | typedef debugserver_command_private *debugserver_command_t; /**< The command handle. */ |
| 52 | 54 | ||
| 53 | /* Interface */ | 55 | /* Interface */ |
diff --git a/include/libimobiledevice/diagnostics_relay.h b/include/libimobiledevice/diagnostics_relay.h index d37ad74..f80a86b 100644 --- a/include/libimobiledevice/diagnostics_relay.h +++ b/include/libimobiledevice/diagnostics_relay.h | |||
| @@ -30,6 +30,7 @@ extern "C" { | |||
| 30 | #include <libimobiledevice/libimobiledevice.h> | 30 | #include <libimobiledevice/libimobiledevice.h> |
| 31 | #include <libimobiledevice/lockdown.h> | 31 | #include <libimobiledevice/lockdown.h> |
| 32 | 32 | ||
| 33 | /** Service identifier passed to lockdownd_start_service() to start the diagnostics relay service */ | ||
| 33 | #define DIAGNOSTICS_RELAY_SERVICE_NAME "com.apple.mobile.diagnostics_relay" | 34 | #define DIAGNOSTICS_RELAY_SERVICE_NAME "com.apple.mobile.diagnostics_relay" |
| 34 | 35 | ||
| 35 | /** Error Codes */ | 36 | /** Error Codes */ |
| @@ -42,18 +43,19 @@ typedef enum { | |||
| 42 | DIAGNOSTICS_RELAY_E_UNKNOWN_ERROR = -256 | 43 | DIAGNOSTICS_RELAY_E_UNKNOWN_ERROR = -256 |
| 43 | } diagnostics_relay_error_t; | 44 | } diagnostics_relay_error_t; |
| 44 | 45 | ||
| 46 | /** Action type for #diagnostics_relay_restart and #diagnostics_relay_shutdown */ | ||
| 45 | typedef enum { | 47 | typedef enum { |
| 46 | DIAGNOSTICS_RELAY_ACTION_FLAG_WAIT_FOR_DISCONNECT = 1 << 1, | 48 | DIAGNOSTICS_RELAY_ACTION_FLAG_WAIT_FOR_DISCONNECT = 1 << 1, |
| 47 | DIAGNOSTICS_RELAY_ACTION_FLAG_DISPLAY_PASS = 1 << 2, | 49 | DIAGNOSTICS_RELAY_ACTION_FLAG_DISPLAY_PASS = 1 << 2, |
| 48 | DIAGNOSTICS_RELAY_ACTION_FLAG_DISPLAY_FAIL = 1 << 3 | 50 | DIAGNOSTICS_RELAY_ACTION_FLAG_DISPLAY_FAIL = 1 << 3 |
| 49 | } diagnostics_relay_action_t; | 51 | } diagnostics_relay_action_t; |
| 50 | 52 | ||
| 51 | #define DIAGNOSTICS_RELAY_REQUEST_TYPE_ALL "All" | 53 | #define DIAGNOSTICS_RELAY_REQUEST_TYPE_ALL "All" /**< Query all available diagnostics */ |
| 52 | #define DIAGNOSTICS_RELAY_REQUEST_TYPE_WIFI "WiFi" | 54 | #define DIAGNOSTICS_RELAY_REQUEST_TYPE_WIFI "WiFi" /**< Query WiFi diagnostics */ |
| 53 | #define DIAGNOSTICS_RELAY_REQUEST_TYPE_GAS_GAUGE "GasGauge" | 55 | #define DIAGNOSTICS_RELAY_REQUEST_TYPE_GAS_GAUGE "GasGauge" /**< Query GasGauge diagnostics */ |
| 54 | #define DIAGNOSTICS_RELAY_REQUEST_TYPE_NAND "NAND" | 56 | #define DIAGNOSTICS_RELAY_REQUEST_TYPE_NAND "NAND" /**< Query NAND diagnostics */ |
| 55 | 57 | ||
| 56 | typedef struct diagnostics_relay_client_private diagnostics_relay_client_private; | 58 | typedef struct diagnostics_relay_client_private diagnostics_relay_client_private; /**< \private */ |
| 57 | typedef diagnostics_relay_client_private *diagnostics_relay_client_t; /**< The client handle. */ | 59 | typedef diagnostics_relay_client_private *diagnostics_relay_client_t; /**< The client handle. */ |
| 58 | 60 | ||
| 59 | /** | 61 | /** |
| @@ -158,14 +160,13 @@ diagnostics_relay_error_t diagnostics_relay_restart(diagnostics_relay_client_t c | |||
| 158 | diagnostics_relay_error_t diagnostics_relay_shutdown(diagnostics_relay_client_t client, diagnostics_relay_action_t flags); | 160 | diagnostics_relay_error_t diagnostics_relay_shutdown(diagnostics_relay_client_t client, diagnostics_relay_action_t flags); |
| 159 | 161 | ||
| 160 | /** | 162 | /** |
| 161 | * Shutdown of the device and optionally show a user notification. | 163 | * Request diagnostics information for a given type. |
| 162 | * | 164 | * |
| 163 | * @param client The diagnostics_relay client | 165 | * @param client The diagnostics_relay client |
| 164 | * @param flags A binary flag combination of | 166 | * @param type The type or domain to query for diagnostics. Some known values |
| 165 | * DIAGNOSTICS_RELAY_ACTION_FLAG_WAIT_FOR_DISCONNECT to wait until | 167 | * are "All", "WiFi", "GasGauge", and "NAND". |
| 166 | * diagnostics_relay_client_free() disconnects before execution and | 168 | * @param diagnostics A pointer to plist_t that will receive the diagnostics information. |
| 167 | * DIAGNOSTICS_RELAY_ACTION_FLAG_DISPLAY_FAIL to show a "FAIL" dialog | 169 | * The consumer has to free the allocated memory with plist_free() when no longer needed. |
| 168 | * or DIAGNOSTICS_RELAY_ACTION_FLAG_DISPLAY_PASS to show an "OK" dialog | ||
| 169 | * | 170 | * |
| 170 | * @return DIAGNOSTICS_RELAY_E_SUCCESS on success, | 171 | * @return DIAGNOSTICS_RELAY_E_SUCCESS on success, |
| 171 | * DIAGNOSTICS_RELAY_E_INVALID_ARG when client is NULL, | 172 | * DIAGNOSTICS_RELAY_E_INVALID_ARG when client is NULL, |
| @@ -174,10 +175,50 @@ diagnostics_relay_error_t diagnostics_relay_shutdown(diagnostics_relay_client_t | |||
| 174 | */ | 175 | */ |
| 175 | diagnostics_relay_error_t diagnostics_relay_request_diagnostics(diagnostics_relay_client_t client, const char* type, plist_t* diagnostics); | 176 | diagnostics_relay_error_t diagnostics_relay_request_diagnostics(diagnostics_relay_client_t client, const char* type, plist_t* diagnostics); |
| 176 | 177 | ||
| 178 | /** | ||
| 179 | * Query one or multiple MobileGestalt keys. | ||
| 180 | * | ||
| 181 | * @param client The diagnostics_relay client | ||
| 182 | * @param keys A PLIST_ARRAY with the keys to query. | ||
| 183 | * @param result A pointer to plist_t that will receive the result. The consumer | ||
| 184 | * has to free the allocated memory with plist_free() when no longer needed. | ||
| 185 | * | ||
| 186 | * @return DIAGNOSTICS_RELAY_E_SUCCESS on success, | ||
| 187 | * DIAGNOSTICS_RELAY_E_INVALID_ARG when client is NULL, | ||
| 188 | * DIAGNOSTICS_RELAY_E_PLIST_ERROR if the device did not acknowledge the | ||
| 189 | * request | ||
| 190 | */ | ||
| 177 | diagnostics_relay_error_t diagnostics_relay_query_mobilegestalt(diagnostics_relay_client_t client, plist_t keys, plist_t* result); | 191 | diagnostics_relay_error_t diagnostics_relay_query_mobilegestalt(diagnostics_relay_client_t client, plist_t keys, plist_t* result); |
| 178 | 192 | ||
| 193 | /** | ||
| 194 | * Query an IORegistry entry of a given class. | ||
| 195 | * | ||
| 196 | * @param client The diagnostics_relay client | ||
| 197 | * @param entry_name The IORegistry entry name to query. | ||
| 198 | * @param entry_class The IORegistry class to query. | ||
| 199 | * @param result A pointer to plist_t that will receive the result. The consumer | ||
| 200 | * has to free the allocated memory with plist_free() when no longer needed. | ||
| 201 | * | ||
| 202 | * @return DIAGNOSTICS_RELAY_E_SUCCESS on success, | ||
| 203 | * DIAGNOSTICS_RELAY_E_INVALID_ARG when client is NULL, | ||
| 204 | * DIAGNOSTICS_RELAY_E_PLIST_ERROR if the device did not acknowledge the | ||
| 205 | * request | ||
| 206 | */ | ||
| 179 | diagnostics_relay_error_t diagnostics_relay_query_ioregistry_entry(diagnostics_relay_client_t client, const char* entry_name, const char* entry_class, plist_t* result); | 207 | diagnostics_relay_error_t diagnostics_relay_query_ioregistry_entry(diagnostics_relay_client_t client, const char* entry_name, const char* entry_class, plist_t* result); |
| 180 | 208 | ||
| 209 | /** | ||
| 210 | * Query an IORegistry plane. | ||
| 211 | * | ||
| 212 | * @param client The diagnostics_relay client | ||
| 213 | * @param plane The IORegistry plane name to query. | ||
| 214 | * @param result A pointer to plist_t that will receive the result. The consumer | ||
| 215 | * has to free the allocated memory with plist_free() when no longer needed. | ||
| 216 | * | ||
| 217 | * @return DIAGNOSTICS_RELAY_E_SUCCESS on success, | ||
| 218 | * DIAGNOSTICS_RELAY_E_INVALID_ARG when client is NULL, | ||
| 219 | * DIAGNOSTICS_RELAY_E_PLIST_ERROR if the device did not acknowledge the | ||
| 220 | * request | ||
| 221 | */ | ||
| 181 | diagnostics_relay_error_t diagnostics_relay_query_ioregistry_plane(diagnostics_relay_client_t client, const char* plane, plist_t* result); | 222 | diagnostics_relay_error_t diagnostics_relay_query_ioregistry_plane(diagnostics_relay_client_t client, const char* plane, plist_t* result); |
| 182 | 223 | ||
| 183 | #ifdef __cplusplus | 224 | #ifdef __cplusplus |
diff --git a/include/libimobiledevice/file_relay.h b/include/libimobiledevice/file_relay.h index e41bb2d..6b30e65 100644 --- a/include/libimobiledevice/file_relay.h +++ b/include/libimobiledevice/file_relay.h | |||
| @@ -32,6 +32,7 @@ extern "C" { | |||
| 32 | #include <libimobiledevice/libimobiledevice.h> | 32 | #include <libimobiledevice/libimobiledevice.h> |
| 33 | #include <libimobiledevice/lockdown.h> | 33 | #include <libimobiledevice/lockdown.h> |
| 34 | 34 | ||
| 35 | /** Service identifier passed to lockdownd_start_service() to start the file relay service */ | ||
| 35 | #define FILE_RELAY_SERVICE_NAME "com.apple.mobile.file_relay" | 36 | #define FILE_RELAY_SERVICE_NAME "com.apple.mobile.file_relay" |
| 36 | 37 | ||
| 37 | /** Error Codes */ | 38 | /** Error Codes */ |
| @@ -46,7 +47,7 @@ typedef enum { | |||
| 46 | FILE_RELAY_E_UNKNOWN_ERROR = -256 | 47 | FILE_RELAY_E_UNKNOWN_ERROR = -256 |
| 47 | } file_relay_error_t; | 48 | } file_relay_error_t; |
| 48 | 49 | ||
| 49 | typedef struct file_relay_client_private file_relay_client_private; | 50 | typedef struct file_relay_client_private file_relay_client_private; /**< \private */ |
| 50 | typedef file_relay_client_private *file_relay_client_t; /**< The client handle. */ | 51 | typedef file_relay_client_private *file_relay_client_t; /**< The client handle. */ |
| 51 | 52 | ||
| 52 | /** | 53 | /** |
| @@ -110,8 +111,7 @@ file_relay_error_t file_relay_client_free(file_relay_client_t client); | |||
| 110 | * data using idevice_connection_receive(). The connection will be closed | 111 | * data using idevice_connection_receive(). The connection will be closed |
| 111 | * automatically by the device, but use file_relay_client_free() to clean | 112 | * automatically by the device, but use file_relay_client_free() to clean |
| 112 | * up properly. | 113 | * up properly. |
| 113 | * @param timeout Maximum time in milliseconds to wait for data. | 114 | * |
| 114 | * | ||
| 115 | * @note WARNING: Don't call this function without reading the data afterwards. | 115 | * @note WARNING: Don't call this function without reading the data afterwards. |
| 116 | * A directory mobile_file_relay.XXXX used for creating the archive will | 116 | * A directory mobile_file_relay.XXXX used for creating the archive will |
| 117 | * remain in the /tmp directory otherwise. | 117 | * remain in the /tmp directory otherwise. |
| @@ -144,6 +144,7 @@ file_relay_error_t file_relay_request_sources(file_relay_client_t client, const | |||
| 144 | * data using idevice_connection_receive(). The connection will be closed | 144 | * data using idevice_connection_receive(). The connection will be closed |
| 145 | * automatically by the device, but use file_relay_client_free() to clean | 145 | * automatically by the device, but use file_relay_client_free() to clean |
| 146 | * up properly. | 146 | * up properly. |
| 147 | * @param timeout Maximum time in milliseconds to wait for data. | ||
| 147 | * | 148 | * |
| 148 | * @note WARNING: Don't call this function without reading the data afterwards. | 149 | * @note WARNING: Don't call this function without reading the data afterwards. |
| 149 | * A directory mobile_file_relay.XXXX used for creating the archive will | 150 | * A directory mobile_file_relay.XXXX used for creating the archive will |
diff --git a/include/libimobiledevice/heartbeat.h b/include/libimobiledevice/heartbeat.h index 1f5344a..42b318d 100644 --- a/include/libimobiledevice/heartbeat.h +++ b/include/libimobiledevice/heartbeat.h | |||
| @@ -30,6 +30,7 @@ extern "C" { | |||
| 30 | #include <libimobiledevice/libimobiledevice.h> | 30 | #include <libimobiledevice/libimobiledevice.h> |
| 31 | #include <libimobiledevice/lockdown.h> | 31 | #include <libimobiledevice/lockdown.h> |
| 32 | 32 | ||
| 33 | /** Service identifier passed to lockdownd_start_service() to start the heartbeat service */ | ||
| 33 | #define HEARTBEAT_SERVICE_NAME "com.apple.mobile.heartbeat" | 34 | #define HEARTBEAT_SERVICE_NAME "com.apple.mobile.heartbeat" |
| 34 | 35 | ||
| 35 | /** Error Codes */ | 36 | /** Error Codes */ |
| @@ -44,7 +45,7 @@ typedef enum { | |||
| 44 | HEARTBEAT_E_UNKNOWN_ERROR = -256 | 45 | HEARTBEAT_E_UNKNOWN_ERROR = -256 |
| 45 | } heartbeat_error_t; | 46 | } heartbeat_error_t; |
| 46 | 47 | ||
| 47 | typedef struct heartbeat_client_private heartbeat_client_private; | 48 | typedef struct heartbeat_client_private heartbeat_client_private; /**< \private */ |
| 48 | typedef heartbeat_client_private *heartbeat_client_t; /**< The client handle. */ | 49 | typedef heartbeat_client_private *heartbeat_client_t; /**< The client handle. */ |
| 49 | 50 | ||
| 50 | /** | 51 | /** |
| @@ -116,7 +117,7 @@ heartbeat_error_t heartbeat_receive(heartbeat_client_t client, plist_t * plist); | |||
| 116 | * @param client The heartbeat client to use for receiving | 117 | * @param client The heartbeat client to use for receiving |
| 117 | * @param plist pointer to a plist_t that will point to the received plist | 118 | * @param plist pointer to a plist_t that will point to the received plist |
| 118 | * upon successful return | 119 | * upon successful return |
| 119 | * @param timeout Maximum time in milliseconds to wait for data. | 120 | * @param timeout_ms Maximum time in milliseconds to wait for data. |
| 120 | * | 121 | * |
| 121 | * @return HEARTBEAT_E_SUCCESS on success, | 122 | * @return HEARTBEAT_E_SUCCESS on success, |
| 122 | * HEARTBEAT_E_INVALID_ARG when client or *plist is NULL, | 123 | * HEARTBEAT_E_INVALID_ARG when client or *plist is NULL, |
diff --git a/include/libimobiledevice/house_arrest.h b/include/libimobiledevice/house_arrest.h index 5a42838..3785847 100644 --- a/include/libimobiledevice/house_arrest.h +++ b/include/libimobiledevice/house_arrest.h | |||
| @@ -32,6 +32,7 @@ extern "C" { | |||
| 32 | #include <libimobiledevice/lockdown.h> | 32 | #include <libimobiledevice/lockdown.h> |
| 33 | #include <libimobiledevice/afc.h> | 33 | #include <libimobiledevice/afc.h> |
| 34 | 34 | ||
| 35 | /** Service identifier passed to lockdownd_start_service() to start the house arrest service */ | ||
| 35 | #define HOUSE_ARREST_SERVICE_NAME "com.apple.mobile.house_arrest" | 36 | #define HOUSE_ARREST_SERVICE_NAME "com.apple.mobile.house_arrest" |
| 36 | 37 | ||
| 37 | /** Error Codes */ | 38 | /** Error Codes */ |
| @@ -44,7 +45,7 @@ typedef enum { | |||
| 44 | HOUSE_ARREST_E_UNKNOWN_ERROR = -256 | 45 | HOUSE_ARREST_E_UNKNOWN_ERROR = -256 |
| 45 | } house_arrest_error_t; | 46 | } house_arrest_error_t; |
| 46 | 47 | ||
| 47 | typedef struct house_arrest_client_private house_arrest_client_private; | 48 | typedef struct house_arrest_client_private house_arrest_client_private; /**< \private */ |
| 48 | typedef house_arrest_client_private *house_arrest_client_t; /**< The client handle. */ | 49 | typedef house_arrest_client_private *house_arrest_client_t; /**< The client handle. */ |
| 49 | 50 | ||
| 50 | /* Interface */ | 51 | /* Interface */ |
diff --git a/include/libimobiledevice/installation_proxy.h b/include/libimobiledevice/installation_proxy.h index e96e224..87132b9 100644 --- a/include/libimobiledevice/installation_proxy.h +++ b/include/libimobiledevice/installation_proxy.h | |||
| @@ -33,6 +33,7 @@ extern "C" { | |||
| 33 | #include <libimobiledevice/libimobiledevice.h> | 33 | #include <libimobiledevice/libimobiledevice.h> |
| 34 | #include <libimobiledevice/lockdown.h> | 34 | #include <libimobiledevice/lockdown.h> |
| 35 | 35 | ||
| 36 | /** Service identifier passed to lockdownd_start_service() to start the installation proxy service */ | ||
| 36 | #define INSTPROXY_SERVICE_NAME "com.apple.mobile.installation_proxy" | 37 | #define INSTPROXY_SERVICE_NAME "com.apple.mobile.installation_proxy" |
| 37 | 38 | ||
| 38 | /** Error Codes */ | 39 | /** Error Codes */ |
| @@ -107,7 +108,7 @@ typedef enum { | |||
| 107 | INSTPROXY_E_UNKNOWN_ERROR = -256 | 108 | INSTPROXY_E_UNKNOWN_ERROR = -256 |
| 108 | } instproxy_error_t; | 109 | } instproxy_error_t; |
| 109 | 110 | ||
| 110 | typedef struct instproxy_client_private instproxy_client_private; | 111 | typedef struct instproxy_client_private instproxy_client_private; /**< \private */ |
| 111 | typedef instproxy_client_private *instproxy_client_t; /**< The client handle. */ | 112 | typedef instproxy_client_private *instproxy_client_t; /**< The client handle. */ |
| 112 | 113 | ||
| 113 | /** Reports the status response of the given command */ | 114 | /** Reports the status response of the given command */ |
| @@ -441,8 +442,8 @@ void instproxy_status_get_current_list(plist_t status, uint64_t* total, uint64_t | |||
| 441 | * Gets progress in percentage from a status if available. | 442 | * Gets progress in percentage from a status if available. |
| 442 | * | 443 | * |
| 443 | * @param status The dictionary status response to use. | 444 | * @param status The dictionary status response to use. |
| 444 | * @param name Pointer to store the progress in percent (0-100) or -1 if not | 445 | * @param percent Pointer to an int to store the progress in percent (0-100) |
| 445 | * progress was found in the status. | 446 | * or -1 if no progress was found in the status. |
| 446 | */ | 447 | */ |
| 447 | void instproxy_status_get_percent_complete(plist_t status, int *percent); | 448 | void instproxy_status_get_percent_complete(plist_t status, int *percent); |
| 448 | 449 | ||
| @@ -487,7 +488,7 @@ void instproxy_client_options_free(plist_t client_options); | |||
| 487 | * Queries the device for the path of an application. | 488 | * Queries the device for the path of an application. |
| 488 | * | 489 | * |
| 489 | * @param client The connected installation proxy client. | 490 | * @param client The connected installation proxy client. |
| 490 | * @param appid ApplicationIdentifier of app to retrieve the path for. | 491 | * @param bundle_id ApplicationIdentifier of app to retrieve the path for. |
| 491 | * @param path Pointer to store the device path for the application | 492 | * @param path Pointer to store the device path for the application |
| 492 | * which is set to NULL if it could not be determined. | 493 | * which is set to NULL if it could not be determined. |
| 493 | * | 494 | * |
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 | ||
diff --git a/include/libimobiledevice/lockdown.h b/include/libimobiledevice/lockdown.h index 1569f44..f22917a 100644 --- a/include/libimobiledevice/lockdown.h +++ b/include/libimobiledevice/lockdown.h | |||
| @@ -80,7 +80,7 @@ typedef enum { | |||
| 80 | LOCKDOWN_E_UNKNOWN_ERROR = -256 | 80 | LOCKDOWN_E_UNKNOWN_ERROR = -256 |
| 81 | } lockdownd_error_t; | 81 | } lockdownd_error_t; |
| 82 | 82 | ||
| 83 | typedef struct lockdownd_client_private lockdownd_client_private; | 83 | typedef struct lockdownd_client_private lockdownd_client_private; /**< \private */ |
| 84 | typedef lockdownd_client_private *lockdownd_client_t; /**< The client handle. */ | 84 | typedef lockdownd_client_private *lockdownd_client_t; /**< The client handle. */ |
| 85 | 85 | ||
| 86 | struct lockdownd_pair_record { | 86 | struct lockdownd_pair_record { |
| @@ -88,19 +88,20 @@ struct lockdownd_pair_record { | |||
| 88 | char *host_certificate; /**< The host certificate */ | 88 | char *host_certificate; /**< The host certificate */ |
| 89 | char *root_certificate; /**< The root certificate */ | 89 | char *root_certificate; /**< The root certificate */ |
| 90 | char *host_id; /**< A unique HostID for the host computer */ | 90 | char *host_id; /**< A unique HostID for the host computer */ |
| 91 | char *system_buid; /**< A unique system id */ | 91 | char *system_buid; /**< A unique system id */ |
| 92 | }; | 92 | }; |
| 93 | /** A pair record holding device, host and root certificates along the host_id */ | 93 | /** pair record holding device, host and root certificates along the host_id */ |
| 94 | typedef struct lockdownd_pair_record *lockdownd_pair_record_t; | 94 | typedef struct lockdownd_pair_record *lockdownd_pair_record_t; /**< pair record */ |
| 95 | 95 | ||
| 96 | /** service descriptor */ | ||
| 96 | struct lockdownd_service_descriptor { | 97 | struct lockdownd_service_descriptor { |
| 97 | uint16_t port; | 98 | uint16_t port; /**< port number the service was started on */ |
| 98 | uint8_t ssl_enabled; | 99 | uint8_t ssl_enabled; /**< an indicator if the service requires SSL */ |
| 99 | char* identifier; | 100 | char* identifier; /**< identifier of the service */ |
| 100 | }; | 101 | }; |
| 101 | typedef struct lockdownd_service_descriptor *lockdownd_service_descriptor_t; | 102 | typedef struct lockdownd_service_descriptor *lockdownd_service_descriptor_t; |
| 102 | 103 | ||
| 103 | 104 | /** Callback types used in #lockdownd_cu_pairing_cb_t */ | |
| 104 | typedef enum { | 105 | typedef enum { |
| 105 | LOCKDOWN_CU_PAIRING_PIN_REQUESTED, /**< PIN requested: data_ptr is a char* buffer, and data_size points to the size of this buffer that must not be exceeded and has to be updated to the actual number of characters filled into the buffer. */ | 106 | LOCKDOWN_CU_PAIRING_PIN_REQUESTED, /**< PIN requested: data_ptr is a char* buffer, and data_size points to the size of this buffer that must not be exceeded and has to be updated to the actual number of characters filled into the buffer. */ |
| 106 | LOCKDOWN_CU_PAIRING_DEVICE_INFO, /**< device information available: data_ptr is a plist_t, and data_size is ignored. The plist_t has to be copied if required, since it is freed when the callback function returns. */ | 107 | LOCKDOWN_CU_PAIRING_DEVICE_INFO, /**< device information available: data_ptr is a plist_t, and data_size is ignored. The plist_t has to be copied if required, since it is freed when the callback function returns. */ |
| @@ -564,7 +565,7 @@ lockdownd_error_t lockdownd_service_descriptor_free(lockdownd_service_descriptor | |||
| 564 | /** | 565 | /** |
| 565 | * Gets a readable error string for a given lockdown error code. | 566 | * Gets a readable error string for a given lockdown error code. |
| 566 | * | 567 | * |
| 567 | * @params err A lockdownd error code | 568 | * @param err A lockdownd error code |
| 568 | * | 569 | * |
| 569 | * @returns A readable error string | 570 | * @returns A readable error string |
| 570 | */ | 571 | */ |
diff --git a/include/libimobiledevice/misagent.h b/include/libimobiledevice/misagent.h index 09af57a..394f5ce 100644 --- a/include/libimobiledevice/misagent.h +++ b/include/libimobiledevice/misagent.h | |||
| @@ -31,6 +31,7 @@ extern "C" { | |||
| 31 | #include <libimobiledevice/libimobiledevice.h> | 31 | #include <libimobiledevice/libimobiledevice.h> |
| 32 | #include <libimobiledevice/lockdown.h> | 32 | #include <libimobiledevice/lockdown.h> |
| 33 | 33 | ||
| 34 | /** Service identifier passed to lockdownd_start_service() to start the misagent service */ | ||
| 34 | #define MISAGENT_SERVICE_NAME "com.apple.misagent" | 35 | #define MISAGENT_SERVICE_NAME "com.apple.misagent" |
| 35 | 36 | ||
| 36 | /** Error Codes */ | 37 | /** Error Codes */ |
| @@ -43,7 +44,7 @@ typedef enum { | |||
| 43 | MISAGENT_E_UNKNOWN_ERROR = -256 | 44 | MISAGENT_E_UNKNOWN_ERROR = -256 |
| 44 | } misagent_error_t; | 45 | } misagent_error_t; |
| 45 | 46 | ||
| 46 | typedef struct misagent_client_private misagent_client_private; | 47 | typedef struct misagent_client_private misagent_client_private; /**< \private */ |
| 47 | typedef misagent_client_private *misagent_client_t; /**< The client handle. */ | 48 | typedef misagent_client_private *misagent_client_t; /**< The client handle. */ |
| 48 | 49 | ||
| 49 | /* Interface */ | 50 | /* Interface */ |
diff --git a/include/libimobiledevice/mobile_image_mounter.h b/include/libimobiledevice/mobile_image_mounter.h index e185ad5..891df40 100644 --- a/include/libimobiledevice/mobile_image_mounter.h +++ b/include/libimobiledevice/mobile_image_mounter.h | |||
| @@ -31,6 +31,7 @@ extern "C" { | |||
| 31 | #include <libimobiledevice/libimobiledevice.h> | 31 | #include <libimobiledevice/libimobiledevice.h> |
| 32 | #include <libimobiledevice/lockdown.h> | 32 | #include <libimobiledevice/lockdown.h> |
| 33 | 33 | ||
| 34 | /** Service identifier passed to lockdownd_start_service() to start the mobile image mounter service */ | ||
| 34 | #define MOBILE_IMAGE_MOUNTER_SERVICE_NAME "com.apple.mobile.mobile_image_mounter" | 35 | #define MOBILE_IMAGE_MOUNTER_SERVICE_NAME "com.apple.mobile.mobile_image_mounter" |
| 35 | 36 | ||
| 36 | /** Error Codes */ | 37 | /** Error Codes */ |
| @@ -44,7 +45,7 @@ typedef enum { | |||
| 44 | MOBILE_IMAGE_MOUNTER_E_UNKNOWN_ERROR = -256 | 45 | MOBILE_IMAGE_MOUNTER_E_UNKNOWN_ERROR = -256 |
| 45 | } mobile_image_mounter_error_t; | 46 | } mobile_image_mounter_error_t; |
| 46 | 47 | ||
| 47 | typedef struct mobile_image_mounter_client_private mobile_image_mounter_client_private; | 48 | typedef struct mobile_image_mounter_client_private mobile_image_mounter_client_private; /**< \private */ |
| 48 | typedef mobile_image_mounter_client_private *mobile_image_mounter_client_t; /**< The client handle. */ | 49 | typedef mobile_image_mounter_client_private *mobile_image_mounter_client_t; /**< The client handle. */ |
| 49 | 50 | ||
| 50 | /** callback for image upload */ | 51 | /** callback for image upload */ |
diff --git a/include/libimobiledevice/mobileactivation.h b/include/libimobiledevice/mobileactivation.h index 51de205..774c116 100644 --- a/include/libimobiledevice/mobileactivation.h +++ b/include/libimobiledevice/mobileactivation.h | |||
| @@ -30,6 +30,7 @@ extern "C" { | |||
| 30 | #include <libimobiledevice/libimobiledevice.h> | 30 | #include <libimobiledevice/libimobiledevice.h> |
| 31 | #include <libimobiledevice/lockdown.h> | 31 | #include <libimobiledevice/lockdown.h> |
| 32 | 32 | ||
| 33 | /** Service identifier passed to lockdownd_start_service() to start the mobile activation service */ | ||
| 33 | #define MOBILEACTIVATION_SERVICE_NAME "com.apple.mobileactivationd" | 34 | #define MOBILEACTIVATION_SERVICE_NAME "com.apple.mobileactivationd" |
| 34 | 35 | ||
| 35 | /** Error Codes */ | 36 | /** Error Codes */ |
| @@ -43,7 +44,7 @@ typedef enum { | |||
| 43 | MOBILEACTIVATION_E_UNKNOWN_ERROR = -256 | 44 | MOBILEACTIVATION_E_UNKNOWN_ERROR = -256 |
| 44 | } mobileactivation_error_t; | 45 | } mobileactivation_error_t; |
| 45 | 46 | ||
| 46 | typedef struct mobileactivation_client_private mobileactivation_client_private; | 47 | typedef struct mobileactivation_client_private mobileactivation_client_private; /**< \private */ |
| 47 | typedef mobileactivation_client_private *mobileactivation_client_t; /**< The client handle. */ | 48 | typedef mobileactivation_client_private *mobileactivation_client_t; /**< The client handle. */ |
| 48 | 49 | ||
| 49 | /** | 50 | /** |
| @@ -138,7 +139,7 @@ mobileactivation_error_t mobileactivation_create_activation_info(mobileactivatio | |||
| 138 | * provided by mobileactivation_create_activation_session_info(). | 139 | * provided by mobileactivation_create_activation_session_info(). |
| 139 | * | 140 | * |
| 140 | * @param client The mobileactivation client | 141 | * @param client The mobileactivation client |
| 141 | * @aram handshake_response The handshake response returned from drmHandshake | 142 | * @param handshake_response The handshake response returned from drmHandshake |
| 142 | * @param info Pointer to a plist_t variable that will be set to the | 143 | * @param info Pointer to a plist_t variable that will be set to the |
| 143 | * activation info created by the mobileactivation service. The | 144 | * activation info created by the mobileactivation service. The |
| 144 | * consumer is responsible for freeing the returned object using | 145 | * consumer is responsible for freeing the returned object using |
diff --git a/include/libimobiledevice/mobilebackup.h b/include/libimobiledevice/mobilebackup.h index f22150d..d4c042e 100644 --- a/include/libimobiledevice/mobilebackup.h +++ b/include/libimobiledevice/mobilebackup.h | |||
| @@ -31,6 +31,7 @@ extern "C" { | |||
| 31 | #include <libimobiledevice/libimobiledevice.h> | 31 | #include <libimobiledevice/libimobiledevice.h> |
| 32 | #include <libimobiledevice/lockdown.h> | 32 | #include <libimobiledevice/lockdown.h> |
| 33 | 33 | ||
| 34 | /** Service identifier passed to lockdownd_start_service() to start the mobilebackup service */ | ||
| 34 | #define MOBILEBACKUP_SERVICE_NAME "com.apple.mobilebackup" | 35 | #define MOBILEBACKUP_SERVICE_NAME "com.apple.mobilebackup" |
| 35 | 36 | ||
| 36 | /** Error Codes */ | 37 | /** Error Codes */ |
| @@ -46,9 +47,10 @@ typedef enum { | |||
| 46 | MOBILEBACKUP_E_UNKNOWN_ERROR = -256 | 47 | MOBILEBACKUP_E_UNKNOWN_ERROR = -256 |
| 47 | } mobilebackup_error_t; | 48 | } mobilebackup_error_t; |
| 48 | 49 | ||
| 49 | typedef struct mobilebackup_client_private mobilebackup_client_private; | 50 | typedef struct mobilebackup_client_private mobilebackup_client_private; /**< \private */ |
| 50 | typedef mobilebackup_client_private *mobilebackup_client_t; /**< The client handle. */ | 51 | typedef mobilebackup_client_private *mobilebackup_client_t; /**< The client handle. */ |
| 51 | 52 | ||
| 53 | /** Available flags passed to #mobilebackup_request_restore */ | ||
| 52 | typedef enum { | 54 | typedef enum { |
| 53 | MB_RESTORE_NOTIFY_SPRINGBOARD = 1 << 0, | 55 | MB_RESTORE_NOTIFY_SPRINGBOARD = 1 << 0, |
| 54 | MB_RESTORE_PRESERVE_SETTINGS = 1 << 1, | 56 | MB_RESTORE_PRESERVE_SETTINGS = 1 << 1, |
diff --git a/include/libimobiledevice/mobilebackup2.h b/include/libimobiledevice/mobilebackup2.h index 239c807..1af4141 100644 --- a/include/libimobiledevice/mobilebackup2.h +++ b/include/libimobiledevice/mobilebackup2.h | |||
| @@ -31,6 +31,7 @@ extern "C" { | |||
| 31 | #include <libimobiledevice/libimobiledevice.h> | 31 | #include <libimobiledevice/libimobiledevice.h> |
| 32 | #include <libimobiledevice/lockdown.h> | 32 | #include <libimobiledevice/lockdown.h> |
| 33 | 33 | ||
| 34 | /** Service identifier passed to lockdownd_start_service() to start the mobilebackup2 service */ | ||
| 34 | #define MOBILEBACKUP2_SERVICE_NAME "com.apple.mobilebackup2" | 35 | #define MOBILEBACKUP2_SERVICE_NAME "com.apple.mobilebackup2" |
| 35 | 36 | ||
| 36 | /** Error Codes */ | 37 | /** Error Codes */ |
| @@ -47,7 +48,7 @@ typedef enum { | |||
| 47 | MOBILEBACKUP2_E_UNKNOWN_ERROR = -256 | 48 | MOBILEBACKUP2_E_UNKNOWN_ERROR = -256 |
| 48 | } mobilebackup2_error_t; | 49 | } mobilebackup2_error_t; |
| 49 | 50 | ||
| 50 | typedef struct mobilebackup2_client_private mobilebackup2_client_private; | 51 | typedef struct mobilebackup2_client_private mobilebackup2_client_private; /**< \private */ |
| 51 | typedef mobilebackup2_client_private *mobilebackup2_client_t; /**< The client handle. */ | 52 | typedef mobilebackup2_client_private *mobilebackup2_client_t; /**< The client handle. */ |
| 52 | 53 | ||
| 53 | 54 | ||
| @@ -156,7 +157,7 @@ mobilebackup2_error_t mobilebackup2_send_raw(mobilebackup2_client_t client, cons | |||
| 156 | * @param data Pointer to a buffer that will be filled with the received data. | 157 | * @param data Pointer to a buffer that will be filled with the received data. |
| 157 | * @param length Number of bytes to receive. The data buffer needs to be large | 158 | * @param length Number of bytes to receive. The data buffer needs to be large |
| 158 | * enough to store this amount of data. | 159 | * enough to store this amount of data. |
| 159 | * @paran bytes Number of bytes actually received. | 160 | * @param bytes Number of bytes actually received. |
| 160 | * | 161 | * |
| 161 | * @return MOBILEBACKUP2_E_SUCCESS if any or no data was received, | 162 | * @return MOBILEBACKUP2_E_SUCCESS if any or no data was received, |
| 162 | * MOBILEBACKUP2_E_INVALID_ARG if one of the parameters is invalid, | 163 | * MOBILEBACKUP2_E_INVALID_ARG if one of the parameters is invalid, |
diff --git a/include/libimobiledevice/mobilesync.h b/include/libimobiledevice/mobilesync.h index 005ef3f..6b1af18 100644 --- a/include/libimobiledevice/mobilesync.h +++ b/include/libimobiledevice/mobilesync.h | |||
| @@ -34,6 +34,7 @@ extern "C" { | |||
| 34 | #include <libimobiledevice/libimobiledevice.h> | 34 | #include <libimobiledevice/libimobiledevice.h> |
| 35 | #include <libimobiledevice/lockdown.h> | 35 | #include <libimobiledevice/lockdown.h> |
| 36 | 36 | ||
| 37 | /** Service identifier passed to lockdownd_start_service() to start the mobilesync service */ | ||
| 37 | #define MOBILESYNC_SERVICE_NAME "com.apple.mobilesync" | 38 | #define MOBILESYNC_SERVICE_NAME "com.apple.mobilesync" |
| 38 | 39 | ||
| 39 | /** Error Codes */ | 40 | /** Error Codes */ |
| @@ -59,14 +60,16 @@ typedef enum { | |||
| 59 | MOBILESYNC_SYNC_TYPE_RESET /**< Reset-sync signals that the computer should send all data again. */ | 60 | MOBILESYNC_SYNC_TYPE_RESET /**< Reset-sync signals that the computer should send all data again. */ |
| 60 | } mobilesync_sync_type_t; | 61 | } mobilesync_sync_type_t; |
| 61 | 62 | ||
| 62 | typedef struct mobilesync_client_private mobilesync_client_private; | 63 | typedef struct mobilesync_client_private mobilesync_client_private; /**< \private */ |
| 63 | typedef mobilesync_client_private *mobilesync_client_t; /**< The client handle */ | 64 | typedef mobilesync_client_private *mobilesync_client_t; /**< The client handle */ |
| 64 | 65 | ||
| 66 | /** Anchors used by the device and computer (structure) */ | ||
| 65 | typedef struct { | 67 | typedef struct { |
| 66 | char *device_anchor; | 68 | char *device_anchor; /**< device anchor */ |
| 67 | char *computer_anchor; | 69 | char *computer_anchor; /**< computer anchor */ |
| 68 | } mobilesync_anchors; | 70 | } mobilesync_anchors; |
| 69 | typedef mobilesync_anchors *mobilesync_anchors_t; /**< Anchors used by the device and computer. */ | 71 | /** Anchors used by the device and computer */ |
| 72 | typedef mobilesync_anchors *mobilesync_anchors_t; | ||
| 70 | 73 | ||
| 71 | /* Interface */ | 74 | /* Interface */ |
| 72 | 75 | ||
diff --git a/include/libimobiledevice/notification_proxy.h b/include/libimobiledevice/notification_proxy.h index a9d2d3f..872692c 100644 --- a/include/libimobiledevice/notification_proxy.h +++ b/include/libimobiledevice/notification_proxy.h | |||
| @@ -31,6 +31,7 @@ extern "C" { | |||
| 31 | #include <libimobiledevice/libimobiledevice.h> | 31 | #include <libimobiledevice/libimobiledevice.h> |
| 32 | #include <libimobiledevice/lockdown.h> | 32 | #include <libimobiledevice/lockdown.h> |
| 33 | 33 | ||
| 34 | /** Service identifier passed to lockdownd_start_service() to start the notification proxy service */ | ||
| 34 | #define NP_SERVICE_NAME "com.apple.mobile.notification_proxy" | 35 | #define NP_SERVICE_NAME "com.apple.mobile.notification_proxy" |
| 35 | 36 | ||
| 36 | /** Error Codes */ | 37 | /** Error Codes */ |
| @@ -43,22 +44,26 @@ typedef enum { | |||
| 43 | } np_error_t; | 44 | } np_error_t; |
| 44 | 45 | ||
| 45 | /** | 46 | /** |
| 46 | * @name Notifications that can be send | 47 | * @name Notifications that can be sent |
| 47 | * | 48 | * |
| 48 | * For use with np_post_notification() (client --> device) | 49 | * For use with np_post_notification() (client --> device) |
| 49 | */ | 50 | */ |
| 51 | /**@{*/ | ||
| 52 | //! @cond | ||
| 50 | #define NP_SYNC_WILL_START "com.apple.itunes-mobdev.syncWillStart" | 53 | #define NP_SYNC_WILL_START "com.apple.itunes-mobdev.syncWillStart" |
| 51 | #define NP_SYNC_DID_START "com.apple.itunes-mobdev.syncDidStart" | 54 | #define NP_SYNC_DID_START "com.apple.itunes-mobdev.syncDidStart" |
| 52 | #define NP_SYNC_DID_FINISH "com.apple.itunes-mobdev.syncDidFinish" | 55 | #define NP_SYNC_DID_FINISH "com.apple.itunes-mobdev.syncDidFinish" |
| 53 | #define NP_SYNC_LOCK_REQUEST "com.apple.itunes-mobdev.syncLockRequest" | 56 | #define NP_SYNC_LOCK_REQUEST "com.apple.itunes-mobdev.syncLockRequest" |
| 54 | /*@}*/ | 57 | //! @endcond |
| 58 | /**@}*/ | ||
| 55 | 59 | ||
| 56 | /** | 60 | /** |
| 57 | * @name Notifications that can be received | 61 | * @name Notifications that can be received |
| 58 | * | 62 | * |
| 59 | * For use with np_observe_notification() (device --> client) | 63 | * For use with np_observe_notification() (device --> client) |
| 60 | */ | 64 | */ |
| 61 | /*@{*/ | 65 | /**@{*/ |
| 66 | //! @cond | ||
| 62 | #define NP_SYNC_CANCEL_REQUEST "com.apple.itunes-client.syncCancelRequest" | 67 | #define NP_SYNC_CANCEL_REQUEST "com.apple.itunes-client.syncCancelRequest" |
| 63 | #define NP_SYNC_SUSPEND_REQUEST "com.apple.itunes-client.syncSuspendRequest" | 68 | #define NP_SYNC_SUSPEND_REQUEST "com.apple.itunes-client.syncSuspendRequest" |
| 64 | #define NP_SYNC_RESUME_REQUEST "com.apple.itunes-client.syncResumeRequest" | 69 | #define NP_SYNC_RESUME_REQUEST "com.apple.itunes-client.syncResumeRequest" |
| @@ -81,12 +86,13 @@ typedef enum { | |||
| 81 | #define NP_ITDBPREP_DID_END "com.apple.itdbprep.notification.didEnd" | 86 | #define NP_ITDBPREP_DID_END "com.apple.itdbprep.notification.didEnd" |
| 82 | #define NP_LANGUAGE_CHANGED "com.apple.language.changed" | 87 | #define NP_LANGUAGE_CHANGED "com.apple.language.changed" |
| 83 | #define NP_ADDRESS_BOOK_PREF_CHANGED "com.apple.AddressBook.PreferenceChanged" | 88 | #define NP_ADDRESS_BOOK_PREF_CHANGED "com.apple.AddressBook.PreferenceChanged" |
| 84 | /*@}*/ | 89 | //! @endcond |
| 90 | /**@}*/ | ||
| 85 | 91 | ||
| 86 | typedef struct np_client_private np_client_private; | 92 | typedef struct np_client_private np_client_private; /**< \private */ |
| 87 | typedef np_client_private *np_client_t; /**< The client handle. */ | 93 | typedef np_client_private *np_client_t; /**< The client handle. */ |
| 88 | 94 | ||
| 89 | /** Reports which notification was received. */ | 95 | /** Callback function that reports which notification was received. */ |
| 90 | typedef void (*np_notify_cb_t) (const char *notification, void *user_data); | 96 | typedef void (*np_notify_cb_t) (const char *notification, void *user_data); |
| 91 | 97 | ||
| 92 | /* Interface */ | 98 | /* Interface */ |
| @@ -177,7 +183,7 @@ np_error_t np_observe_notifications(np_client_t client, const char **notificatio | |||
| 177 | * @param client the NP client | 183 | * @param client the NP client |
| 178 | * @param notify_cb pointer to a callback function or NULL to de-register a | 184 | * @param notify_cb pointer to a callback function or NULL to de-register a |
| 179 | * previously set callback function. | 185 | * previously set callback function. |
| 180 | * @param user_data Pointer that will be passed to the callback function as | 186 | * @param userdata Pointer that will be passed to the callback function as |
| 181 | * user data. If notify_cb is NULL, this parameter is ignored. | 187 | * user data. If notify_cb is NULL, this parameter is ignored. |
| 182 | * | 188 | * |
| 183 | * @note Only one callback function can be registered at the same time; | 189 | * @note Only one callback function can be registered at the same time; |
diff --git a/include/libimobiledevice/preboard.h b/include/libimobiledevice/preboard.h index 60b8e26..88e9806 100644 --- a/include/libimobiledevice/preboard.h +++ b/include/libimobiledevice/preboard.h | |||
| @@ -30,6 +30,7 @@ extern "C" { | |||
| 30 | #include <libimobiledevice/libimobiledevice.h> | 30 | #include <libimobiledevice/libimobiledevice.h> |
| 31 | #include <libimobiledevice/lockdown.h> | 31 | #include <libimobiledevice/lockdown.h> |
| 32 | 32 | ||
| 33 | /** Service identifier passed to lockdownd_start_service() to start the preboard service */ | ||
| 33 | #define PREBOARD_SERVICE_NAME "com.apple.preboardservice_v2" | 34 | #define PREBOARD_SERVICE_NAME "com.apple.preboardservice_v2" |
| 34 | 35 | ||
| 35 | /** Error Codes */ | 36 | /** Error Codes */ |
| @@ -45,7 +46,7 @@ typedef enum { | |||
| 45 | PREBOARD_E_UNKNOWN_ERROR = -256 | 46 | PREBOARD_E_UNKNOWN_ERROR = -256 |
| 46 | } preboard_error_t; | 47 | } preboard_error_t; |
| 47 | 48 | ||
| 48 | typedef struct preboard_client_private preboard_client_private; | 49 | typedef struct preboard_client_private preboard_client_private; /**< \private */ |
| 49 | typedef preboard_client_private *preboard_client_t; /**< The client handle. */ | 50 | typedef preboard_client_private *preboard_client_t; /**< The client handle. */ |
| 50 | 51 | ||
| 51 | /** Reports the status response of the given command */ | 52 | /** Reports the status response of the given command */ |
| @@ -121,6 +122,7 @@ preboard_error_t preboard_receive(preboard_client_t client, plist_t * plist); | |||
| 121 | * | 122 | * |
| 122 | * @param client The preboard client | 123 | * @param client The preboard client |
| 123 | * @param plist Pointer to a plist_t what will be set to the received plist | 124 | * @param plist Pointer to a plist_t what will be set to the received plist |
| 125 | * @param timeout_ms Timeout in milliseconds | ||
| 124 | * | 126 | * |
| 125 | * @return PREBOARD_E_SUCCESS on success, | 127 | * @return PREBOARD_E_SUCCESS on success, |
| 126 | * PREBOARD_E_INVALID_ARG when client or plist is NULL, | 128 | * PREBOARD_E_INVALID_ARG when client or plist is NULL, |
| @@ -148,7 +150,7 @@ preboard_error_t preboard_receive_with_timeout(preboard_client_t client, plist_t | |||
| 148 | * { Timeout: true } | 150 | * { Timeout: true } |
| 149 | * followed by { HideDialog: true } | 151 | * followed by { HideDialog: true } |
| 150 | * If the user aborts the passcode entry, the device sends a dictionary: | 152 | * If the user aborts the passcode entry, the device sends a dictionary: |
| 151 | * { Error: 1, ErrorString: <error string> } | 153 | * { Error: 1, ErrorString: \<error string\> } |
| 152 | * followed by { HideDialog: true } | 154 | * followed by { HideDialog: true } |
| 153 | * | 155 | * |
| 154 | * @return PREBOARD_E_SUCCESS if the command was successfully submitted, | 156 | * @return PREBOARD_E_SUCCESS if the command was successfully submitted, |
| @@ -170,7 +172,7 @@ preboard_error_t preboard_create_stashbag(preboard_client_t client, plist_t mani | |||
| 170 | * receive a dictionary with: | 172 | * receive a dictionary with: |
| 171 | * { StashbagCommitComplete: true } | 173 | * { StashbagCommitComplete: true } |
| 172 | * or in case of an error: | 174 | * or in case of an error: |
| 173 | * { StashbagCommitComplete: 0, Error: 1, <optional> ErrorString: <error string> } | 175 | * { StashbagCommitComplete: 0, Error: 1, \<optional\> ErrorString: \<error string\> } |
| 174 | * | 176 | * |
| 175 | * @return PREBOARD_E_SUCCESS if the command was successfully submitted, | 177 | * @return PREBOARD_E_SUCCESS if the command was successfully submitted, |
| 176 | * PREBOARD_E_INVALID_ARG when client is invalid, | 178 | * PREBOARD_E_INVALID_ARG when client is invalid, |
diff --git a/include/libimobiledevice/property_list_service.h b/include/libimobiledevice/property_list_service.h index 031d6f8..5205551 100644 --- a/include/libimobiledevice/property_list_service.h +++ b/include/libimobiledevice/property_list_service.h | |||
| @@ -30,7 +30,7 @@ extern "C" { | |||
| 30 | 30 | ||
| 31 | #include <libimobiledevice/lockdown.h> | 31 | #include <libimobiledevice/lockdown.h> |
| 32 | 32 | ||
| 33 | /* Error Codes */ | 33 | /** Error Codes */ |
| 34 | typedef enum { | 34 | typedef enum { |
| 35 | PROPERTY_LIST_SERVICE_E_SUCCESS = 0, | 35 | PROPERTY_LIST_SERVICE_E_SUCCESS = 0, |
| 36 | PROPERTY_LIST_SERVICE_E_INVALID_ARG = -1, | 36 | PROPERTY_LIST_SERVICE_E_INVALID_ARG = -1, |
| @@ -42,7 +42,7 @@ typedef enum { | |||
| 42 | PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR = -256 | 42 | PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR = -256 |
| 43 | } property_list_service_error_t; | 43 | } property_list_service_error_t; |
| 44 | 44 | ||
| 45 | typedef struct property_list_service_client_private property_list_service_private; | 45 | typedef struct property_list_service_client_private property_list_service_private; /**< \private */ |
| 46 | typedef property_list_service_private* property_list_service_client_t; /**< The client handle. */ | 46 | typedef property_list_service_private* property_list_service_client_t; /**< The client handle. */ |
| 47 | 47 | ||
| 48 | /* Interface */ | 48 | /* Interface */ |
diff --git a/include/libimobiledevice/restore.h b/include/libimobiledevice/restore.h index 950f8fd..0017cfd 100644 --- a/include/libimobiledevice/restore.h +++ b/include/libimobiledevice/restore.h | |||
| @@ -42,7 +42,7 @@ typedef enum { | |||
| 42 | RESTORE_E_UNKNOWN_ERROR = -256 | 42 | RESTORE_E_UNKNOWN_ERROR = -256 |
| 43 | } restored_error_t; | 43 | } restored_error_t; |
| 44 | 44 | ||
| 45 | typedef struct restored_client_private restored_client_private; | 45 | typedef struct restored_client_private restored_client_private; /**< \private */ |
| 46 | typedef restored_client_private *restored_client_t; /**< The client handle. */ | 46 | typedef restored_client_private *restored_client_t; /**< The client handle. */ |
| 47 | 47 | ||
| 48 | /* Interface */ | 48 | /* Interface */ |
diff --git a/include/libimobiledevice/reverse_proxy.h b/include/libimobiledevice/reverse_proxy.h index 2539bd9..b7a93ff 100644 --- a/include/libimobiledevice/reverse_proxy.h +++ b/include/libimobiledevice/reverse_proxy.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | * @file libimobiledevice/reverse_proxy.h | 2 | * @file libimobiledevice/reverse_proxy.h |
| 3 | * @brief Provide a reverse proxy to allow the device to communicate through, | 3 | * @brief Provide a reverse proxy to allow the device to communicate through, |
| 4 | * which is used during firmware restore. | 4 | * which is used during firmware restore. |
| 5 | * \internal | ||
| 5 | * | 6 | * |
| 6 | * Copyright (c) 2021 Nikias Bassen, All Rights Reserved. | 7 | * Copyright (c) 2021 Nikias Bassen, All Rights Reserved. |
| 7 | * | 8 | * |
| @@ -29,7 +30,7 @@ extern "C" { | |||
| 29 | 30 | ||
| 30 | #include <libimobiledevice/libimobiledevice.h> | 31 | #include <libimobiledevice/libimobiledevice.h> |
| 31 | 32 | ||
| 32 | #define REVERSE_PROXY_DEFAULT_PORT 1082 | 33 | #define REVERSE_PROXY_DEFAULT_PORT 1082 /**< default port the reverse proxy is listening on */ |
| 33 | 34 | ||
| 34 | /** Error Codes */ | 35 | /** Error Codes */ |
| 35 | typedef enum { | 36 | typedef enum { |
| @@ -43,14 +44,16 @@ typedef enum { | |||
| 43 | REVERSE_PROXY_E_UNKNOWN_ERROR = -256 | 44 | REVERSE_PROXY_E_UNKNOWN_ERROR = -256 |
| 44 | } reverse_proxy_error_t; | 45 | } reverse_proxy_error_t; |
| 45 | 46 | ||
| 46 | typedef struct reverse_proxy_client_private reverse_proxy_client_private; | 47 | typedef struct reverse_proxy_client_private reverse_proxy_client_private; /**< \private */ |
| 47 | typedef reverse_proxy_client_private *reverse_proxy_client_t; /**< The client handle. */ | 48 | typedef reverse_proxy_client_private *reverse_proxy_client_t; /**< The client handle. */ |
| 48 | 49 | ||
| 50 | /** reverse proxy client type */ | ||
| 49 | typedef enum { | 51 | typedef enum { |
| 50 | RP_TYPE_CTRL = 1, /**< control connection */ | 52 | RP_TYPE_CTRL = 1, /**< control connection */ |
| 51 | RP_TYPE_CONN /**< proxy connection */ | 53 | RP_TYPE_CONN /**< proxy connection */ |
| 52 | } reverse_proxy_client_type_t; | 54 | } reverse_proxy_client_type_t; |
| 53 | 55 | ||
| 56 | /** reverse proxy status for reverse_proxy_status_cb_t callback */ | ||
| 54 | typedef enum { | 57 | typedef enum { |
| 55 | RP_STATUS_READY = 1, /**< proxy is ready */ | 58 | RP_STATUS_READY = 1, /**< proxy is ready */ |
| 56 | RP_STATUS_TERMINATE, /**< proxy terminated */ | 59 | RP_STATUS_TERMINATE, /**< proxy terminated */ |
| @@ -60,6 +63,7 @@ typedef enum { | |||
| 60 | RP_STATUS_DISCONNECTED, /**< connection closed (only RP_TYPE_CONN) */ | 63 | RP_STATUS_DISCONNECTED, /**< connection closed (only RP_TYPE_CONN) */ |
| 61 | } reverse_proxy_status_t; | 64 | } reverse_proxy_status_t; |
| 62 | 65 | ||
| 66 | /** reverse proxy data direction passed to reverse_proxy_data_cb_t callback */ | ||
| 63 | typedef enum { | 67 | typedef enum { |
| 64 | RP_DATA_DIRECTION_OUT = 1, /**< data going out to remote host */ | 68 | RP_DATA_DIRECTION_OUT = 1, /**< data going out to remote host */ |
| 65 | RP_DATA_DIRECTION_IN /**< data coming in from remote host */ | 69 | RP_DATA_DIRECTION_IN /**< data coming in from remote host */ |
diff --git a/include/libimobiledevice/sbservices.h b/include/libimobiledevice/sbservices.h index 0259d97..509d5b9 100644 --- a/include/libimobiledevice/sbservices.h +++ b/include/libimobiledevice/sbservices.h | |||
| @@ -31,6 +31,7 @@ extern "C" { | |||
| 31 | #include <libimobiledevice/libimobiledevice.h> | 31 | #include <libimobiledevice/libimobiledevice.h> |
| 32 | #include <libimobiledevice/lockdown.h> | 32 | #include <libimobiledevice/lockdown.h> |
| 33 | 33 | ||
| 34 | /** Service identifier passed to lockdownd_start_service() to start the springboardservices service */ | ||
| 34 | #define SBSERVICES_SERVICE_NAME "com.apple.springboardservices" | 35 | #define SBSERVICES_SERVICE_NAME "com.apple.springboardservices" |
| 35 | 36 | ||
| 36 | /** Error Codes */ | 37 | /** Error Codes */ |
| @@ -42,8 +43,7 @@ typedef enum { | |||
| 42 | SBSERVICES_E_UNKNOWN_ERROR = -256 | 43 | SBSERVICES_E_UNKNOWN_ERROR = -256 |
| 43 | } sbservices_error_t; | 44 | } sbservices_error_t; |
| 44 | 45 | ||
| 45 | /** @name Orientation of the user interface on the device */ | 46 | /** Orientation of the user interface on the device */ |
| 46 | /*@{*/ | ||
| 47 | typedef enum { | 47 | typedef enum { |
| 48 | SBSERVICES_INTERFACE_ORIENTATION_UNKNOWN = 0, | 48 | SBSERVICES_INTERFACE_ORIENTATION_UNKNOWN = 0, |
| 49 | SBSERVICES_INTERFACE_ORIENTATION_PORTRAIT = 1, | 49 | SBSERVICES_INTERFACE_ORIENTATION_PORTRAIT = 1, |
| @@ -51,9 +51,8 @@ typedef enum { | |||
| 51 | SBSERVICES_INTERFACE_ORIENTATION_LANDSCAPE_RIGHT = 3, | 51 | SBSERVICES_INTERFACE_ORIENTATION_LANDSCAPE_RIGHT = 3, |
| 52 | SBSERVICES_INTERFACE_ORIENTATION_LANDSCAPE_LEFT = 4 | 52 | SBSERVICES_INTERFACE_ORIENTATION_LANDSCAPE_LEFT = 4 |
| 53 | } sbservices_interface_orientation_t; | 53 | } sbservices_interface_orientation_t; |
| 54 | /*@}*/ | ||
| 55 | 54 | ||
| 56 | typedef struct sbservices_client_private sbservices_client_private; | 55 | typedef struct sbservices_client_private sbservices_client_private; /**< \private */ |
| 57 | typedef sbservices_client_private *sbservices_client_t; /**< The client handle. */ | 56 | typedef sbservices_client_private *sbservices_client_t; /**< The client handle. */ |
| 58 | 57 | ||
| 59 | /* Interface */ | 58 | /* Interface */ |
diff --git a/include/libimobiledevice/screenshotr.h b/include/libimobiledevice/screenshotr.h index 83ca96b..ecbbdbe 100644 --- a/include/libimobiledevice/screenshotr.h +++ b/include/libimobiledevice/screenshotr.h | |||
| @@ -32,6 +32,7 @@ extern "C" { | |||
| 32 | #include <libimobiledevice/libimobiledevice.h> | 32 | #include <libimobiledevice/libimobiledevice.h> |
| 33 | #include <libimobiledevice/lockdown.h> | 33 | #include <libimobiledevice/lockdown.h> |
| 34 | 34 | ||
| 35 | /** Service identifier passed to lockdownd_start_service() to start the screenshotr service */ | ||
| 35 | #define SCREENSHOTR_SERVICE_NAME "com.apple.mobile.screenshotr" | 36 | #define SCREENSHOTR_SERVICE_NAME "com.apple.mobile.screenshotr" |
| 36 | 37 | ||
| 37 | /** Error Codes */ | 38 | /** Error Codes */ |
| @@ -46,7 +47,7 @@ typedef enum { | |||
| 46 | SCREENSHOTR_E_UNKNOWN_ERROR = -256 | 47 | SCREENSHOTR_E_UNKNOWN_ERROR = -256 |
| 47 | } screenshotr_error_t; | 48 | } screenshotr_error_t; |
| 48 | 49 | ||
| 49 | typedef struct screenshotr_client_private screenshotr_client_private; | 50 | typedef struct screenshotr_client_private screenshotr_client_private; /**< \private */ |
| 50 | typedef screenshotr_client_private *screenshotr_client_t; /**< The client handle. */ | 51 | typedef screenshotr_client_private *screenshotr_client_t; /**< The client handle. */ |
| 51 | 52 | ||
| 52 | 53 | ||
diff --git a/include/libimobiledevice/service.h b/include/libimobiledevice/service.h index 13d0e15..6842054 100644 --- a/include/libimobiledevice/service.h +++ b/include/libimobiledevice/service.h | |||
| @@ -42,9 +42,10 @@ typedef enum { | |||
| 42 | SERVICE_E_UNKNOWN_ERROR = -256 | 42 | SERVICE_E_UNKNOWN_ERROR = -256 |
| 43 | } service_error_t; | 43 | } service_error_t; |
| 44 | 44 | ||
| 45 | typedef struct service_client_private service_client_private; | 45 | typedef struct service_client_private service_client_private; /**< \private */ |
| 46 | typedef service_client_private* service_client_t; /**< The client handle. */ | 46 | typedef service_client_private* service_client_t; /**< The client handle. */ |
| 47 | 47 | ||
| 48 | /** service constructor cast */ | ||
| 48 | #define SERVICE_CONSTRUCTOR(x) (int32_t (*)(idevice_t, lockdownd_service_descriptor_t, void**))(x) | 49 | #define SERVICE_CONSTRUCTOR(x) (int32_t (*)(idevice_t, lockdownd_service_descriptor_t, void**))(x) |
| 49 | 50 | ||
| 50 | /* Interface */ | 51 | /* Interface */ |
| @@ -74,6 +75,8 @@ service_error_t service_client_new(idevice_t device, lockdownd_service_descripto | |||
| 74 | * use. | 75 | * use. |
| 75 | * @param label The label to use for communication. Usually the program name. | 76 | * @param label The label to use for communication. Usually the program name. |
| 76 | * Pass NULL to disable sending the label in requests to lockdownd. | 77 | * Pass NULL to disable sending the label in requests to lockdownd. |
| 78 | * @param constructor_func Constructor function for the service client to create (e.g. afc_client_new()) | ||
| 79 | * @param error_code Pointer to an int32_t that will receive the service start error code. | ||
| 77 | * | 80 | * |
| 78 | * @return SERVICE_E_SUCCESS on success, or a SERVICE_E_* error code | 81 | * @return SERVICE_E_SUCCESS on success, or a SERVICE_E_* error code |
| 79 | * otherwise. | 82 | * otherwise. |
| @@ -160,7 +163,7 @@ service_error_t service_enable_ssl(service_client_t client); | |||
| 160 | /** | 163 | /** |
| 161 | * Disable SSL for the given service client. | 164 | * Disable SSL for the given service client. |
| 162 | * | 165 | * |
| 163 | * @param client The connected service client for that SSL should be disabled. | 166 | * @param client The connected service client for which SSL should be disabled. |
| 164 | * | 167 | * |
| 165 | * @return SERVICE_E_SUCCESS on success, | 168 | * @return SERVICE_E_SUCCESS on success, |
| 166 | * SERVICE_E_INVALID_ARG if client or client->connection is | 169 | * SERVICE_E_INVALID_ARG if client or client->connection is |
| @@ -169,9 +172,11 @@ service_error_t service_enable_ssl(service_client_t client); | |||
| 169 | service_error_t service_disable_ssl(service_client_t client); | 172 | service_error_t service_disable_ssl(service_client_t client); |
| 170 | 173 | ||
| 171 | /** | 174 | /** |
| 172 | * Disable SSL for the given service client without sending SSL terminate messages. | 175 | * Disable SSL for the given service client, optionally without sending SSL terminate messages. |
| 173 | * | 176 | * |
| 174 | * @param client The connected service client for that SSL should be disabled. | 177 | * @param client The connected service client for which SSL should be disabled. |
| 178 | * @param sslBypass A boolean value indicating wether to disable SSL with a proper | ||
| 179 | * SSL shutdown (0), or bypass the shutdown (1). | ||
| 175 | * | 180 | * |
| 176 | * @return SERVICE_E_SUCCESS on success, | 181 | * @return SERVICE_E_SUCCESS on success, |
| 177 | * SERVICE_E_INVALID_ARG if client or client->connection is | 182 | * SERVICE_E_INVALID_ARG if client or client->connection is |
diff --git a/include/libimobiledevice/syslog_relay.h b/include/libimobiledevice/syslog_relay.h index 89d9489..aae5d11 100644 --- a/include/libimobiledevice/syslog_relay.h +++ b/include/libimobiledevice/syslog_relay.h | |||
| @@ -31,6 +31,7 @@ extern "C" { | |||
| 31 | #include <libimobiledevice/libimobiledevice.h> | 31 | #include <libimobiledevice/libimobiledevice.h> |
| 32 | #include <libimobiledevice/lockdown.h> | 32 | #include <libimobiledevice/lockdown.h> |
| 33 | 33 | ||
| 34 | /** Service identifier passed to lockdownd_start_service() to start the syslog relay service */ | ||
| 34 | #define SYSLOG_RELAY_SERVICE_NAME "com.apple.syslog_relay" | 35 | #define SYSLOG_RELAY_SERVICE_NAME "com.apple.syslog_relay" |
| 35 | 36 | ||
| 36 | /** Error Codes */ | 37 | /** Error Codes */ |
| @@ -44,7 +45,7 @@ typedef enum { | |||
| 44 | SYSLOG_RELAY_E_UNKNOWN_ERROR = -256 | 45 | SYSLOG_RELAY_E_UNKNOWN_ERROR = -256 |
| 45 | } syslog_relay_error_t; | 46 | } syslog_relay_error_t; |
| 46 | 47 | ||
| 47 | typedef struct syslog_relay_client_private syslog_relay_client_private; | 48 | typedef struct syslog_relay_client_private syslog_relay_client_private; /**< \private */ |
| 48 | typedef syslog_relay_client_private *syslog_relay_client_t; /**< The client handle. */ | 49 | typedef syslog_relay_client_private *syslog_relay_client_t; /**< The client handle. */ |
| 49 | 50 | ||
| 50 | /** Receives each character received from the device. */ | 51 | /** Receives each character received from the device. */ |
| @@ -170,7 +171,6 @@ syslog_relay_error_t syslog_relay_receive_with_timeout(syslog_relay_client_t cli | |||
| 170 | * @param data Buffer that will be filled with the data received | 171 | * @param data Buffer that will be filled with the data received |
| 171 | * @param size Number of bytes to receive | 172 | * @param size Number of bytes to receive |
| 172 | * @param received Number of bytes received (can be NULL to ignore) | 173 | * @param received Number of bytes received (can be NULL to ignore) |
| 173 | * @param timeout Maximum time in milliseconds to wait for data. | ||
| 174 | * | 174 | * |
| 175 | * @return SYSLOG_RELAY_E_SUCCESS on success, | 175 | * @return SYSLOG_RELAY_E_SUCCESS on success, |
| 176 | * SYSLOG_RELAY_E_INVALID_ARG when client or plist is NULL | 176 | * SYSLOG_RELAY_E_INVALID_ARG when client or plist is NULL |
diff --git a/include/libimobiledevice/webinspector.h b/include/libimobiledevice/webinspector.h index da0759c..064ba91 100644 --- a/include/libimobiledevice/webinspector.h +++ b/include/libimobiledevice/webinspector.h | |||
| @@ -31,6 +31,7 @@ extern "C" { | |||
| 31 | #include <libimobiledevice/libimobiledevice.h> | 31 | #include <libimobiledevice/libimobiledevice.h> |
| 32 | #include <libimobiledevice/lockdown.h> | 32 | #include <libimobiledevice/lockdown.h> |
| 33 | 33 | ||
| 34 | /** Service identifier passed to lockdownd_start_service() to start the webinspector service */ | ||
| 34 | #define WEBINSPECTOR_SERVICE_NAME "com.apple.webinspector" | 35 | #define WEBINSPECTOR_SERVICE_NAME "com.apple.webinspector" |
| 35 | 36 | ||
| 36 | /** Error Codes */ | 37 | /** Error Codes */ |
| @@ -45,7 +46,7 @@ typedef enum { | |||
| 45 | WEBINSPECTOR_E_UNKNOWN_ERROR = -256 | 46 | WEBINSPECTOR_E_UNKNOWN_ERROR = -256 |
| 46 | } webinspector_error_t; | 47 | } webinspector_error_t; |
| 47 | 48 | ||
| 48 | typedef struct webinspector_client_private webinspector_client_private; | 49 | typedef struct webinspector_client_private webinspector_client_private; /**< \private */ |
| 49 | typedef webinspector_client_private *webinspector_client_t; /**< The client handle. */ | 50 | typedef webinspector_client_private *webinspector_client_t; /**< The client handle. */ |
| 50 | 51 | ||
| 51 | 52 | ||
| @@ -118,7 +119,7 @@ webinspector_error_t webinspector_receive(webinspector_client_t client, plist_t | |||
| 118 | * @param client The webinspector client to use for receiving | 119 | * @param client The webinspector client to use for receiving |
| 119 | * @param plist pointer to a plist_t that will point to the received plist | 120 | * @param plist pointer to a plist_t that will point to the received plist |
| 120 | * upon successful return | 121 | * upon successful return |
| 121 | * @param timeout Maximum time in milliseconds to wait for data. | 122 | * @param timeout_ms Maximum time in milliseconds to wait for data. |
| 122 | * | 123 | * |
| 123 | * @return WEBINSPECTOR_E_SUCCESS on success, | 124 | * @return WEBINSPECTOR_E_SUCCESS on success, |
| 124 | * WEBINSPECTOR_E_INVALID_ARG when client or *plist is NULL, | 125 | * WEBINSPECTOR_E_INVALID_ARG when client or *plist is NULL, |
