summaryrefslogtreecommitdiffstats
path: root/src/InstallationProxy.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/InstallationProxy.c')
-rw-r--r--src/InstallationProxy.c112
1 files changed, 56 insertions, 56 deletions
diff --git a/src/InstallationProxy.c b/src/InstallationProxy.c
index 387f9ca..9ada994 100644
--- a/src/InstallationProxy.c
+++ b/src/InstallationProxy.c
@@ -26,8 +26,8 @@
26#include <plist/plist.h> 26#include <plist/plist.h>
27 27
28#include "InstallationProxy.h" 28#include "InstallationProxy.h"
29#include "iphone.h" 29#include "property_list_service.h"
30#include "utils.h" 30#include "debug.h"
31 31
32struct instproxy_status_data { 32struct instproxy_status_data {
33 instproxy_client_t client; 33 instproxy_client_t client;
@@ -41,7 +41,7 @@ struct instproxy_status_data {
41 */ 41 */
42static void instproxy_lock(instproxy_client_t client) 42static void instproxy_lock(instproxy_client_t client)
43{ 43{
44 log_debug_msg("InstallationProxy: Locked\n"); 44 debug_info("InstallationProxy: Locked");
45 g_mutex_lock(client->mutex); 45 g_mutex_lock(client->mutex);
46} 46}
47 47
@@ -51,29 +51,30 @@ static void instproxy_lock(instproxy_client_t client)
51 */ 51 */
52static void instproxy_unlock(instproxy_client_t client) 52static void instproxy_unlock(instproxy_client_t client)
53{ 53{
54 log_debug_msg("InstallationProxy: Unlocked\n"); 54 debug_info("InstallationProxy: Unlocked");
55 g_mutex_unlock(client->mutex); 55 g_mutex_unlock(client->mutex);
56} 56}
57 57
58/** 58/**
59 * Convert an iphone_error_t value to an instproxy_error_t value. 59 * Convert a property_list_service_error_t value to an instproxy_error_t value.
60 * Used internally to get correct error codes when using plist helper 60 * Used internally to get correct error codes.
61 * functions.
62 * 61 *
63 * @param err An iphone_error_t error code 62 * @param err A property_list_service_error_t error code
64 * 63 *
65 * @return A matching instproxy_error_t error code, 64 * @return A matching instproxy_error_t error code,
66 * INSTPROXY_E_UNKNOWN_ERROR otherwise. 65 * INSTPROXY_E_UNKNOWN_ERROR otherwise.
67 */ 66 */
68static instproxy_error_t iphone_to_instproxy_error(iphone_error_t err) 67static instproxy_error_t instproxy_error(property_list_service_error_t err)
69{ 68{
70 switch (err) { 69 switch (err) {
71 case IPHONE_E_SUCCESS: 70 case PROPERTY_LIST_SERVICE_E_SUCCESS:
72 return INSTPROXY_E_SUCCESS; 71 return INSTPROXY_E_SUCCESS;
73 case IPHONE_E_INVALID_ARG: 72 case PROPERTY_LIST_SERVICE_E_INVALID_ARG:
74 return INSTPROXY_E_INVALID_ARG; 73 return INSTPROXY_E_INVALID_ARG;
75 case IPHONE_E_PLIST_ERROR: 74 case PROPERTY_LIST_SERVICE_E_PLIST_ERROR:
76 return INSTPROXY_E_PLIST_ERROR; 75 return INSTPROXY_E_PLIST_ERROR;
76 case PROPERTY_LIST_SERVICE_E_MUX_ERROR:
77 return INSTPROXY_E_CONN_FAILED;
77 default: 78 default:
78 break; 79 break;
79 } 80 }
@@ -84,14 +85,14 @@ static instproxy_error_t iphone_to_instproxy_error(iphone_error_t err)
84 * Creates a new installation_proxy client 85 * Creates a new installation_proxy client
85 * 86 *
86 * @param device The device to connect to 87 * @param device The device to connect to
87 * @param dst_port Destination port (usually given by lockdownd_start_service). 88 * @param port Destination port (usually given by lockdownd_start_service).
88 * @param client Pointer that will be set to a newly allocated 89 * @param client Pointer that will be set to a newly allocated
89 * instproxy_client_t upon successful return. 90 * instproxy_client_t upon successful return.
90 * 91 *
91 * @return INSTPROXY_E_SUCCESS on success, or an INSTPROXY_E_* error value 92 * @return INSTPROXY_E_SUCCESS on success, or an INSTPROXY_E_* error value
92 * when an error occured. 93 * when an error occured.
93 */ 94 */
94instproxy_error_t instproxy_client_new(iphone_device_t device, int dst_port, instproxy_client_t *client) 95instproxy_error_t instproxy_client_new(iphone_device_t device, uint16_t port, instproxy_client_t *client)
95{ 96{
96 /* makes sure thread environment is available */ 97 /* makes sure thread environment is available */
97 if (!g_thread_supported()) 98 if (!g_thread_supported())
@@ -100,14 +101,13 @@ instproxy_error_t instproxy_client_new(iphone_device_t device, int dst_port, ins
100 if (!device) 101 if (!device)
101 return INSTPROXY_E_INVALID_ARG; 102 return INSTPROXY_E_INVALID_ARG;
102 103
103 /* Attempt connection */ 104 property_list_service_client_t plistclient = NULL;
104 iphone_connection_t connection = NULL; 105 if (property_list_service_client_new(device, port, &plistclient) != PROPERTY_LIST_SERVICE_E_SUCCESS) {
105 if (iphone_device_connect(device, dst_port, &connection) != IPHONE_E_SUCCESS) {
106 return INSTPROXY_E_CONN_FAILED; 106 return INSTPROXY_E_CONN_FAILED;
107 } 107 }
108 108
109 instproxy_client_t client_loc = (instproxy_client_t) malloc(sizeof(struct instproxy_client_int)); 109 instproxy_client_t client_loc = (instproxy_client_t) malloc(sizeof(struct instproxy_client_int));
110 client_loc->connection = connection; 110 client_loc->parent = plistclient;
111 client_loc->mutex = g_mutex_new(); 111 client_loc->mutex = g_mutex_new();
112 client_loc->status_updater = NULL; 112 client_loc->status_updater = NULL;
113 113
@@ -128,10 +128,10 @@ instproxy_error_t instproxy_client_free(instproxy_client_t client)
128 if (!client) 128 if (!client)
129 return INSTPROXY_E_INVALID_ARG; 129 return INSTPROXY_E_INVALID_ARG;
130 130
131 iphone_device_disconnect(client->connection); 131 property_list_service_client_free(client->parent);
132 client->connection = NULL; 132 client->parent = NULL;
133 if (client->status_updater) { 133 if (client->status_updater) {
134 log_dbg_msg(DBGMASK_INSTPROXY, "joining status_updater"); 134 debug_info("joining status_updater");
135 g_thread_join(client->status_updater); 135 g_thread_join(client->status_updater);
136 } 136 }
137 if (client->mutex) { 137 if (client->mutex) {
@@ -155,7 +155,7 @@ instproxy_error_t instproxy_client_free(instproxy_client_t client)
155 */ 155 */
156instproxy_error_t instproxy_browse(instproxy_client_t client, instproxy_apptype_t apptype, plist_t *result) 156instproxy_error_t instproxy_browse(instproxy_client_t client, instproxy_apptype_t apptype, plist_t *result)
157{ 157{
158 if (!client || !client->connection || !result) 158 if (!client || !client->parent || !result)
159 return INSTPROXY_E_INVALID_ARG; 159 return INSTPROXY_E_INVALID_ARG;
160 160
161 instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; 161 instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR;
@@ -174,7 +174,7 @@ instproxy_error_t instproxy_browse(instproxy_client_t client, instproxy_apptype_
174 p_apptype = plist_new_string("User"); 174 p_apptype = plist_new_string("User");
175 break; 175 break;
176 default: 176 default:
177 log_dbg_msg(DBGMASK_INSTPROXY, "%s: unknown apptype %d given, using INSTPROXY_APPTYPE_USER instead\n", __func__, apptype); 177 debug_info("unknown apptype %d given, using INSTPROXY_APPTYPE_USER instead", apptype);
178 p_apptype = plist_new_string("User"); 178 p_apptype = plist_new_string("User");
179 break; 179 break;
180 } 180 }
@@ -184,10 +184,10 @@ instproxy_error_t instproxy_browse(instproxy_client_t client, instproxy_apptype_
184 plist_dict_insert_item(dict, "Command", plist_new_string("Browse")); 184 plist_dict_insert_item(dict, "Command", plist_new_string("Browse"));
185 185
186 instproxy_lock(client); 186 instproxy_lock(client);
187 res = iphone_to_instproxy_error(iphone_device_send_xml_plist(client->connection, dict)); 187 res = instproxy_error(property_list_service_send_xml_plist(client->parent, dict));
188 plist_free(dict); 188 plist_free(dict);
189 if (res != INSTPROXY_E_SUCCESS) { 189 if (res != INSTPROXY_E_SUCCESS) {
190 log_dbg_msg(DBGMASK_INSTPROXY, "%s: could not send plist\n", __func__); 190 debug_info("could not send plist");
191 goto leave_unlock; 191 goto leave_unlock;
192 } 192 }
193 193
@@ -196,7 +196,7 @@ instproxy_error_t instproxy_browse(instproxy_client_t client, instproxy_apptype_
196 do { 196 do {
197 browsing = 0; 197 browsing = 0;
198 dict = NULL; 198 dict = NULL;
199 res = iphone_to_instproxy_error(iphone_device_receive_plist(client->connection, &dict)); 199 res = instproxy_error(property_list_service_receive_plist(client->parent, &dict));
200 if (res != INSTPROXY_E_SUCCESS) { 200 if (res != INSTPROXY_E_SUCCESS) {
201 break; 201 break;
202 } 202 }
@@ -223,7 +223,7 @@ instproxy_error_t instproxy_browse(instproxy_client_t client, instproxy_apptype_
223 if (!strcmp(status, "BrowsingApplications")) { 223 if (!strcmp(status, "BrowsingApplications")) {
224 browsing = 1; 224 browsing = 1;
225 } else if (!strcmp(status, "Complete")) { 225 } else if (!strcmp(status, "Complete")) {
226 log_dbg_msg(DBGMASK_INSTPROXY, "%s: Browsing applications completed\n"); 226 debug_info("Browsing applications completed");
227 res = INSTPROXY_E_SUCCESS; 227 res = INSTPROXY_E_SUCCESS;
228 } 228 }
229 free(status); 229 free(status);
@@ -261,10 +261,10 @@ static instproxy_error_t instproxy_perform_operation(instproxy_client_t client,
261 261
262 do { 262 do {
263 instproxy_lock(client); 263 instproxy_lock(client);
264 res = iphone_to_instproxy_error(iphone_device_receive_plist_with_timeout(client->connection, &dict, 30000)); 264 res = instproxy_error(property_list_service_receive_plist_with_timeout(client->parent, &dict, 30000));
265 instproxy_unlock(client); 265 instproxy_unlock(client);
266 if (res != INSTPROXY_E_SUCCESS) { 266 if (res != INSTPROXY_E_SUCCESS) {
267 log_dbg_msg(DBGMASK_INSTPROXY, "%s: could not receive plist, error %d\n", __func__, res); 267 debug_info("could not receive plist, error %d", res);
268 break; 268 break;
269 } 269 }
270 if (dict) { 270 if (dict) {
@@ -279,7 +279,7 @@ static instproxy_error_t instproxy_perform_operation(instproxy_client_t client,
279 char *err_msg = NULL; 279 char *err_msg = NULL;
280 plist_get_string_val(err, &err_msg); 280 plist_get_string_val(err, &err_msg);
281 if (err_msg) { 281 if (err_msg) {
282 log_dbg_msg(DBGMASK_INSTPROXY, "%s(%s): ERROR: %s\n", __func__, operation, err_msg); 282 debug_info("(%s): ERROR: %s", operation, err_msg);
283 free(err_msg); 283 free(err_msg);
284 } 284 }
285#endif 285#endif
@@ -303,9 +303,9 @@ static instproxy_error_t instproxy_perform_operation(instproxy_client_t client,
303 int percent; 303 int percent;
304 plist_get_uint_val(npercent, &val); 304 plist_get_uint_val(npercent, &val);
305 percent = val; 305 percent = val;
306 log_dbg_msg(DBGMASK_INSTPROXY, "%s(%s): %s (%d%%)\n", __func__, operation, status_msg, percent); 306 debug_info("(%s): %s (%d%%)", operation, status_msg, percent);
307 } else { 307 } else {
308 log_dbg_msg(DBGMASK_INSTPROXY, "%s(%s): %s\n", __func__, operation, status_msg); 308 debug_info("(%s): %s", operation, status_msg);
309 } 309 }
310#endif 310#endif
311 free(status_msg); 311 free(status_msg);
@@ -314,7 +314,7 @@ static instproxy_error_t instproxy_perform_operation(instproxy_client_t client,
314 plist_free(dict); 314 plist_free(dict);
315 dict = NULL; 315 dict = NULL;
316 } 316 }
317 } while (ok && client->connection); 317 } while (ok && client->parent);
318 318
319 return res; 319 return res;
320} 320}
@@ -338,7 +338,7 @@ static gpointer instproxy_status_updater(gpointer arg)
338 338
339 /* cleanup */ 339 /* cleanup */
340 instproxy_lock(data->client); 340 instproxy_lock(data->client);
341 log_dbg_msg(DBGMASK_INSTPROXY, "%s: done, cleaning up.\n", __func__); 341 debug_info("done, cleaning up.");
342 if (data->operation) { 342 if (data->operation) {
343 free(data->operation); 343 free(data->operation);
344 } 344 }
@@ -404,15 +404,15 @@ static instproxy_error_t instproxy_create_status_updater(instproxy_client_t clie
404 */ 404 */
405static instproxy_error_t instproxy_install_or_upgrade(instproxy_client_t client, const char *pkg_path, plist_t sinf, plist_t metadata, instproxy_status_cb_t status_cb, const char *command) 405static instproxy_error_t instproxy_install_or_upgrade(instproxy_client_t client, const char *pkg_path, plist_t sinf, plist_t metadata, instproxy_status_cb_t status_cb, const char *command)
406{ 406{
407 if (!client || !client->connection || !pkg_path) { 407 if (!client || !client->parent || !pkg_path) {
408 return INSTPROXY_E_INVALID_ARG; 408 return INSTPROXY_E_INVALID_ARG;
409 } 409 }
410 if (sinf && (plist_get_node_type(sinf) != PLIST_DATA)) { 410 if (sinf && (plist_get_node_type(sinf) != PLIST_DATA)) {
411 log_dbg_msg(DBGMASK_INSTPROXY, "%s(%s): ERROR: sinf data is not a PLIST_DATA node!\n", __func__, command); 411 debug_info("(%s): ERROR: sinf data is not a PLIST_DATA node!", command);
412 return INSTPROXY_E_INVALID_ARG; 412 return INSTPROXY_E_INVALID_ARG;
413 } 413 }
414 if (metadata && (plist_get_node_type(metadata) != PLIST_DATA)) { 414 if (metadata && (plist_get_node_type(metadata) != PLIST_DATA)) {
415 log_dbg_msg(DBGMASK_INSTPROXY, "%s(%s): ERROR: metadata is not a PLIST_DATA node!\n", __func__, command); 415 debug_info("(%s): ERROR: metadata is not a PLIST_DATA node!", command);
416 return INSTPROXY_E_INVALID_ARG; 416 return INSTPROXY_E_INVALID_ARG;
417 } 417 }
418 418
@@ -433,13 +433,13 @@ static instproxy_error_t instproxy_install_or_upgrade(instproxy_client_t client,
433 plist_dict_insert_item(dict, "PackagePath", plist_new_string(pkg_path)); 433 plist_dict_insert_item(dict, "PackagePath", plist_new_string(pkg_path));
434 434
435 instproxy_lock(client); 435 instproxy_lock(client);
436 res = iphone_to_instproxy_error(iphone_device_send_xml_plist(client->connection, dict)); 436 res = instproxy_error(property_list_service_send_xml_plist(client->parent, dict));
437 instproxy_unlock(client); 437 instproxy_unlock(client);
438 438
439 plist_free(dict); 439 plist_free(dict);
440 440
441 if (res != INSTPROXY_E_SUCCESS) { 441 if (res != INSTPROXY_E_SUCCESS) {
442 log_dbg_msg(DBGMASK_INSTPROXY, "%s: could not send plist, error %d\n", __func__, res); 442 debug_info("could not send plist, error %d", res);
443 return res; 443 return res;
444 } 444 }
445 445
@@ -512,7 +512,7 @@ instproxy_error_t instproxy_upgrade(instproxy_client_t client, const char *pkg_p
512 */ 512 */
513instproxy_error_t instproxy_uninstall(instproxy_client_t client, const char *appid, instproxy_status_cb_t status_cb) 513instproxy_error_t instproxy_uninstall(instproxy_client_t client, const char *appid, instproxy_status_cb_t status_cb)
514{ 514{
515 if (!client || !client->connection || !appid) { 515 if (!client || !client->parent || !appid) {
516 return INSTPROXY_E_INVALID_ARG; 516 return INSTPROXY_E_INVALID_ARG;
517 } 517 }
518 518
@@ -526,13 +526,13 @@ instproxy_error_t instproxy_uninstall(instproxy_client_t client, const char *app
526 plist_dict_insert_item(dict, "Command", plist_new_string("Uninstall")); 526 plist_dict_insert_item(dict, "Command", plist_new_string("Uninstall"));
527 527
528 instproxy_lock(client); 528 instproxy_lock(client);
529 res = iphone_to_instproxy_error(iphone_device_send_xml_plist(client->connection, dict)); 529 res = instproxy_error(property_list_service_send_xml_plist(client->parent, dict));
530 instproxy_unlock(client); 530 instproxy_unlock(client);
531 531
532 plist_free(dict); 532 plist_free(dict);
533 533
534 if (res != INSTPROXY_E_SUCCESS) { 534 if (res != INSTPROXY_E_SUCCESS) {
535 log_dbg_msg(DBGMASK_INSTPROXY, "%s: could not send plist, error %d\n", __func__, res); 535 debug_info("could not send plist, error %d", res);
536 return res; 536 return res;
537 } 537 }
538 538
@@ -553,7 +553,7 @@ instproxy_error_t instproxy_uninstall(instproxy_client_t client, const char *app
553 */ 553 */
554instproxy_error_t instproxy_lookup_archives(instproxy_client_t client, plist_t *result) 554instproxy_error_t instproxy_lookup_archives(instproxy_client_t client, plist_t *result)
555{ 555{
556 if (!client || !client->connection || !result) 556 if (!client || !client->parent || !result)
557 return INSTPROXY_E_INVALID_ARG; 557 return INSTPROXY_E_INVALID_ARG;
558 558
559 instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; 559 instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR;
@@ -563,17 +563,17 @@ instproxy_error_t instproxy_lookup_archives(instproxy_client_t client, plist_t *
563 563
564 instproxy_lock(client); 564 instproxy_lock(client);
565 565
566 res = iphone_to_instproxy_error(iphone_device_send_xml_plist(client->connection, dict)); 566 res = instproxy_error(property_list_service_send_xml_plist(client->parent, dict));
567 plist_free(dict); 567 plist_free(dict);
568 568
569 if (res != INSTPROXY_E_SUCCESS) { 569 if (res != INSTPROXY_E_SUCCESS) {
570 log_dbg_msg(DBGMASK_INSTPROXY, "%s: could not send plist, error %d\n", __func__, res); 570 debug_info("could not send plist, error %d", res);
571 goto leave_unlock; 571 goto leave_unlock;
572 } 572 }
573 573
574 res = iphone_to_instproxy_error(iphone_device_receive_plist(client->connection, result)); 574 res = instproxy_error(property_list_service_receive_plist(client->parent, result));
575 if (res != INSTPROXY_E_SUCCESS) { 575 if (res != INSTPROXY_E_SUCCESS) {
576 log_dbg_msg(DBGMASK_INSTPROXY, "%s: could not receive plist, error %d\n", __func__, res); 576 debug_info("could not receive plist, error %d", res);
577 goto leave_unlock; 577 goto leave_unlock;
578 } 578 }
579 579
@@ -610,7 +610,7 @@ leave_unlock:
610 */ 610 */
611instproxy_error_t instproxy_archive(instproxy_client_t client, const char *appid, uint32_t options, instproxy_status_cb_t status_cb) 611instproxy_error_t instproxy_archive(instproxy_client_t client, const char *appid, uint32_t options, instproxy_status_cb_t status_cb)
612{ 612{
613 if (!client || !client->connection || !appid) 613 if (!client || !client->parent || !appid)
614 return INSTPROXY_E_INVALID_ARG; 614 return INSTPROXY_E_INVALID_ARG;
615 615
616 if (client->status_updater) { 616 if (client->status_updater) {
@@ -634,13 +634,13 @@ instproxy_error_t instproxy_archive(instproxy_client_t client, const char *appid
634 plist_dict_insert_item(dict, "Command", plist_new_string("Archive")); 634 plist_dict_insert_item(dict, "Command", plist_new_string("Archive"));
635 635
636 instproxy_lock(client); 636 instproxy_lock(client);
637 res = iphone_to_instproxy_error(iphone_device_send_xml_plist(client->connection, dict)); 637 res = instproxy_error(property_list_service_send_xml_plist(client->parent, dict));
638 instproxy_unlock(client); 638 instproxy_unlock(client);
639 639
640 plist_free(dict); 640 plist_free(dict);
641 641
642 if (res != INSTPROXY_E_SUCCESS) { 642 if (res != INSTPROXY_E_SUCCESS) {
643 log_dbg_msg(DBGMASK_INSTPROXY, "%s: could not send plist, error %d\n", __func__, res); 643 debug_info("could not send plist, error %d", res);
644 return res; 644 return res;
645 } 645 }
646 return instproxy_create_status_updater(client, status_cb, "Archive"); 646 return instproxy_create_status_updater(client, status_cb, "Archive");
@@ -666,7 +666,7 @@ instproxy_error_t instproxy_archive(instproxy_client_t client, const char *appid
666 */ 666 */
667instproxy_error_t instproxy_restore(instproxy_client_t client, const char *appid, instproxy_status_cb_t status_cb) 667instproxy_error_t instproxy_restore(instproxy_client_t client, const char *appid, instproxy_status_cb_t status_cb)
668{ 668{
669 if (!client || !client->connection || !appid) 669 if (!client || !client->parent || !appid)
670 return INSTPROXY_E_INVALID_ARG; 670 return INSTPROXY_E_INVALID_ARG;
671 671
672 if (client->status_updater) { 672 if (client->status_updater) {
@@ -680,13 +680,13 @@ instproxy_error_t instproxy_restore(instproxy_client_t client, const char *appid
680 plist_dict_insert_item(dict, "Command", plist_new_string("Restore")); 680 plist_dict_insert_item(dict, "Command", plist_new_string("Restore"));
681 681
682 instproxy_lock(client); 682 instproxy_lock(client);
683 res = iphone_to_instproxy_error(iphone_device_send_xml_plist(client->connection, dict)); 683 res = instproxy_error(property_list_service_send_xml_plist(client->parent, dict));
684 instproxy_unlock(client); 684 instproxy_unlock(client);
685 685
686 plist_free(dict); 686 plist_free(dict);
687 687
688 if (res != INSTPROXY_E_SUCCESS) { 688 if (res != INSTPROXY_E_SUCCESS) {
689 log_dbg_msg(DBGMASK_INSTPROXY, "%s: could not send plist, error %d\n", __func__, res); 689 debug_info("could not send plist, error %d", res);
690 return res; 690 return res;
691 } 691 }
692 return instproxy_create_status_updater(client, status_cb, "Restore"); 692 return instproxy_create_status_updater(client, status_cb, "Restore");
@@ -712,7 +712,7 @@ instproxy_error_t instproxy_restore(instproxy_client_t client, const char *appid
712 */ 712 */
713instproxy_error_t instproxy_remove_archive(instproxy_client_t client, const char *appid, instproxy_status_cb_t status_cb) 713instproxy_error_t instproxy_remove_archive(instproxy_client_t client, const char *appid, instproxy_status_cb_t status_cb)
714{ 714{
715 if (!client || !client->connection || !appid) 715 if (!client || !client->parent || !appid)
716 return INSTPROXY_E_INVALID_ARG; 716 return INSTPROXY_E_INVALID_ARG;
717 717
718 if (client->status_updater) { 718 if (client->status_updater) {
@@ -726,13 +726,13 @@ instproxy_error_t instproxy_remove_archive(instproxy_client_t client, const char
726 plist_dict_insert_item(dict, "Command", plist_new_string("RemoveArchive")); 726 plist_dict_insert_item(dict, "Command", plist_new_string("RemoveArchive"));
727 727
728 instproxy_lock(client); 728 instproxy_lock(client);
729 res = iphone_to_instproxy_error(iphone_device_send_xml_plist(client->connection, dict)); 729 res = instproxy_error(property_list_service_send_xml_plist(client->parent, dict));
730 instproxy_unlock(client); 730 instproxy_unlock(client);
731 731
732 plist_free(dict); 732 plist_free(dict);
733 733
734 if (res != INSTPROXY_E_SUCCESS) { 734 if (res != INSTPROXY_E_SUCCESS) {
735 log_dbg_msg(DBGMASK_INSTPROXY, "%s: could not send plist, error %d\n", __func__, res); 735 debug_info("could not send plist, error %d", res);
736 return res; 736 return res;
737 } 737 }
738 return instproxy_create_status_updater(client, status_cb, "RemoveArchive"); 738 return instproxy_create_status_updater(client, status_cb, "RemoveArchive");