summaryrefslogtreecommitdiffstats
path: root/src/device_link_service.c
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2010-01-26 02:18:36 +0100
committerGravatar Martin Szulecki2010-01-26 02:18:36 +0100
commit135a69205083b8b499147eb8f34baf586e76bb49 (patch)
treee9fa13ca2662961af57095d38fe4231faba09fa4 /src/device_link_service.c
parent57c883b7fe84d513c836270f681a9bf5a907de3e (diff)
parentb369efa426307bb6e9828c755ccc50c4f213c2e8 (diff)
downloadlibimobiledevice-135a69205083b8b499147eb8f34baf586e76bb49.tar.gz
libimobiledevice-135a69205083b8b499147eb8f34baf586e76bb49.tar.bz2
Merge branch 'mobilebackup' into martin
Diffstat (limited to 'src/device_link_service.c')
-rw-r--r--src/device_link_service.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/device_link_service.c b/src/device_link_service.c
index b7d9ee8..9998fd0 100644
--- a/src/device_link_service.c
+++ b/src/device_link_service.c
@@ -253,6 +253,26 @@ device_link_service_error_t device_link_service_disconnect(device_link_service_c
return err;
}
+device_link_service_error_t device_link_service_process_message(device_link_service_client_t client, plist_t message)
+{
+ if (!client || !message)
+ return DEVICE_LINK_SERVICE_E_INVALID_ARG;
+
+ if (plist_get_node_type(message) != PLIST_DICT)
+ return DEVICE_LINK_SERVICE_E_INVALID_ARG;
+
+ plist_t array = plist_new_array();
+ plist_array_append_item(array, plist_new_string("DLMessageProcessMessage"));
+ plist_array_append_item(array, message);
+
+ device_link_service_error_t err = DEVICE_LINK_SERVICE_E_SUCCESS;
+ if (property_list_service_send_binary_plist(client->parent, array) != PROPERTY_LIST_SERVICE_E_SUCCESS) {
+ err = DEVICE_LINK_SERVICE_E_MUX_ERROR;
+ }
+ plist_free(array);
+ return err;
+}
+
/**
* Generic device link service send function.
*