From 35047cec6410026de38dd0809c0d5d5c44524a04 Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Thu, 10 Jun 2010 03:11:31 +0200 Subject: mobilebackup: Add function to receive application received message --- src/mobilebackup.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/mobilebackup.c') diff --git a/src/mobilebackup.c b/src/mobilebackup.c index 03d3920..fcff60d 100644 --- a/src/mobilebackup.c +++ b/src/mobilebackup.c @@ -455,6 +455,29 @@ mobilebackup_error_t mobilebackup_receive_restore_file_received(mobilebackup_cli return mobilebackup_receive_message(client, "BackupMessageRestoreFileReceived", result); } +/** + * Receive a confirmation from the device that it successfully received + * application data file. + * + * @param client The connected MobileBackup client to use. + * @param result Pointer to a plist_t that will be set to the received plist + * for further processing. The caller has to free it using plist_free(). + * Note that it will be set to NULL if the operation itself fails due to + * a communication or plist error. + * If this parameter is NULL, it will be ignored. + * + * @return MOBILEBACKUP_E_SUCCESS on success, MOBILEBACKUP_E_INVALID_ARG if + * client is invalid, MOBILEBACKUP_E_REPLY_NOT_OK if the expected + * 'BackupMessageRestoreApplicationReceived' message could not be received, + * MOBILEBACKUP_E_PLIST_ERROR if the received message is not a valid backup + * message plist, or MOBILEBACKUP_E_MUX_ERROR if a communication error + * occurs. + */ +mobilebackup_error_t mobilebackup_receive_restore_application_received(mobilebackup_client_t client, plist_t *result) +{ + return mobilebackup_receive_message(client, "BackupMessageRestoreApplicationReceived", result); +} + /** * Tells the device that the restore process is complete and waits for the * device to close the connection. After that, the device should reboot. -- cgit v1.1-32-gdbae