From 9cad040f01548bd9f6bd8ade6ea20466ee95e036 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Sun, 6 Jun 2010 19:22:46 +0200 Subject: mobilebackup: extend interface with functions for the restore process --- include/libimobiledevice/mobilebackup.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/libimobiledevice') diff --git a/include/libimobiledevice/mobilebackup.h b/include/libimobiledevice/mobilebackup.h index 7dbc3fe..bf405f9 100644 --- a/include/libimobiledevice/mobilebackup.h +++ b/include/libimobiledevice/mobilebackup.h @@ -47,12 +47,21 @@ typedef int16_t mobilebackup_error_t; typedef struct mobilebackup_client_private mobilebackup_client_private; typedef mobilebackup_client_private *mobilebackup_client_t; /**< The client handle. */ +typedef enum { + MB_RESTORE_NOTIFY_SPRINGBOARD = 1 << 0, + MB_RESTORE_PRESERVE_SETTINGS = 1 << 1, + MB_RESTORE_PRESERVE_CAMERA_ROLL = 1 << 2 +} mobilebackup_flags_t; + mobilebackup_error_t mobilebackup_client_new(idevice_t device, uint16_t port, mobilebackup_client_t * client); mobilebackup_error_t mobilebackup_client_free(mobilebackup_client_t client); mobilebackup_error_t mobilebackup_receive(mobilebackup_client_t client, plist_t *plist); mobilebackup_error_t mobilebackup_send(mobilebackup_client_t client, plist_t plist); mobilebackup_error_t mobilebackup_request_backup(mobilebackup_client_t client, plist_t backup_manifest, const char *base_path, const char *proto_version); mobilebackup_error_t mobilebackup_send_backup_file_received(mobilebackup_client_t client); +mobilebackup_error_t mobilebackup_request_restore(mobilebackup_client_t client, plist_t backup_manifest, mobilebackup_flags_t flags, const char *proto_version); +mobilebackup_error_t mobilebackup_receive_restore_file_received(mobilebackup_client_t client, plist_t *result); +mobilebackup_error_t mobilebackup_send_restore_complete(mobilebackup_client_t client); mobilebackup_error_t mobilebackup_send_error(mobilebackup_client_t client, const char *reason); #ifdef __cplusplus -- cgit v1.1-32-gdbae