summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2013-09-21 01:51:42 +0200
committerGravatar Martin Szulecki2013-09-21 01:51:42 +0200
commit1d9f34fb5fa49c31ee30bdc4c98dc9a43bc5afb2 (patch)
treede4a2cf96f85a1f79f67afc33ce6703011ef50b1 /src
parent0eaa1c53598054ec586108f2dec8b391dc0ac473 (diff)
downloadlibimobiledevice-1d9f34fb5fa49c31ee30bdc4c98dc9a43bc5afb2.tar.gz
libimobiledevice-1d9f34fb5fa49c31ee30bdc4c98dc9a43bc5afb2.tar.bz2
idevicebackup2: Add experimental support for using backups in the cloud
Diffstat (limited to 'src')
-rw-r--r--src/mobilebackup2.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mobilebackup2.c b/src/mobilebackup2.c
index 577901e..350fa3e 100644
--- a/src/mobilebackup2.c
+++ b/src/mobilebackup2.c
@@ -459,9 +459,15 @@ mobilebackup2_error_t mobilebackup2_send_request(mobilebackup2_client_t client,
plist_dict_insert_item(dict, "Options", plist_copy(options));
}
if (!strcmp(request, "Unback") && options) {
- plist_t password = plist_dict_get_item(options, "Password");
- if (password) {
- plist_dict_insert_item(dict, "Password", plist_copy(password));
+ plist_t node = plist_dict_get_item(options, "Password");
+ if (node) {
+ plist_dict_insert_item(dict, "Password", plist_copy(node));
+ }
+ }
+ if (!strcmp(request, "EnableCloudBackup") && options) {
+ plist_t node = plist_dict_get_item(options, "CloudBackupState");
+ if (node) {
+ plist_dict_insert_item(dict, "CloudBackupState", plist_copy(node));
}
}
mobilebackup2_error_t err = mobilebackup2_send_message(client, request, dict);