diff options
| author | 2009-10-11 18:10:16 +0200 | |
|---|---|---|
| committer | 2009-10-13 17:59:57 -0700 | |
| commit | 4740e30d178c8a588f522586a817039d6be8da3b (patch) | |
| tree | ce2be1fe383342fba1cc75a8ae32931a57637d51 /src/NotificationProxy.c | |
| parent | 90f2ade2c9f5e242ae05417662147f46ba6c1153 (diff) | |
| download | libimobiledevice-4740e30d178c8a588f522586a817039d6be8da3b.tar.gz libimobiledevice-4740e30d178c8a588f522586a817039d6be8da3b.tar.bz2 | |
Update to latest libplist API.
Signed-off-by: Matt Colyer <matt@colyer.name>
[#77 state:resolved]
Diffstat (limited to 'src/NotificationProxy.c')
| -rw-r--r-- | src/NotificationProxy.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/NotificationProxy.c b/src/NotificationProxy.c index da636ab..ee2ad95 100644 --- a/src/NotificationProxy.c +++ b/src/NotificationProxy.c | |||
| @@ -177,17 +177,14 @@ np_error_t np_post_notification(np_client_t client, const char *notification) | |||
| 177 | np_lock(client); | 177 | np_lock(client); |
| 178 | 178 | ||
| 179 | plist_t dict = plist_new_dict(); | 179 | plist_t dict = plist_new_dict(); |
| 180 | plist_add_sub_key_el(dict, "Command"); | 180 | plist_dict_insert_item(dict,"Command", plist_new_string("PostNotification")); |
| 181 | plist_add_sub_string_el(dict, "PostNotification"); | 181 | plist_dict_insert_item(dict,"Name", plist_new_string(notification)); |
| 182 | plist_add_sub_key_el(dict, "Name"); | ||
| 183 | plist_add_sub_string_el(dict, notification); | ||
| 184 | 182 | ||
| 185 | np_error_t res = np_plist_send(client, dict); | 183 | np_error_t res = np_plist_send(client, dict); |
| 186 | plist_free(dict); | 184 | plist_free(dict); |
| 187 | 185 | ||
| 188 | dict = plist_new_dict(); | 186 | dict = plist_new_dict(); |
| 189 | plist_add_sub_key_el(dict, "Command"); | 187 | plist_dict_insert_item(dict,"Command", plist_new_string("Shutdown")); |
| 190 | plist_add_sub_string_el(dict, "Shutdown"); | ||
| 191 | 188 | ||
| 192 | res = np_plist_send(client, dict); | 189 | res = np_plist_send(client, dict); |
| 193 | plist_free(dict); | 190 | plist_free(dict); |
| @@ -213,10 +210,8 @@ np_error_t np_observe_notification( np_client_t client, const char *notification | |||
| 213 | np_lock(client); | 210 | np_lock(client); |
| 214 | 211 | ||
| 215 | plist_t dict = plist_new_dict(); | 212 | plist_t dict = plist_new_dict(); |
| 216 | plist_add_sub_key_el(dict, "Command"); | 213 | plist_dict_insert_item(dict,"Command", plist_new_string("ObserveNotification")); |
| 217 | plist_add_sub_string_el(dict, "ObserveNotification"); | 214 | plist_dict_insert_item(dict,"Name", plist_new_string(notification)); |
| 218 | plist_add_sub_key_el(dict, "Name"); | ||
| 219 | plist_add_sub_string_el(dict, notification); | ||
| 220 | 215 | ||
| 221 | np_error_t res = np_plist_send(client, dict); | 216 | np_error_t res = np_plist_send(client, dict); |
| 222 | if (res != NP_E_SUCCESS) { | 217 | if (res != NP_E_SUCCESS) { |
