diff options
| -rw-r--r-- | include/libimobiledevice/mobilebackup.h | 1 | ||||
| -rw-r--r-- | src/mobilebackup.c | 23 |
2 files changed, 24 insertions, 0 deletions
diff --git a/include/libimobiledevice/mobilebackup.h b/include/libimobiledevice/mobilebackup.h index bf405f9..8f31cc4 100644 --- a/include/libimobiledevice/mobilebackup.h +++ b/include/libimobiledevice/mobilebackup.h | |||
| @@ -61,6 +61,7 @@ mobilebackup_error_t mobilebackup_request_backup(mobilebackup_client_t client, p | |||
| 61 | mobilebackup_error_t mobilebackup_send_backup_file_received(mobilebackup_client_t client); | 61 | mobilebackup_error_t mobilebackup_send_backup_file_received(mobilebackup_client_t client); |
| 62 | mobilebackup_error_t mobilebackup_request_restore(mobilebackup_client_t client, plist_t backup_manifest, mobilebackup_flags_t flags, const char *proto_version); | 62 | mobilebackup_error_t mobilebackup_request_restore(mobilebackup_client_t client, plist_t backup_manifest, mobilebackup_flags_t flags, const char *proto_version); |
| 63 | mobilebackup_error_t mobilebackup_receive_restore_file_received(mobilebackup_client_t client, plist_t *result); | 63 | mobilebackup_error_t mobilebackup_receive_restore_file_received(mobilebackup_client_t client, plist_t *result); |
| 64 | mobilebackup_error_t mobilebackup_receive_restore_application_received(mobilebackup_client_t client, plist_t *result); | ||
| 64 | mobilebackup_error_t mobilebackup_send_restore_complete(mobilebackup_client_t client); | 65 | mobilebackup_error_t mobilebackup_send_restore_complete(mobilebackup_client_t client); |
| 65 | mobilebackup_error_t mobilebackup_send_error(mobilebackup_client_t client, const char *reason); | 66 | mobilebackup_error_t mobilebackup_send_error(mobilebackup_client_t client, const char *reason); |
| 66 | 67 | ||
diff --git a/src/mobilebackup.c b/src/mobilebackup.c index 03d3920..fcff60d 100644 --- a/src/mobilebackup.c +++ b/src/mobilebackup.c | |||
| @@ -456,6 +456,29 @@ mobilebackup_error_t mobilebackup_receive_restore_file_received(mobilebackup_cli | |||
| 456 | } | 456 | } |
| 457 | 457 | ||
| 458 | /** | 458 | /** |
| 459 | * Receive a confirmation from the device that it successfully received | ||
| 460 | * application data file. | ||
| 461 | * | ||
| 462 | * @param client The connected MobileBackup client to use. | ||
| 463 | * @param result Pointer to a plist_t that will be set to the received plist | ||
| 464 | * for further processing. The caller has to free it using plist_free(). | ||
| 465 | * Note that it will be set to NULL if the operation itself fails due to | ||
| 466 | * a communication or plist error. | ||
| 467 | * If this parameter is NULL, it will be ignored. | ||
| 468 | * | ||
| 469 | * @return MOBILEBACKUP_E_SUCCESS on success, MOBILEBACKUP_E_INVALID_ARG if | ||
| 470 | * client is invalid, MOBILEBACKUP_E_REPLY_NOT_OK if the expected | ||
| 471 | * 'BackupMessageRestoreApplicationReceived' message could not be received, | ||
| 472 | * MOBILEBACKUP_E_PLIST_ERROR if the received message is not a valid backup | ||
| 473 | * message plist, or MOBILEBACKUP_E_MUX_ERROR if a communication error | ||
| 474 | * occurs. | ||
| 475 | */ | ||
| 476 | mobilebackup_error_t mobilebackup_receive_restore_application_received(mobilebackup_client_t client, plist_t *result) | ||
| 477 | { | ||
| 478 | return mobilebackup_receive_message(client, "BackupMessageRestoreApplicationReceived", result); | ||
| 479 | } | ||
| 480 | |||
| 481 | /** | ||
| 459 | * Tells the device that the restore process is complete and waits for the | 482 | * Tells the device that the restore process is complete and waits for the |
| 460 | * device to close the connection. After that, the device should reboot. | 483 | * device to close the connection. After that, the device should reboot. |
| 461 | * | 484 | * |
