diff options
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 e1155a5..c791b03 100644 --- a/src/device_link_service.c +++ b/src/device_link_service.c | |||
| @@ -252,6 +252,26 @@ device_link_service_error_t device_link_service_disconnect(device_link_service_c | |||
| 252 | return err; | 252 | return err; |
| 253 | } | 253 | } |
| 254 | 254 | ||
| 255 | device_link_service_error_t device_link_service_process_message(device_link_service_client_t client, plist_t message) | ||
| 256 | { | ||
| 257 | if (!client || !message) | ||
| 258 | return DEVICE_LINK_SERVICE_E_INVALID_ARG; | ||
| 259 | |||
| 260 | if (plist_get_node_type(message) != PLIST_DICT) | ||
| 261 | return DEVICE_LINK_SERVICE_E_INVALID_ARG; | ||
| 262 | |||
| 263 | plist_t array = plist_new_array(); | ||
| 264 | plist_array_append_item(array, plist_new_string("DLMessageProcessMessage")); | ||
| 265 | plist_array_append_item(array, message); | ||
| 266 | |||
| 267 | device_link_service_error_t err = DEVICE_LINK_SERVICE_E_SUCCESS; | ||
| 268 | if (property_list_service_send_binary_plist(client->parent, array) != PROPERTY_LIST_SERVICE_E_SUCCESS) { | ||
| 269 | err = DEVICE_LINK_SERVICE_E_MUX_ERROR; | ||
| 270 | } | ||
| 271 | plist_free(array); | ||
| 272 | return err; | ||
| 273 | } | ||
| 274 | |||
| 255 | /** | 275 | /** |
| 256 | * Generic device link service send function. | 276 | * Generic device link service send function. |
| 257 | * | 277 | * |
