diff options
| author | 2014-03-27 10:07:09 -0400 | |
|---|---|---|
| committer | 2014-03-27 21:40:43 -0400 | |
| commit | 2342dc5b4ef148b993fbe3816f3facdef8365546 (patch) | |
| tree | 69f812d91b2fc07db0fad5dcba6c80d2f8b6849e /src/restore.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/restore.c')
| -rw-r--r-- | src/restore.c | 101 |
1 files changed, 1 insertions, 100 deletions
diff --git a/src/restore.c b/src/restore.c index 6339270..2a025e8 100644 --- a/src/restore.c +++ b/src/restore.c | |||
| @@ -89,14 +89,6 @@ static void plist_dict_add_label(plist_t plist, const char *label) | |||
| 89 | } | 89 | } |
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | /** | ||
| 93 | * Closes the restored client session if one is running and frees up the | ||
| 94 | * restored_client struct. | ||
| 95 | * | ||
| 96 | * @param client The restore client | ||
| 97 | * | ||
| 98 | * @return RESTORE_E_SUCCESS on success, NP_E_INVALID_ARG when client is NULL | ||
| 99 | */ | ||
| 100 | restored_error_t restored_client_free(restored_client_t client) | 92 | restored_error_t restored_client_free(restored_client_t client) |
| 101 | { | 93 | { |
| 102 | if (!client) | 94 | if (!client) |
| @@ -127,13 +119,6 @@ restored_error_t restored_client_free(restored_client_t client) | |||
| 127 | return ret; | 119 | return ret; |
| 128 | } | 120 | } |
| 129 | 121 | ||
| 130 | /** | ||
| 131 | * Sets the label to send for requests to restored. | ||
| 132 | * | ||
| 133 | * @param client The restore client | ||
| 134 | * @param label The label to set or NULL to disable sending a label | ||
| 135 | * | ||
| 136 | */ | ||
| 137 | void restored_client_set_label(restored_client_t client, const char *label) | 122 | void restored_client_set_label(restored_client_t client, const char *label) |
| 138 | { | 123 | { |
| 139 | if (client) { | 124 | if (client) { |
| @@ -144,15 +129,6 @@ void restored_client_set_label(restored_client_t client, const char *label) | |||
| 144 | } | 129 | } |
| 145 | } | 130 | } |
| 146 | 131 | ||
| 147 | /** | ||
| 148 | * Receives a plist from restored. | ||
| 149 | * | ||
| 150 | * @param client The restored client | ||
| 151 | * @param plist The plist to store the received data | ||
| 152 | * | ||
| 153 | * @return RESTORE_E_SUCCESS on success, NP_E_INVALID_ARG when client or | ||
| 154 | * plist is NULL | ||
| 155 | */ | ||
| 156 | restored_error_t restored_receive(restored_client_t client, plist_t *plist) | 132 | restored_error_t restored_receive(restored_client_t client, plist_t *plist) |
| 157 | { | 133 | { |
| 158 | if (!client || !plist || (plist && *plist)) | 134 | if (!client || !plist || (plist && *plist)) |
| @@ -172,18 +148,6 @@ restored_error_t restored_receive(restored_client_t client, plist_t *plist) | |||
| 172 | return ret; | 148 | return ret; |
| 173 | } | 149 | } |
| 174 | 150 | ||
| 175 | /** | ||
| 176 | * Sends a plist to restored. | ||
| 177 | * | ||
| 178 | * @note This function is low-level and should only be used if you need to send | ||
| 179 | * a new type of message. | ||
| 180 | * | ||
| 181 | * @param client The restored client | ||
| 182 | * @param plist The plist to send | ||
| 183 | * | ||
| 184 | * @return RESTORE_E_SUCCESS on success, NP_E_INVALID_ARG when client or | ||
| 185 | * plist is NULL | ||
| 186 | */ | ||
| 187 | restored_error_t restored_send(restored_client_t client, plist_t plist) | 151 | restored_error_t restored_send(restored_client_t client, plist_t plist) |
| 188 | { | 152 | { |
| 189 | if (!client || !plist) | 153 | if (!client || !plist) |
| @@ -199,16 +163,6 @@ restored_error_t restored_send(restored_client_t client, plist_t plist) | |||
| 199 | return ret; | 163 | return ret; |
| 200 | } | 164 | } |
| 201 | 165 | ||
| 202 | /** | ||
| 203 | * Query the type of the service daemon. Depending on whether the device is | ||
| 204 | * queried in normal mode or restore mode, different types will be returned. | ||
| 205 | * | ||
| 206 | * @param client The restored client | ||
| 207 | * @param type The type returned by the service daemon. Pass NULL to ignore. | ||
| 208 | * @param version The restore protocol version. Pass NULL to ignore. | ||
| 209 | * | ||
| 210 | * @return RESTORE_E_SUCCESS on success, NP_E_INVALID_ARG when client is NULL | ||
| 211 | */ | ||
| 212 | restored_error_t restored_query_type(restored_client_t client, char **type, uint64_t *version) | 166 | restored_error_t restored_query_type(restored_client_t client, char **type, uint64_t *version) |
| 213 | { | 167 | { |
| 214 | if (!client) | 168 | if (!client) |
| @@ -268,15 +222,6 @@ restored_error_t restored_query_type(restored_client_t client, char **type, uint | |||
| 268 | return ret; | 222 | return ret; |
| 269 | } | 223 | } |
| 270 | 224 | ||
| 271 | /** | ||
| 272 | * Queries a value from the device specified by a key. | ||
| 273 | * | ||
| 274 | * @param client An initialized restored client. | ||
| 275 | * @param key The key name to request | ||
| 276 | * @param value A plist node representing the result value node | ||
| 277 | * | ||
| 278 | * @return RESTORE_E_SUCCESS on success, NP_E_INVALID_ARG when client is NULL, RESTORE_E_PLIST_ERROR if value for key can't be found | ||
| 279 | */ | ||
| 280 | restored_error_t restored_query_value(restored_client_t client, const char *key, plist_t *value) | 225 | restored_error_t restored_query_value(restored_client_t client, const char *key, plist_t *value) |
| 281 | { | 226 | { |
| 282 | if (!client || !key) | 227 | if (!client || !key) |
| @@ -319,16 +264,7 @@ restored_error_t restored_query_value(restored_client_t client, const char *key, | |||
| 319 | return ret; | 264 | return ret; |
| 320 | } | 265 | } |
| 321 | 266 | ||
| 322 | /** | 267 | restored_error_t restored_get_value(restored_client_t client, const char *key, plist_t *value) |
| 323 | * Retrieves a value from information plist specified by a key. | ||
| 324 | * | ||
| 325 | * @param client An initialized restored client. | ||
| 326 | * @param key The key name to request or NULL to query for all keys | ||
| 327 | * @param value A plist node representing the result value node | ||
| 328 | * | ||
| 329 | * @return RESTORE_E_SUCCESS on success, NP_E_INVALID_ARG when client is NULL, RESTORE_E_PLIST_ERROR if value for key can't be found | ||
| 330 | */ | ||
| 331 | restored_error_t restored_get_value(restored_client_t client, const char *key, plist_t *value) | ||
| 332 | { | 268 | { |
| 333 | if (!client || !value || (value && *value)) | 269 | if (!client || !value || (value && *value)) |
| 334 | return RESTORE_E_INVALID_ARG; | 270 | return RESTORE_E_INVALID_ARG; |
| @@ -355,15 +291,6 @@ restored_error_t restored_get_value(restored_client_t client, const char *key, p | |||
| 355 | return ret; | 291 | return ret; |
| 356 | } | 292 | } |
| 357 | 293 | ||
| 358 | /** | ||
| 359 | * Creates a new restored client for the device. | ||
| 360 | * | ||
| 361 | * @param device The device to create a restored client for | ||
| 362 | * @param client The pointer to the location of the new restored_client | ||
| 363 | * @param label The label to use for communication. Usually the program name. | ||
| 364 | * | ||
| 365 | * @return RESTORE_E_SUCCESS on success, NP_E_INVALID_ARG when client is NULL | ||
| 366 | */ | ||
| 367 | restored_error_t restored_client_new(idevice_t device, restored_client_t *client, const char *label) | 294 | restored_error_t restored_client_new(idevice_t device, restored_client_t *client, const char *label) |
| 368 | { | 295 | { |
| 369 | if (!client) | 296 | if (!client) |
| @@ -405,14 +332,6 @@ restored_error_t restored_client_new(idevice_t device, restored_client_t *client | |||
| 405 | return ret; | 332 | return ret; |
| 406 | } | 333 | } |
| 407 | 334 | ||
| 408 | /** | ||
| 409 | * Sends the Goodbye request to restored signaling the end of communication. | ||
| 410 | * | ||
| 411 | * @param client The restore client | ||
| 412 | * | ||
| 413 | * @return RESTORE_E_SUCCESS on success, NP_E_INVALID_ARG when client is NULL, | ||
| 414 | * RESTORE_E_PLIST_ERROR if the device did not acknowledge the request | ||
| 415 | */ | ||
| 416 | restored_error_t restored_goodbye(restored_client_t client) | 335 | restored_error_t restored_goodbye(restored_client_t client) |
| 417 | { | 336 | { |
| 418 | if (!client) | 337 | if (!client) |
| @@ -445,16 +364,6 @@ restored_error_t restored_goodbye(restored_client_t client) | |||
| 445 | return ret; | 364 | return ret; |
| 446 | } | 365 | } |
| 447 | 366 | ||
| 448 | /** | ||
| 449 | * Requests to start a restore and retrieve it's port on success. | ||
| 450 | * | ||
| 451 | * @param client The restored client | ||
| 452 | * @param options PLIST_DICT with options for the restore process or NULL | ||
| 453 | * @param version the restore protocol version, see restored_query_type() | ||
| 454 | * | ||
| 455 | * @return RESTORE_E_SUCCESS on success, NP_E_INVALID_ARG if a parameter | ||
| 456 | * is NULL, RESTORE_E_START_RESTORE_FAILED if the request fails | ||
| 457 | */ | ||
| 458 | restored_error_t restored_start_restore(restored_client_t client, plist_t options, uint64_t version) | 367 | restored_error_t restored_start_restore(restored_client_t client, plist_t options, uint64_t version) |
| 459 | { | 368 | { |
| 460 | if (!client) | 369 | if (!client) |
| @@ -479,14 +388,6 @@ restored_error_t restored_start_restore(restored_client_t client, plist_t option | |||
| 479 | return ret; | 388 | return ret; |
| 480 | } | 389 | } |
| 481 | 390 | ||
| 482 | /** | ||
| 483 | * Requests device to reboot. | ||
| 484 | * | ||
| 485 | * @param client The restored client | ||
| 486 | * | ||
| 487 | * @return RESTORE_E_SUCCESS on success, NP_E_INVALID_ARG if a parameter | ||
| 488 | * is NULL | ||
| 489 | */ | ||
| 490 | restored_error_t restored_reboot(restored_client_t client) | 391 | restored_error_t restored_reboot(restored_client_t client) |
| 491 | { | 392 | { |
| 492 | if (!client) | 393 | if (!client) |
