diff options
author | Nikias Bassen | 2010-11-28 23:11:46 +0100 |
---|---|---|
committer | Martin Szulecki | 2011-04-11 19:42:19 +0200 |
commit | 281dcd27c4e192f05f3b1b5b583f2420c1ab5d18 (patch) | |
tree | 35faa15caf9c7e1b3dc625e879be63bb7e78f1ee | |
parent | 016c8d39185824da3d7c5d6fa7f720bf176260cc (diff) | |
download | libimobiledevice-281dcd27c4e192f05f3b1b5b583f2420c1ab5d18.tar.gz libimobiledevice-281dcd27c4e192f05f3b1b5b583f2420c1ab5d18.tar.bz2 |
idevicebackup4: add dummy DLMessageCopyItem message
-rw-r--r-- | tools/idevicebackup4.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/idevicebackup4.c b/tools/idevicebackup4.c index 4e079f1..d07638b 100644 --- a/tools/idevicebackup4.c +++ b/tools/idevicebackup4.c @@ -1642,6 +1642,28 @@ checkpoint: if (err != MOBILEBACKUP2_E_SUCCESS) { printf("Could not send status response, error %d\n", err); } + } else if (!strcmp(dlmsg, "DLMessageCopyItem")) { + plist_t srcpath = plist_array_get_item(message, 1); + plist_t dstpath = plist_array_get_item(message, 2); + errcode = 0; + errdesc = NULL; + if ((plist_get_node_type(srcpath) == PLIST_STRING) && (plist_get_node_type(dstpath) == PLIST_STRING)) { + char *src = NULL; + char *dst = NULL; + plist_get_string_val(srcpath, &src); + plist_get_string_val(dstpath, &dst); + if (src && dst) { + printf("Copying '%s' to '%s', please wait (TODO: implemented)\n", src, dst); + // FIXME: implement + } + g_free(src); + g_free(dst); + } + + err = mobilebackup2_send_status_response(mobilebackup2, errcode, errdesc, plist_new_dict()); + if (err != MOBILEBACKUP2_E_SUCCESS) { + printf("Could not send status response, error %d\n", err); + } } else if (!strcmp(dlmsg, "DLMessageProcessMessage")) { node_tmp = plist_array_get_item(message, 1); if (plist_get_node_type(node_tmp) != PLIST_DICT) { |