diff options
| author | 2010-01-27 22:07:09 -0800 | |
|---|---|---|
| committer | 2010-01-27 22:07:09 -0800 | |
| commit | 45b88ae3956de089fdc35605910f1359a1d3961c (patch) | |
| tree | 34cbe9da755305b29420c9c22c2b032080cd0991 /src/device_link_service.c | |
| parent | 9ef3ed4afdbc7325c999ff79b033f259af898986 (diff) | |
| parent | 45c5708ecfea326c203d4728e52ecb0ae206a528 (diff) | |
| download | libimobiledevice-45b88ae3956de089fdc35605910f1359a1d3961c.tar.gz libimobiledevice-45b88ae3956de089fdc35605910f1359a1d3961c.tar.bz2 | |
Merge commit 'martin-s/martin'
Diffstat (limited to 'src/device_link_service.c')
| -rw-r--r-- | src/device_link_service.c | 20 |
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 | |||
| 253 | return err; | 253 | return err; |
| 254 | } | 254 | } |
| 255 | 255 | ||
| 256 | device_link_service_error_t device_link_service_process_message(device_link_service_client_t client, plist_t message) | ||
| 257 | { | ||
| 258 | if (!client || !message) | ||
| 259 | return DEVICE_LINK_SERVICE_E_INVALID_ARG; | ||
| 260 | |||
| 261 | if (plist_get_node_type(message) != PLIST_DICT) | ||
| 262 | return DEVICE_LINK_SERVICE_E_INVALID_ARG; | ||
| 263 | |||
| 264 | plist_t array = plist_new_array(); | ||
| 265 | plist_array_append_item(array, plist_new_string("DLMessageProcessMessage")); | ||
| 266 | plist_array_append_item(array, message); | ||
| 267 | |||
| 268 | device_link_service_error_t err = DEVICE_LINK_SERVICE_E_SUCCESS; | ||
| 269 | if (property_list_service_send_binary_plist(client->parent, array) != PROPERTY_LIST_SERVICE_E_SUCCESS) { | ||
| 270 | err = DEVICE_LINK_SERVICE_E_MUX_ERROR; | ||
| 271 | } | ||
| 272 | plist_free(array); | ||
| 273 | return err; | ||
| 274 | } | ||
| 275 | |||
| 256 | /** | 276 | /** |
| 257 | * Generic device link service send function. | 277 | * Generic device link service send function. |
| 258 | * | 278 | * |
