diff options
Diffstat (limited to 'dev/msyncclient.c')
| -rw-r--r-- | dev/msyncclient.c | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/dev/msyncclient.c b/dev/msyncclient.c index 4b27eb7..fff4c44 100644 --- a/dev/msyncclient.c +++ b/dev/msyncclient.c | |||
| @@ -37,12 +37,12 @@ static mobilesync_error_t mobilesync_get_all_contacts(mobilesync_client_t client | |||
| 37 | plist_t array = NULL; | 37 | plist_t array = NULL; |
| 38 | 38 | ||
| 39 | array = plist_new_array(); | 39 | array = plist_new_array(); |
| 40 | plist_add_sub_string_el(array, "SDMessageSyncDataClassWithDevice"); | 40 | plist_array_append_item(array, plist_new_string("SDMessageSyncDataClassWithDevice")); |
| 41 | plist_add_sub_string_el(array, "com.apple.Contacts"); | 41 | plist_array_append_item(array, plist_new_string("com.apple.Contacts")); |
| 42 | plist_add_sub_string_el(array, "---"); | 42 | plist_array_append_item(array, plist_new_string("---")); |
| 43 | plist_add_sub_string_el(array, "2009-01-09 18:03:58 +0100"); | 43 | plist_array_append_item(array, plist_new_string("2009-01-09 18:03:58 +0100")); |
| 44 | plist_add_sub_uint_el(array, 106); | 44 | plist_array_append_item(array, plist_new_uint(106)); |
| 45 | plist_add_sub_string_el(array, "___EmptyParameterString___"); | 45 | plist_array_append_item(array, plist_new_string("___EmptyParameterString___")); |
| 46 | 46 | ||
| 47 | ret = mobilesync_send(client, array); | 47 | ret = mobilesync_send(client, array); |
| 48 | plist_free(array); | 48 | plist_free(array); |
| @@ -59,9 +59,8 @@ static mobilesync_error_t mobilesync_get_all_contacts(mobilesync_client_t client | |||
| 59 | array = NULL; | 59 | array = NULL; |
| 60 | 60 | ||
| 61 | array = plist_new_array(); | 61 | array = plist_new_array(); |
| 62 | plist_add_sub_string_el(array, "SDMessageGetAllRecordsFromDevice"); | 62 | plist_array_append_item(array, plist_new_string("SDMessageGetAllRecordsFromDevice")); |
| 63 | plist_add_sub_string_el(array, "com.apple.Contacts"); | 63 | plist_array_append_item(array, plist_new_string("com.apple.Contacts")); |
| 64 | |||
| 65 | 64 | ||
| 66 | ret = mobilesync_send(client, array); | 65 | ret = mobilesync_send(client, array); |
| 67 | plist_free(array); | 66 | plist_free(array); |
| @@ -81,8 +80,8 @@ static mobilesync_error_t mobilesync_get_all_contacts(mobilesync_client_t client | |||
| 81 | array = NULL; | 80 | array = NULL; |
| 82 | 81 | ||
| 83 | array = plist_new_array(); | 82 | array = plist_new_array(); |
| 84 | plist_add_sub_string_el(array, "SDMessageAcknowledgeChangesFromDevice"); | 83 | plist_array_append_item(array, plist_new_string("SDMessageAcknowledgeChangesFromDevice")); |
| 85 | plist_add_sub_string_el(array, "com.apple.Contacts"); | 84 | plist_array_append_item(array, plist_new_string("com.apple.Contacts")); |
| 86 | 85 | ||
| 87 | ret = mobilesync_send(client, array); | 86 | ret = mobilesync_send(client, array); |
| 88 | plist_free(array); | 87 | plist_free(array); |
| @@ -95,26 +94,26 @@ static mobilesync_error_t mobilesync_get_all_contacts(mobilesync_client_t client | |||
| 95 | } | 94 | } |
| 96 | 95 | ||
| 97 | array = plist_new_array(); | 96 | array = plist_new_array(); |
| 98 | plist_add_sub_string_el(array, "DLMessagePing"); | 97 | plist_array_append_item(array, plist_new_string("DLMessagePing")); |
| 99 | plist_add_sub_string_el(array, "Preparing to get changes for device"); | 98 | plist_array_append_item(array, plist_new_string("Preparing to get changes for device")); |
| 100 | 99 | ||
| 101 | ret = mobilesync_send(client, array); | 100 | ret = mobilesync_send(client, array); |
| 102 | plist_free(array); | 101 | plist_free(array); |
| 103 | array = NULL; | 102 | array = NULL; |
| 104 | 103 | ||
| 105 | array = plist_new_array(); | 104 | array = plist_new_array(); |
| 106 | plist_add_sub_string_el(array, "SDMessageProcessChanges"); | 105 | plist_array_append_item(array, plist_new_string("SDMessageProcessChanges")); |
| 107 | plist_add_sub_string_el(array, "com.apple.Contacts"); | 106 | plist_array_append_item(array, plist_new_string("com.apple.Contacts")); |
| 108 | plist_add_sub_node(array, plist_new_dict()); | 107 | plist_array_append_item(array, plist_new_dict()); |
| 109 | plist_add_sub_bool_el(array, 0); | 108 | plist_array_append_item(array, plist_new_bool(0)); |
| 109 | |||
| 110 | plist_t dict = plist_new_dict(); | 110 | plist_t dict = plist_new_dict(); |
| 111 | plist_add_sub_node(array, dict); | 111 | plist_array_append_item(array, dict); |
| 112 | plist_add_sub_key_el(dict, "SyncDeviceLinkEntityNamesKey"); | ||
| 113 | plist_t array2 = plist_new_array(); | 112 | plist_t array2 = plist_new_array(); |
| 114 | plist_add_sub_string_el(array2, "com.apple.contacts.Contact"); | 113 | plist_dict_insert_item(dict, "SyncDeviceLinkEntityNamesKey", array2); |
| 115 | plist_add_sub_string_el(array2, "com.apple.contacts.Group"); | 114 | plist_array_append_item(array2, plist_new_string("com.apple.contacts.Contact")); |
| 116 | plist_add_sub_key_el(dict, "SyncDeviceLinkAllRecordsOfPulledEntityTypeSentKey"); | 115 | plist_array_append_item(array2, plist_new_string("com.apple.contacts.Group")); |
| 117 | plist_add_sub_bool_el(dict, 0); | 116 | plist_dict_insert_item(dict, "SyncDeviceLinkAllRecordsOfPulledEntityTypeSentKey", plist_new_bool(0)); |
| 118 | 117 | ||
| 119 | ret = mobilesync_send(client, array); | 118 | ret = mobilesync_send(client, array); |
| 120 | plist_free(array); | 119 | plist_free(array); |
