diff options
| author | 2014-03-27 10:07:09 -0400 | |
|---|---|---|
| committer | 2014-03-27 21:40:43 -0400 | |
| commit | 2342dc5b4ef148b993fbe3816f3facdef8365546 (patch) | |
| tree | 69f812d91b2fc07db0fad5dcba6c80d2f8b6849e /src/mobile_image_mounter.c | |
| parent | ee82e861a8c942b5013accd7589cf898d1f97167 (diff) | |
| download | libimobiledevice-2342dc5b4ef148b993fbe3816f3facdef8365546.tar.gz libimobiledevice-2342dc5b4ef148b993fbe3816f3facdef8365546.tar.bz2 | |
Moved Doxygen comments from source files to public headers.
Conflicts:
include/libimobiledevice/afc.h
Diffstat (limited to 'src/mobile_image_mounter.c')
| -rw-r--r-- | src/mobile_image_mounter.c | 93 |
1 files changed, 0 insertions, 93 deletions
diff --git a/src/mobile_image_mounter.c b/src/mobile_image_mounter.c index 4b2818d..7133b8b 100644 --- a/src/mobile_image_mounter.c +++ b/src/mobile_image_mounter.c | |||
| @@ -75,19 +75,6 @@ static mobile_image_mounter_error_t mobile_image_mounter_error(property_list_ser | |||
| 75 | return MOBILE_IMAGE_MOUNTER_E_UNKNOWN_ERROR; | 75 | return MOBILE_IMAGE_MOUNTER_E_UNKNOWN_ERROR; |
| 76 | } | 76 | } |
| 77 | 77 | ||
| 78 | /** | ||
| 79 | * Connects to the mobile_image_mounter service on the specified device. | ||
| 80 | * | ||
| 81 | * @param device The device to connect to. | ||
| 82 | * @param service The service descriptor returned by lockdownd_start_service. | ||
| 83 | * @param client Pointer that will be set to a newly allocated | ||
| 84 | * mobile_image_mounter_client_t upon successful return. | ||
| 85 | * | ||
| 86 | * @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on success, | ||
| 87 | * MOBILE_IMAGE_MOUNTER_E_INVALID_ARG if device is NULL, | ||
| 88 | * or MOBILE_IMAGE_MOUNTER_E_CONN_FAILED if the connection to the | ||
| 89 | * device could not be established. | ||
| 90 | */ | ||
| 91 | mobile_image_mounter_error_t mobile_image_mounter_new(idevice_t device, lockdownd_service_descriptor_t service, mobile_image_mounter_client_t *client) | 78 | mobile_image_mounter_error_t mobile_image_mounter_new(idevice_t device, lockdownd_service_descriptor_t service, mobile_image_mounter_client_t *client) |
| 92 | { | 79 | { |
| 93 | property_list_service_client_t plistclient = NULL; | 80 | property_list_service_client_t plistclient = NULL; |
| @@ -105,19 +92,6 @@ mobile_image_mounter_error_t mobile_image_mounter_new(idevice_t device, lockdown | |||
| 105 | return MOBILE_IMAGE_MOUNTER_E_SUCCESS; | 92 | return MOBILE_IMAGE_MOUNTER_E_SUCCESS; |
| 106 | } | 93 | } |
| 107 | 94 | ||
| 108 | /** | ||
| 109 | * Starts a new mobile_image_mounter service on the specified device and connects to it. | ||
| 110 | * | ||
| 111 | * @param device The device to connect to. | ||
| 112 | * @param client Pointer that will point to a newly allocated | ||
| 113 | * mobile_image_mounter_t upon successful return. Must be freed using | ||
| 114 | * mobile_image_mounter_free() after use. | ||
| 115 | * @param label The label to use for communication. Usually the program name. | ||
| 116 | * Pass NULL to disable sending the label in requests to lockdownd. | ||
| 117 | * | ||
| 118 | * @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on success, or an MOBILE_IMAGE_MOUNTER_E_* error | ||
| 119 | * code otherwise. | ||
| 120 | */ | ||
| 121 | mobile_image_mounter_error_t mobile_image_mounter_start_service(idevice_t device, mobile_image_mounter_client_t * client, const char* label) | 95 | mobile_image_mounter_error_t mobile_image_mounter_start_service(idevice_t device, mobile_image_mounter_client_t * client, const char* label) |
| 122 | { | 96 | { |
| 123 | mobile_image_mounter_error_t err = MOBILE_IMAGE_MOUNTER_E_UNKNOWN_ERROR; | 97 | mobile_image_mounter_error_t err = MOBILE_IMAGE_MOUNTER_E_UNKNOWN_ERROR; |
| @@ -125,15 +99,6 @@ mobile_image_mounter_error_t mobile_image_mounter_start_service(idevice_t device | |||
| 125 | return err; | 99 | return err; |
| 126 | } | 100 | } |
| 127 | 101 | ||
| 128 | /** | ||
| 129 | * Disconnects a mobile_image_mounter client from the device and frees up the | ||
| 130 | * mobile_image_mounter client data. | ||
| 131 | * | ||
| 132 | * @param client The mobile_image_mounter client to disconnect and free. | ||
| 133 | * | ||
| 134 | * @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on success, | ||
| 135 | * or MOBILE_IMAGE_MOUNTER_E_INVALID_ARG if client is NULL. | ||
| 136 | */ | ||
| 137 | mobile_image_mounter_error_t mobile_image_mounter_free(mobile_image_mounter_client_t client) | 102 | mobile_image_mounter_error_t mobile_image_mounter_free(mobile_image_mounter_client_t client) |
| 138 | { | 103 | { |
| 139 | if (!client) | 104 | if (!client) |
| @@ -147,19 +112,6 @@ mobile_image_mounter_error_t mobile_image_mounter_free(mobile_image_mounter_clie | |||
| 147 | return MOBILE_IMAGE_MOUNTER_E_SUCCESS; | 112 | return MOBILE_IMAGE_MOUNTER_E_SUCCESS; |
| 148 | } | 113 | } |
| 149 | 114 | ||
| 150 | /** | ||
| 151 | * Tells if the image of ImageType is already mounted. | ||
| 152 | * | ||
| 153 | * @param client The client use | ||
| 154 | * @param image_type The type of the image to look up | ||
| 155 | * @param result Pointer to a plist that will receive the result of the | ||
| 156 | * operation. | ||
| 157 | * | ||
| 158 | * @note This function may return MOBILE_IMAGE_MOUNTER_E_SUCCESS even if the | ||
| 159 | * operation has failed. Check the resulting plist for further information. | ||
| 160 | * | ||
| 161 | * @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on success, or an error code on error | ||
| 162 | */ | ||
| 163 | mobile_image_mounter_error_t mobile_image_mounter_lookup_image(mobile_image_mounter_client_t client, const char *image_type, plist_t *result) | 115 | mobile_image_mounter_error_t mobile_image_mounter_lookup_image(mobile_image_mounter_client_t client, const char *image_type, plist_t *result) |
| 164 | { | 116 | { |
| 165 | if (!client || !image_type || !result) { | 117 | if (!client || !image_type || !result) { |
| @@ -189,19 +141,6 @@ leave_unlock: | |||
| 189 | return res; | 141 | return res; |
| 190 | } | 142 | } |
| 191 | 143 | ||
| 192 | /** | ||
| 193 | * Uploads an image to the device. | ||
| 194 | * | ||
| 195 | * @param client The connected mobile_image_mounter client. | ||
| 196 | * @param image_type Type of image that is being uploaded. | ||
| 197 | * @param image_size Total size of the image. | ||
| 198 | * @param upload_cb Callback function that gets the data chunks for uploading | ||
| 199 | * the image. | ||
| 200 | * @param userdata User defined data for the upload callback function. | ||
| 201 | * | ||
| 202 | * @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on succes, or a | ||
| 203 | * MOBILE_IMAGE_MOUNTER_E_* error code otherwise. | ||
| 204 | */ | ||
| 205 | mobile_image_mounter_error_t mobile_image_mounter_upload_image(mobile_image_mounter_client_t client, const char *image_type, size_t image_size, mobile_image_mounter_upload_cb_t upload_cb, void* userdata) | 144 | mobile_image_mounter_error_t mobile_image_mounter_upload_image(mobile_image_mounter_client_t client, const char *image_type, size_t image_size, mobile_image_mounter_upload_cb_t upload_cb, void* userdata) |
| 206 | { | 145 | { |
| 207 | if (!client || !image_type || (image_size == 0) || !upload_cb) { | 146 | if (!client || !image_type || (image_size == 0) || !upload_cb) { |
| @@ -311,27 +250,6 @@ leave_unlock: | |||
| 311 | 250 | ||
| 312 | } | 251 | } |
| 313 | 252 | ||
| 314 | /** | ||
| 315 | * Mounts an image on the device. | ||
| 316 | * | ||
| 317 | * @param client The connected mobile_image_mounter client. | ||
| 318 | * @param image_path The absolute path of the image to mount. The image must | ||
| 319 | * be present before calling this function. | ||
| 320 | * @param image_signature Pointer to a buffer holding the images' signature | ||
| 321 | * @param signature_length Length of the signature image_signature points to | ||
| 322 | * @param image_type Type of image to mount | ||
| 323 | * @param result Pointer to a plist that will receive the result of the | ||
| 324 | * operation. | ||
| 325 | * | ||
| 326 | * @note This function may return MOBILE_IMAGE_MOUNTER_E_SUCCESS even if the | ||
| 327 | * operation has failed. Check the resulting plist for further information. | ||
| 328 | * Note that there is no unmounting function. The mount persists until the | ||
| 329 | * device is rebooted. | ||
| 330 | * | ||
| 331 | * @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on success, | ||
| 332 | * MOBILE_IMAGE_MOUNTER_E_INVALID_ARG if on ore more parameters are | ||
| 333 | * invalid, or another error code otherwise. | ||
| 334 | */ | ||
| 335 | mobile_image_mounter_error_t mobile_image_mounter_mount_image(mobile_image_mounter_client_t client, const char *image_path, const char *image_signature, uint16_t signature_length, const char *image_type, plist_t *result) | 253 | mobile_image_mounter_error_t mobile_image_mounter_mount_image(mobile_image_mounter_client_t client, const char *image_path, const char *image_signature, uint16_t signature_length, const char *image_type, plist_t *result) |
| 336 | { | 254 | { |
| 337 | if (!client || !image_path || !image_signature || (signature_length == 0) || !image_type || !result) { | 255 | if (!client || !image_path || !image_signature || (signature_length == 0) || !image_type || !result) { |
| @@ -363,17 +281,6 @@ leave_unlock: | |||
| 363 | return res; | 281 | return res; |
| 364 | } | 282 | } |
| 365 | 283 | ||
| 366 | /** | ||
| 367 | * Hangs up the connection to the mobile_image_mounter service. | ||
| 368 | * This functions has to be called before freeing up a mobile_image_mounter | ||
| 369 | * instance. If not, errors appear in the device's syslog. | ||
| 370 | * | ||
| 371 | * @param client The client to hang up | ||
| 372 | * | ||
| 373 | * @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on success, | ||
| 374 | * MOBILE_IMAGE_MOUNTER_E_INVALID_ARG if client is invalid, | ||
| 375 | * or another error code otherwise. | ||
| 376 | */ | ||
| 377 | mobile_image_mounter_error_t mobile_image_mounter_hangup(mobile_image_mounter_client_t client) | 284 | mobile_image_mounter_error_t mobile_image_mounter_hangup(mobile_image_mounter_client_t client) |
| 378 | { | 285 | { |
| 379 | if (!client) { | 286 | if (!client) { |
