summaryrefslogtreecommitdiffstats
path: root/src/restore.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/restore.c')
-rw-r--r--src/restore.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/restore.c b/src/restore.c
index fd23d85..10642da 100644
--- a/src/restore.c
+++ b/src/restore.c
@@ -391,11 +391,13 @@ restored_error_t restored_goodbye(restored_client_t client)
391 * Requests to start a restore and retrieve it's port on success. 391 * Requests to start a restore and retrieve it's port on success.
392 * 392 *
393 * @param client The restored client 393 * @param client The restored client
394 * @param options PLIST_DICT with options for the restore process or NULL
395 * @param version the restore protocol version, see restored_query_type()
394 * 396 *
395 * @return RESTORE_E_SUCCESS on success, NP_E_INVALID_ARG if a parameter 397 * @return RESTORE_E_SUCCESS on success, NP_E_INVALID_ARG if a parameter
396 * is NULL, RESTORE_E_START_RESTORE_FAILED if the request fails 398 * is NULL, RESTORE_E_START_RESTORE_FAILED if the request fails
397 */ 399 */
398restored_error_t restored_start_restore(restored_client_t client) 400restored_error_t restored_start_restore(restored_client_t client, plist_t options, uint64_t version)
399{ 401{
400 if (!client) 402 if (!client)
401 return RESTORE_E_INVALID_ARG; 403 return RESTORE_E_INVALID_ARG;
@@ -406,7 +408,10 @@ restored_error_t restored_start_restore(restored_client_t client)
406 dict = plist_new_dict(); 408 dict = plist_new_dict();
407 plist_dict_add_label(dict, client->label); 409 plist_dict_add_label(dict, client->label);
408 plist_dict_insert_item(dict,"Request", plist_new_string("StartRestore")); 410 plist_dict_insert_item(dict,"Request", plist_new_string("StartRestore"));
409 plist_dict_insert_item(dict,"RestoreProtocolVersion", plist_new_uint(2)); 411 if (options) {
412 plist_dict_insert_item(dict, "RestoreOptions", plist_copy(options));
413 }
414 plist_dict_insert_item(dict,"RestoreProtocolVersion", plist_new_uint(version));
410 415
411 /* send to device */ 416 /* send to device */
412 ret = restored_send(client, dict); 417 ret = restored_send(client, dict);