summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2014-03-20 23:00:20 +0100
committerGravatar Martin Szulecki2014-03-20 23:00:20 +0100
commit88ce6113593158944630435678e689bf155d9a03 (patch)
tree0757287665b7e9c7263d77fd269b0777e8228d25 /src
parenta34a537d1408f8692daeadd5e1f5859ff13a3473 (diff)
downloadlibimobiledevice-88ce6113593158944630435678e689bf155d9a03.tar.gz
libimobiledevice-88ce6113593158944630435678e689bf155d9a03.tar.bz2
Bump dependency to libplist 1.11 and remove use of "plist_dict_insert_item()"
Diffstat (limited to 'src')
-rw-r--r--src/diagnostics_relay.c28
-rw-r--r--src/file_relay.c2
-rw-r--r--src/house_arrest.c4
-rw-r--r--src/installation_proxy.c14
-rw-r--r--src/lockdown.c78
-rw-r--r--src/misagent.c16
-rw-r--r--src/mobile_image_mounter.c20
-rw-r--r--src/mobilebackup.c24
-rw-r--r--src/mobilebackup2.c14
-rw-r--r--src/mobilesync.c4
-rw-r--r--src/notification_proxy.c10
-rw-r--r--src/restore.c18
-rw-r--r--src/sbservices.c16
-rw-r--r--src/screenshotr.c2
-rw-r--r--src/webinspector.c4
15 files changed, 127 insertions, 127 deletions
diff --git a/src/diagnostics_relay.c b/src/diagnostics_relay.c
index 9786f0e..de3781c 100644
--- a/src/diagnostics_relay.c
+++ b/src/diagnostics_relay.c
@@ -216,7 +216,7 @@ diagnostics_relay_error_t diagnostics_relay_goodbye(diagnostics_relay_client_t c
diagnostics_relay_error_t ret = DIAGNOSTICS_RELAY_E_UNKNOWN_ERROR;
plist_t dict = plist_new_dict();
- plist_dict_insert_item(dict, "Request", plist_new_string("Goodbye"));
+ plist_dict_set_item(dict, "Request", plist_new_string("Goodbye"));
ret = diagnostics_relay_send(client, dict);
plist_free(dict);
@@ -261,7 +261,7 @@ diagnostics_relay_error_t diagnostics_relay_sleep(diagnostics_relay_client_t cli
plist_t dict = plist_new_dict();
- plist_dict_insert_item(dict,"Request", plist_new_string("Sleep"));
+ plist_dict_set_item(dict,"Request", plist_new_string("Sleep"));
ret = diagnostics_relay_send(client, dict);
plist_free(dict);
dict = NULL;
@@ -292,18 +292,18 @@ static diagnostics_relay_error_t internal_diagnostics_relay_action(diagnostics_r
diagnostics_relay_error_t ret = DIAGNOSTICS_RELAY_E_UNKNOWN_ERROR;
plist_t dict = plist_new_dict();
- plist_dict_insert_item(dict,"Request", plist_new_string(name));
+ plist_dict_set_item(dict,"Request", plist_new_string(name));
if (flags & DIAGNOSTICS_RELAY_ACTION_FLAG_WAIT_FOR_DISCONNECT) {
- plist_dict_insert_item(dict, "WaitForDisconnect", plist_new_bool(1));
+ plist_dict_set_item(dict, "WaitForDisconnect", plist_new_bool(1));
}
if (flags & DIAGNOSTICS_RELAY_ACTION_FLAG_DISPLAY_PASS) {
- plist_dict_insert_item(dict, "DisplayPass", plist_new_bool(1));
+ plist_dict_set_item(dict, "DisplayPass", plist_new_bool(1));
}
if (flags & DIAGNOSTICS_RELAY_ACTION_FLAG_DISPLAY_FAIL) {
- plist_dict_insert_item(dict, "DisplayFail", plist_new_bool(1));
+ plist_dict_set_item(dict, "DisplayFail", plist_new_bool(1));
}
ret = diagnostics_relay_send(client, dict);
@@ -376,7 +376,7 @@ diagnostics_relay_error_t diagnostics_relay_request_diagnostics(diagnostics_rela
diagnostics_relay_error_t ret = DIAGNOSTICS_RELAY_E_UNKNOWN_ERROR;
plist_t dict = plist_new_dict();
- plist_dict_insert_item(dict,"Request", plist_new_string(type));
+ plist_dict_set_item(dict,"Request", plist_new_string(type));
ret = diagnostics_relay_send(client, dict);
plist_free(dict);
dict = NULL;
@@ -417,8 +417,8 @@ diagnostics_relay_error_t diagnostics_relay_query_mobilegestalt(diagnostics_rela
diagnostics_relay_error_t ret = DIAGNOSTICS_RELAY_E_UNKNOWN_ERROR;
plist_t dict = plist_new_dict();
- plist_dict_insert_item(dict,"MobileGestaltKeys", plist_copy(keys));
- plist_dict_insert_item(dict,"Request", plist_new_string("MobileGestalt"));
+ plist_dict_set_item(dict,"MobileGestaltKeys", plist_copy(keys));
+ plist_dict_set_item(dict,"Request", plist_new_string("MobileGestalt"));
ret = diagnostics_relay_send(client, dict);
plist_free(dict);
dict = NULL;
@@ -460,10 +460,10 @@ diagnostics_relay_error_t diagnostics_relay_query_ioregistry_entry(diagnostics_r
plist_t dict = plist_new_dict();
if (name)
- plist_dict_insert_item(dict,"EntryName", plist_new_string(name));
+ plist_dict_set_item(dict,"EntryName", plist_new_string(name));
if (class)
- plist_dict_insert_item(dict,"EntryClass", plist_new_string(class));
- plist_dict_insert_item(dict,"Request", plist_new_string("IORegistry"));
+ plist_dict_set_item(dict,"EntryClass", plist_new_string(class));
+ plist_dict_set_item(dict,"Request", plist_new_string("IORegistry"));
ret = diagnostics_relay_send(client, dict);
plist_free(dict);
dict = NULL;
@@ -504,8 +504,8 @@ diagnostics_relay_error_t diagnostics_relay_query_ioregistry_plane(diagnostics_r
diagnostics_relay_error_t ret = DIAGNOSTICS_RELAY_E_UNKNOWN_ERROR;
plist_t dict = plist_new_dict();
- plist_dict_insert_item(dict,"CurrentPlane", plist_new_string(plane));
- plist_dict_insert_item(dict,"Request", plist_new_string("IORegistry"));
+ plist_dict_set_item(dict,"CurrentPlane", plist_new_string(plane));
+ plist_dict_set_item(dict,"Request", plist_new_string("IORegistry"));
ret = diagnostics_relay_send(client, dict);
plist_free(dict);
dict = NULL;
diff --git a/src/file_relay.c b/src/file_relay.c
index 3d064b9..fb802a8 100644
--- a/src/file_relay.c
+++ b/src/file_relay.c
@@ -144,7 +144,7 @@ file_relay_error_t file_relay_request_sources_timeout(file_relay_client_t client
i++;
}
plist_t dict = plist_new_dict();
- plist_dict_insert_item(dict, "Sources", array);
+ plist_dict_set_item(dict, "Sources", array);
if (property_list_service_send_xml_plist(client->parent, dict) != PROPERTY_LIST_SERVICE_E_SUCCESS) {
debug_info("ERROR: Could not send request to device!");
diff --git a/src/house_arrest.c b/src/house_arrest.c
index 5a23aff..9aaad34 100644
--- a/src/house_arrest.c
+++ b/src/house_arrest.c
@@ -193,8 +193,8 @@ house_arrest_error_t house_arrest_send_command(house_arrest_client_t client, con
house_arrest_error_t res = HOUSE_ARREST_E_UNKNOWN_ERROR;
plist_t dict = plist_new_dict();
- plist_dict_insert_item(dict, "Command", plist_new_string(command));
- plist_dict_insert_item(dict, "Identifier", plist_new_string(appid));
+ plist_dict_set_item(dict, "Command", plist_new_string(command));
+ plist_dict_set_item(dict, "Identifier", plist_new_string(appid));
res = house_arrest_send_request(client, dict);
diff --git a/src/installation_proxy.c b/src/installation_proxy.c
index f758a14..109df10 100644
--- a/src/installation_proxy.c
+++ b/src/installation_proxy.c
@@ -180,14 +180,14 @@ static instproxy_error_t instproxy_send_command(instproxy_client_t client, const
plist_t dict = plist_new_dict();
if (appid) {
- plist_dict_insert_item(dict, "ApplicationIdentifier", plist_new_string(appid));
+ plist_dict_set_item(dict, "ApplicationIdentifier", plist_new_string(appid));
}
if (client_options && (plist_dict_get_size(client_options) > 0)) {
- plist_dict_insert_item(dict, "ClientOptions", plist_copy(client_options));
+ plist_dict_set_item(dict, "ClientOptions", plist_copy(client_options));
}
- plist_dict_insert_item(dict, "Command", plist_new_string(command));
+ plist_dict_set_item(dict, "Command", plist_new_string(command));
if (package_path) {
- plist_dict_insert_item(dict, "PackagePath", plist_new_string(package_path));
+ plist_dict_set_item(dict, "PackagePath", plist_new_string(package_path));
}
instproxy_error_t err = instproxy_error(property_list_service_send_xml_plist(client->parent, dict));
@@ -761,21 +761,21 @@ void instproxy_client_options_add(plist_t client_options, ...)
char *key = strdup(arg);
if (!strcmp(key, "SkipUninstall")) {
int intval = va_arg(args, int);
- plist_dict_insert_item(client_options, key, plist_new_bool(intval));
+ plist_dict_set_item(client_options, key, plist_new_bool(intval));
} else if (!strcmp(key, "ApplicationSINF") || !strcmp(key, "iTunesMetadata") || !strcmp(key, "ReturnAttributes")) {
plist_t plistval = va_arg(args, plist_t);
if (!plistval) {
free(key);
break;
}
- plist_dict_insert_item(client_options, key, plist_copy(plistval));
+ plist_dict_set_item(client_options, key, plist_copy(plistval));
} else {
char *strval = va_arg(args, char*);
if (!strval) {
free(key);
break;
}
- plist_dict_insert_item(client_options, key, plist_new_string(strval));
+ plist_dict_set_item(client_options, key, plist_new_string(strval));
}
free(key);
arg = va_arg(args, char*);
diff --git a/src/lockdown.c b/src/lockdown.c
index 284840d..e21db30 100644
--- a/src/lockdown.c
+++ b/src/lockdown.c
@@ -158,7 +158,7 @@ static void plist_dict_add_label(plist_t plist, const char *label)
{
if (plist && label) {
if (plist_get_node_type(plist) == PLIST_DICT)
- plist_dict_insert_item(plist, "Label", plist_new_string(label));
+ plist_dict_set_item(plist, "Label", plist_new_string(label));
}
}
@@ -186,8 +186,8 @@ lockdownd_error_t lockdownd_stop_session(lockdownd_client_t client, const char *
plist_t dict = plist_new_dict();
plist_dict_add_label(dict, client->label);
- plist_dict_insert_item(dict,"Request", plist_new_string("StopSession"));
- plist_dict_insert_item(dict,"SessionID", plist_new_string(session_id));
+ plist_dict_set_item(dict,"Request", plist_new_string("StopSession"));
+ plist_dict_set_item(dict,"SessionID", plist_new_string(session_id));
debug_info("stopping session %s", session_id);
@@ -368,7 +368,7 @@ lockdownd_error_t lockdownd_query_type(lockdownd_client_t client, char **type)
plist_t dict = plist_new_dict();
plist_dict_add_label(dict, client->label);
- plist_dict_insert_item(dict,"Request", plist_new_string("QueryType"));
+ plist_dict_set_item(dict,"Request", plist_new_string("QueryType"));
debug_info("called");
ret = lockdownd_send(client, dict);
@@ -426,12 +426,12 @@ lockdownd_error_t lockdownd_get_value(lockdownd_client_t client, const char *dom
dict = plist_new_dict();
plist_dict_add_label(dict, client->label);
if (domain) {
- plist_dict_insert_item(dict,"Domain", plist_new_string(domain));
+ plist_dict_set_item(dict,"Domain", plist_new_string(domain));
}
if (key) {
- plist_dict_insert_item(dict,"Key", plist_new_string(key));
+ plist_dict_set_item(dict,"Key", plist_new_string(key));
}
- plist_dict_insert_item(dict,"Request", plist_new_string("GetValue"));
+ plist_dict_set_item(dict,"Request", plist_new_string("GetValue"));
/* send to device */
ret = lockdownd_send(client, dict);
@@ -490,13 +490,13 @@ lockdownd_error_t lockdownd_set_value(lockdownd_client_t client, const char *dom
dict = plist_new_dict();
plist_dict_add_label(dict, client->label);
if (domain) {
- plist_dict_insert_item(dict,"Domain", plist_new_string(domain));
+ plist_dict_set_item(dict,"Domain", plist_new_string(domain));
}
if (key) {
- plist_dict_insert_item(dict,"Key", plist_new_string(key));
+ plist_dict_set_item(dict,"Key", plist_new_string(key));
}
- plist_dict_insert_item(dict,"Request", plist_new_string("SetValue"));
- plist_dict_insert_item(dict,"Value", value);
+ plist_dict_set_item(dict,"Request", plist_new_string("SetValue"));
+ plist_dict_set_item(dict,"Value", value);
/* send to device */
ret = lockdownd_send(client, dict);
@@ -549,12 +549,12 @@ lockdownd_error_t lockdownd_remove_value(lockdownd_client_t client, const char *
dict = plist_new_dict();
plist_dict_add_label(dict, client->label);
if (domain) {
- plist_dict_insert_item(dict,"Domain", plist_new_string(domain));
+ plist_dict_set_item(dict,"Domain", plist_new_string(domain));
}
if (key) {
- plist_dict_insert_item(dict,"Key", plist_new_string(key));
+ plist_dict_set_item(dict,"Key", plist_new_string(key));
}
- plist_dict_insert_item(dict,"Request", plist_new_string("RemoveValue"));
+ plist_dict_set_item(dict,"Request", plist_new_string("RemoveValue"));
/* send to device */
ret = lockdownd_send(client, dict);
@@ -818,11 +818,11 @@ static plist_t lockdownd_pair_record_to_plist(lockdownd_pair_record_t pair_recor
/* setup request plist */
plist_t dict = plist_new_dict();
- plist_dict_insert_item(dict, "DeviceCertificate", plist_new_data(pair_record->device_certificate, strlen(pair_record->device_certificate)));
- plist_dict_insert_item(dict, "HostCertificate", plist_new_data(pair_record->host_certificate, strlen(pair_record->host_certificate)));
- plist_dict_insert_item(dict, "HostID", plist_new_string(pair_record->host_id));
- plist_dict_insert_item(dict, "RootCertificate", plist_new_data(pair_record->root_certificate, strlen(pair_record->root_certificate)));
- plist_dict_insert_item(dict, "SystemBUID", plist_new_string(pair_record->system_buid));
+ plist_dict_set_item(dict, "DeviceCertificate", plist_new_data(pair_record->device_certificate, strlen(pair_record->device_certificate)));
+ plist_dict_set_item(dict, "HostCertificate", plist_new_data(pair_record->host_certificate, strlen(pair_record->host_certificate)));
+ plist_dict_set_item(dict, "HostID", plist_new_string(pair_record->host_id));
+ plist_dict_set_item(dict, "RootCertificate", plist_new_data(pair_record->root_certificate, strlen(pair_record->root_certificate)));
+ plist_dict_set_item(dict, "SystemBUID", plist_new_string(pair_record->system_buid));
return dict;
}
@@ -878,11 +878,11 @@ static lockdownd_error_t generate_pair_record_plist(lockdownd_client_t client, p
/* setup request plist */
*pair_record_plist = plist_new_dict();
- plist_dict_insert_item(*pair_record_plist, "DeviceCertificate", plist_new_data((const char*)device_cert.data, device_cert.size));
- plist_dict_insert_item(*pair_record_plist, "HostCertificate", plist_new_data((const char*)host_cert.data, host_cert.size));
- plist_dict_insert_item(*pair_record_plist, "HostID", plist_new_string(host_id));
- plist_dict_insert_item(*pair_record_plist, "RootCertificate", plist_new_data((const char*)root_cert.data, root_cert.size));
- plist_dict_insert_item(*pair_record_plist, "SystemBUID", plist_new_string(system_buid));
+ plist_dict_set_item(*pair_record_plist, "DeviceCertificate", plist_new_data((const char*)device_cert.data, device_cert.size));
+ plist_dict_set_item(*pair_record_plist, "HostCertificate", plist_new_data((const char*)host_cert.data, host_cert.size));
+ plist_dict_set_item(*pair_record_plist, "HostID", plist_new_string(host_id));
+ plist_dict_set_item(*pair_record_plist, "RootCertificate", plist_new_data((const char*)root_cert.data, root_cert.size));
+ plist_dict_set_item(*pair_record_plist, "SystemBUID", plist_new_string(system_buid));
leave:
if (host_id)
@@ -962,13 +962,13 @@ static lockdownd_error_t lockdownd_do_pair(lockdownd_client_t client, lockdownd_
/* setup pair request plist */
dict = plist_new_dict();
plist_dict_add_label(dict, client->label);
- plist_dict_insert_item(dict, "PairRecord", plist_copy(dict_record));
- plist_dict_insert_item(dict, "Request", plist_new_string(verb));
- plist_dict_insert_item(dict, "ProtocolVersion", plist_new_string(LOCKDOWN_PROTOCOL_VERSION));
+ plist_dict_set_item(dict, "PairRecord", plist_copy(dict_record));
+ plist_dict_set_item(dict, "Request", plist_new_string(verb));
+ plist_dict_set_item(dict, "ProtocolVersion", plist_new_string(LOCKDOWN_PROTOCOL_VERSION));
plist_t options = plist_new_dict();
- plist_dict_insert_item(options, "ExtendedPairingErrors", plist_new_bool(1));
- plist_dict_insert_item(dict, "PairingOptions", options);
+ plist_dict_set_item(options, "ExtendedPairingErrors", plist_new_bool(1));
+ plist_dict_set_item(dict, "PairingOptions", options);
/* send to device */
ret = lockdownd_send(client, dict);
@@ -1144,7 +1144,7 @@ lockdownd_error_t lockdownd_enter_recovery(lockdownd_client_t client)
plist_t dict = plist_new_dict();
plist_dict_add_label(dict, client->label);
- plist_dict_insert_item(dict,"Request", plist_new_string("EnterRecovery"));
+ plist_dict_set_item(dict,"Request", plist_new_string("EnterRecovery"));
debug_info("telling device to enter recovery mode");
@@ -1181,7 +1181,7 @@ lockdownd_error_t lockdownd_goodbye(lockdownd_client_t client)
plist_t dict = plist_new_dict();
plist_dict_add_label(dict, client->label);
- plist_dict_insert_item(dict,"Request", plist_new_string("Goodbye"));
+ plist_dict_set_item(dict,"Request", plist_new_string("Goodbye"));
debug_info("called");
@@ -1560,18 +1560,18 @@ lockdownd_error_t lockdownd_start_session(lockdownd_client_t client, const char
/* setup request plist */
dict = plist_new_dict();
plist_dict_add_label(dict, client->label);
- plist_dict_insert_item(dict,"Request", plist_new_string("StartSession"));
+ plist_dict_set_item(dict,"Request", plist_new_string("StartSession"));
/* add host id */
if (host_id) {
- plist_dict_insert_item(dict, "HostID", plist_new_string(host_id));
+ plist_dict_set_item(dict, "HostID", plist_new_string(host_id));
}
/* add system buid */
char *system_buid = NULL;
userpref_get_system_buid(&system_buid);
if (system_buid) {
- plist_dict_insert_item(dict, "SystemBUID", plist_new_string(system_buid));
+ plist_dict_set_item(dict, "SystemBUID", plist_new_string(system_buid));
if (system_buid) {
free(system_buid);
system_buid = NULL;
@@ -1685,8 +1685,8 @@ lockdownd_error_t lockdownd_start_service(lockdownd_client_t client, const char
dict = plist_new_dict();
plist_dict_add_label(dict, client->label);
- plist_dict_insert_item(dict,"Request", plist_new_string("StartService"));
- plist_dict_insert_item(dict,"Service", plist_new_string(identifier));
+ plist_dict_set_item(dict,"Request", plist_new_string("StartService"));
+ plist_dict_set_item(dict,"Service", plist_new_string(identifier));
/* send to device */
ret = lockdownd_send(client, dict);
@@ -1785,8 +1785,8 @@ lockdownd_error_t lockdownd_activate(lockdownd_client_t client, plist_t activati
plist_t dict = plist_new_dict();
plist_dict_add_label(dict, client->label);
- plist_dict_insert_item(dict,"Request", plist_new_string("Activate"));
- plist_dict_insert_item(dict,"ActivationRecord", plist_copy(activation_record));
+ plist_dict_set_item(dict,"Request", plist_new_string("Activate"));
+ plist_dict_set_item(dict,"ActivationRecord", plist_copy(activation_record));
ret = lockdownd_send(client, dict);
plist_free(dict);
@@ -1843,7 +1843,7 @@ lockdownd_error_t lockdownd_deactivate(lockdownd_client_t client)
plist_t dict = plist_new_dict();
plist_dict_add_label(dict, client->label);
- plist_dict_insert_item(dict,"Request", plist_new_string("Deactivate"));
+ plist_dict_set_item(dict,"Request", plist_new_string("Deactivate"));
ret = lockdownd_send(client, dict);
plist_free(dict);
diff --git a/src/misagent.c b/src/misagent.c
index a9bf89b..6edbadd 100644
--- a/src/misagent.c
+++ b/src/misagent.c
@@ -176,9 +176,9 @@ misagent_error_t misagent_install(misagent_client_t client, plist_t profile)
client->last_error = MISAGENT_E_UNKNOWN_ERROR;
plist_t dict = plist_new_dict();
- plist_dict_insert_item(dict, "MessageType", plist_new_string("Install"));
- plist_dict_insert_item(dict, "Profile", plist_copy(profile));
- plist_dict_insert_item(dict, "ProfileType", plist_new_string("Provisioning"));
+ plist_dict_set_item(dict, "MessageType", plist_new_string("Install"));
+ plist_dict_set_item(dict, "Profile", plist_copy(profile));
+ plist_dict_set_item(dict, "ProfileType", plist_new_string("Provisioning"));
misagent_error_t res = misagent_error(property_list_service_send_xml_plist(client->parent, dict));
plist_free(dict);
@@ -227,8 +227,8 @@ misagent_error_t misagent_copy(misagent_client_t client, plist_t* profiles)
client->last_error = MISAGENT_E_UNKNOWN_ERROR;
plist_t dict = plist_new_dict();
- plist_dict_insert_item(dict, "MessageType", plist_new_string("Copy"));
- plist_dict_insert_item(dict, "ProfileType", plist_new_string("Provisioning"));
+ plist_dict_set_item(dict, "MessageType", plist_new_string("Copy"));
+ plist_dict_set_item(dict, "ProfileType", plist_new_string("Provisioning"));
misagent_error_t res = misagent_error(property_list_service_send_xml_plist(client->parent, dict));
plist_free(dict);
@@ -278,9 +278,9 @@ misagent_error_t misagent_remove(misagent_client_t client, const char* profileID
client->last_error = MISAGENT_E_UNKNOWN_ERROR;
plist_t dict = plist_new_dict();
- plist_dict_insert_item(dict, "MessageType", plist_new_string("Remove"));
- plist_dict_insert_item(dict, "ProfileID", plist_new_string(profileID));
- plist_dict_insert_item(dict, "ProfileType", plist_new_string("Provisioning"));
+ plist_dict_set_item(dict, "MessageType", plist_new_string("Remove"));
+ plist_dict_set_item(dict, "ProfileID", plist_new_string(profileID));
+ plist_dict_set_item(dict, "ProfileType", plist_new_string("Provisioning"));
misagent_error_t res = misagent_error(property_list_service_send_xml_plist(client->parent, dict));
plist_free(dict);
diff --git a/src/mobile_image_mounter.c b/src/mobile_image_mounter.c
index 9e6d8e9..4b2818d 100644
--- a/src/mobile_image_mounter.c
+++ b/src/mobile_image_mounter.c
@@ -168,8 +168,8 @@ mobile_image_mounter_error_t mobile_image_mounter_lookup_image(mobile_image_moun
mobile_image_mounter_lock(client);
plist_t dict = plist_new_dict();
- plist_dict_insert_item(dict,"Command", plist_new_string("LookupImage"));
- plist_dict_insert_item(dict,"ImageType", plist_new_string(image_type));
+ plist_dict_set_item(dict,"Command", plist_new_string("LookupImage"));
+ plist_dict_set_item(dict,"ImageType", plist_new_string(image_type));
mobile_image_mounter_error_t res = mobile_image_mounter_error(property_list_service_send_xml_plist(client->parent, dict));
plist_free(dict);
@@ -211,9 +211,9 @@ mobile_image_mounter_error_t mobile_image_mounter_upload_image(mobile_image_moun
plist_t result = NULL;
plist_t dict = plist_new_dict();
- plist_dict_insert_item(dict, "Command", plist_new_string("ReceiveBytes"));
- plist_dict_insert_item(dict, "ImageSize", plist_new_uint(image_size));
- plist_dict_insert_item(dict, "ImageType", plist_new_string(image_type));
+ plist_dict_set_item(dict, "Command", plist_new_string("ReceiveBytes"));
+ plist_dict_set_item(dict, "ImageSize", plist_new_uint(image_size));
+ plist_dict_set_item(dict, "ImageType", plist_new_string(image_type));
mobile_image_mounter_error_t res = mobile_image_mounter_error(property_list_service_send_xml_plist(client->parent, dict));
plist_free(dict);
@@ -340,10 +340,10 @@ mobile_image_mounter_error_t mobile_image_mounter_mount_image(mobile_image_mount
mobile_image_mounter_lock(client);
plist_t dict = plist_new_dict();
- plist_dict_insert_item(dict, "Command", plist_new_string("MountImage"));
- plist_dict_insert_item(dict, "ImagePath", plist_new_string(image_path));
- plist_dict_insert_item(dict, "ImageSignature", plist_new_data(image_signature, signature_length));
- plist_dict_insert_item(dict, "ImageType", plist_new_string(image_type));
+ plist_dict_set_item(dict, "Command", plist_new_string("MountImage"));
+ plist_dict_set_item(dict, "ImagePath", plist_new_string(image_path));
+ plist_dict_set_item(dict, "ImageSignature", plist_new_data(image_signature, signature_length));
+ plist_dict_set_item(dict, "ImageType", plist_new_string(image_type));
mobile_image_mounter_error_t res = mobile_image_mounter_error(property_list_service_send_xml_plist(client->parent, dict));
plist_free(dict);
@@ -382,7 +382,7 @@ mobile_image_mounter_error_t mobile_image_mounter_hangup(mobile_image_mounter_cl
mobile_image_mounter_lock(client);
plist_t dict = plist_new_dict();
- plist_dict_insert_item(dict, "Command", plist_new_string("Hangup"));
+ plist_dict_set_item(dict, "Command", plist_new_string("Hangup"));
mobile_image_mounter_error_t res = mobile_image_mounter_error(property_list_service_send_xml_plist(client->parent, dict));
plist_free(dict);
diff --git a/src/mobilebackup.c b/src/mobilebackup.c
index c53a2cb..66e590a 100644
--- a/src/mobilebackup.c
+++ b/src/mobilebackup.c
@@ -205,7 +205,7 @@ static mobilebackup_error_t mobilebackup_send_message(mobilebackup_client_t clie
} else {
dict = plist_new_dict();
}
- plist_dict_insert_item(dict, "BackupMessageTypeKey", plist_new_string(message));
+ plist_dict_set_item(dict, "BackupMessageTypeKey", plist_new_string(message));
/* send it as DLMessageProcessMessage */
err = mobilebackup_error(device_link_service_send_process_message(client->parent, dict));
@@ -315,10 +315,10 @@ mobilebackup_error_t mobilebackup_request_backup(mobilebackup_client_t client, p
/* construct request plist */
plist_t dict = plist_new_dict();
if (backup_manifest)
- plist_dict_insert_item(dict, "BackupManifestKey", plist_copy(backup_manifest));
- plist_dict_insert_item(dict, "BackupComputerBasePathKey", plist_new_string(base_path));
- plist_dict_insert_item(dict, "BackupMessageTypeKey", plist_new_string("BackupMessageBackupRequest"));
- plist_dict_insert_item(dict, "BackupProtocolVersion", plist_new_string(proto_version));
+ plist_dict_set_item(dict, "BackupManifestKey", plist_copy(backup_manifest));
+ plist_dict_set_item(dict, "BackupComputerBasePathKey", plist_new_string(base_path));
+ plist_dict_set_item(dict, "BackupMessageTypeKey", plist_new_string("BackupMessageBackupRequest"));
+ plist_dict_set_item(dict, "BackupProtocolVersion", plist_new_string(proto_version));
/* send request */
err = mobilebackup_send_message(client, NULL, dict);
@@ -409,13 +409,13 @@ mobilebackup_error_t mobilebackup_request_restore(mobilebackup_client_t client,
/* construct request plist */
plist_t dict = plist_new_dict();
- plist_dict_insert_item(dict, "BackupManifestKey", plist_copy(backup_manifest));
- plist_dict_insert_item(dict, "BackupMessageTypeKey", plist_new_string("kBackupMessageRestoreRequest"));
- plist_dict_insert_item(dict, "BackupProtocolVersion", plist_new_string(proto_version));
+ plist_dict_set_item(dict, "BackupManifestKey", plist_copy(backup_manifest));
+ plist_dict_set_item(dict, "BackupMessageTypeKey", plist_new_string("kBackupMessageRestoreRequest"));
+ plist_dict_set_item(dict, "BackupProtocolVersion", plist_new_string(proto_version));
/* add flags */
- plist_dict_insert_item(dict, "BackupNotifySpringBoard", plist_new_bool(IS_FLAG_SET(flags, MB_RESTORE_NOTIFY_SPRINGBOARD)));
- plist_dict_insert_item(dict, "BackupPreserveSettings", plist_new_bool(IS_FLAG_SET(flags, MB_RESTORE_PRESERVE_SETTINGS)));
- plist_dict_insert_item(dict, "BackupPreserveCameraRoll", plist_new_bool(IS_FLAG_SET(flags, MB_RESTORE_PRESERVE_CAMERA_ROLL)));
+ plist_dict_set_item(dict, "BackupNotifySpringBoard", plist_new_bool(IS_FLAG_SET(flags, MB_RESTORE_NOTIFY_SPRINGBOARD)));
+ plist_dict_set_item(dict, "BackupPreserveSettings", plist_new_bool(IS_FLAG_SET(flags, MB_RESTORE_PRESERVE_SETTINGS)));
+ plist_dict_set_item(dict, "BackupPreserveCameraRoll", plist_new_bool(IS_FLAG_SET(flags, MB_RESTORE_PRESERVE_CAMERA_ROLL)));
/* send request */
err = mobilebackup_send_message(client, NULL, dict);
@@ -572,7 +572,7 @@ mobilebackup_error_t mobilebackup_send_error(mobilebackup_client_t client, const
/* construct error plist */
plist_t dict = plist_new_dict();
- plist_dict_insert_item(dict, "BackupErrorReasonKey", plist_new_string(reason));
+ plist_dict_set_item(dict, "BackupErrorReasonKey", plist_new_string(reason));
err = mobilebackup_send_message(client, "BackupMessageError", dict);
plist_free(dict);
diff --git a/src/mobilebackup2.c b/src/mobilebackup2.c
index 350fa3e..09b156d 100644
--- a/src/mobilebackup2.c
+++ b/src/mobilebackup2.c
@@ -173,7 +173,7 @@ mobilebackup2_error_t mobilebackup2_send_message(mobilebackup2_client_t client,
} else {
dict = plist_new_dict();
}
- plist_dict_insert_item(dict, "MessageName", plist_new_string(message));
+ plist_dict_set_item(dict, "MessageName", plist_new_string(message));
/* send it as DLMessageProcessMessage */
err = mobilebackup2_error(device_link_service_send_process_message(client->parent, dict));
@@ -386,7 +386,7 @@ mobilebackup2_error_t mobilebackup2_version_exchange(mobilebackup2_client_t clie
for (i = 0; i < count; i++) {
plist_array_append_item(array, plist_new_real(local_versions[i]));
}
- plist_dict_insert_item(dict, "SupportedProtocolVersions", array);
+ plist_dict_set_item(dict, "SupportedProtocolVersions", array);
mobilebackup2_error_t err = mobilebackup2_send_message(client, "Hello", dict);
plist_free(dict);
@@ -451,23 +451,23 @@ mobilebackup2_error_t mobilebackup2_send_request(mobilebackup2_client_t client,
return MOBILEBACKUP2_E_INVALID_ARG;
plist_t dict = plist_new_dict();
- plist_dict_insert_item(dict, "TargetIdentifier", plist_new_string(target_identifier));
+ plist_dict_set_item(dict, "TargetIdentifier", plist_new_string(target_identifier));
if (source_identifier) {
- plist_dict_insert_item(dict, "SourceIdentifier", plist_new_string(source_identifier));
+ plist_dict_set_item(dict, "SourceIdentifier", plist_new_string(source_identifier));
}
if (options) {
- plist_dict_insert_item(dict, "Options", plist_copy(options));
+ plist_dict_set_item(dict, "Options", plist_copy(options));
}
if (!strcmp(request, "Unback") && options) {
plist_t node = plist_dict_get_item(options, "Password");
if (node) {
- plist_dict_insert_item(dict, "Password", plist_copy(node));
+ plist_dict_set_item(dict, "Password", plist_copy(node));
}
}
if (!strcmp(request, "EnableCloudBackup") && options) {
plist_t node = plist_dict_get_item(options, "CloudBackupState");
if (node) {
- plist_dict_insert_item(dict, "CloudBackupState", plist_copy(node));
+ plist_dict_set_item(dict, "CloudBackupState", plist_copy(node));
}
}
mobilebackup2_error_t err = mobilebackup2_send_message(client, request, dict);
diff --git a/src/mobilesync.c b/src/mobilesync.c
index e9e05ee..fd64e63 100644
--- a/src/mobilesync.c
+++ b/src/mobilesync.c
@@ -987,10 +987,10 @@ void mobilesync_actions_add(plist_t actions, ...)
plist_array_append_item(array, plist_new_string(entity_names[i]));
}
- plist_dict_insert_item(actions, key, array);
+ plist_dict_set_item(actions, key, array);
} else if (!strcmp(key, "SyncDeviceLinkAllRecordsOfPulledEntityTypeSentKey")) {
int link_records = va_arg(args, int);
- plist_dict_insert_item(actions, key, plist_new_bool(link_records));
+ plist_dict_set_item(actions, key, plist_new_bool(link_records));
}
free(key);
key = NULL;
diff --git a/src/notification_proxy.c b/src/notification_proxy.c
index 6073b76..1ccda6b 100644
--- a/src/notification_proxy.c
+++ b/src/notification_proxy.c
@@ -177,14 +177,14 @@ np_error_t np_post_notification(np_client_t client, const char *notification)
np_lock(client);
plist_t dict = plist_new_dict();
- plist_dict_insert_item(dict,"Command", plist_new_string("PostNotification"));
- plist_dict_insert_item(dict,"Name", plist_new_string(notification));
+ plist_dict_set_item(dict,"Command", plist_new_string("PostNotification"));
+ plist_dict_set_item(dict,"Name", plist_new_string(notification));
np_error_t res = np_error(property_list_service_send_xml_plist(client->parent, dict));
plist_free(dict);
dict = plist_new_dict();
- plist_dict_insert_item(dict,"Command", plist_new_string("Shutdown"));
+ plist_dict_set_item(dict,"Command", plist_new_string("Shutdown"));
res = np_error(property_list_service_send_xml_plist(client->parent, dict));
plist_free(dict);
@@ -237,8 +237,8 @@ np_error_t np_observe_notification( np_client_t client, const char *notification
np_lock(client);
plist_t dict = plist_new_dict();
- plist_dict_insert_item(dict,"Command", plist_new_string("ObserveNotification"));
- plist_dict_insert_item(dict,"Name", plist_new_string(notification));
+ plist_dict_set_item(dict,"Command", plist_new_string("ObserveNotification"));
+ plist_dict_set_item(dict,"Name", plist_new_string(notification));
np_error_t res = np_error(property_list_service_send_xml_plist(client->parent, dict));
if (res != NP_E_SUCCESS) {
diff --git a/src/restore.c b/src/restore.c
index 88fc168..6339270 100644
--- a/src/restore.c
+++ b/src/restore.c
@@ -85,7 +85,7 @@ static void plist_dict_add_label(plist_t plist, const char *label)
{
if (plist && label) {
if (plist_get_node_type(plist) == PLIST_DICT)
- plist_dict_insert_item(plist, "Label", plist_new_string(label));
+ plist_dict_set_item(plist, "Label", plist_new_string(label));
}
}
@@ -218,7 +218,7 @@ restored_error_t restored_query_type(restored_client_t client, char **type, uint
plist_t dict = plist_new_dict();
plist_dict_add_label(dict, client->label);
- plist_dict_insert_item(dict,"Request", plist_new_string("QueryType"));
+ plist_dict_set_item(dict,"Request", plist_new_string("QueryType"));
debug_info("called");
ret = restored_send(client, dict);
@@ -289,9 +289,9 @@ restored_error_t restored_query_value(restored_client_t client, const char *key,
dict = plist_new_dict();
plist_dict_add_label(dict, client->label);
if (key) {
- plist_dict_insert_item(dict,"QueryKey", plist_new_string(key));
+ plist_dict_set_item(dict,"QueryKey", plist_new_string(key));
}
- plist_dict_insert_item(dict,"Request", plist_new_string("QueryValue"));
+ plist_dict_set_item(dict,"Request", plist_new_string("QueryValue"));
/* send to device */
ret = restored_send(client, dict);
@@ -422,7 +422,7 @@ restored_error_t restored_goodbye(restored_client_t client)
plist_t dict = plist_new_dict();
plist_dict_add_label(dict, client->label);
- plist_dict_insert_item(dict,"Request", plist_new_string("Goodbye"));
+ plist_dict_set_item(dict,"Request", plist_new_string("Goodbye"));
debug_info("called");
@@ -465,11 +465,11 @@ restored_error_t restored_start_restore(restored_client_t client, plist_t option
dict = plist_new_dict();
plist_dict_add_label(dict, client->label);
- plist_dict_insert_item(dict,"Request", plist_new_string("StartRestore"));
+ plist_dict_set_item(dict,"Request", plist_new_string("StartRestore"));
if (options) {
- plist_dict_insert_item(dict, "RestoreOptions", plist_copy(options));
+ plist_dict_set_item(dict, "RestoreOptions", plist_copy(options));
}
- plist_dict_insert_item(dict,"RestoreProtocolVersion", plist_new_uint(version));
+ plist_dict_set_item(dict,"RestoreProtocolVersion", plist_new_uint(version));
/* send to device */
ret = restored_send(client, dict);
@@ -497,7 +497,7 @@ restored_error_t restored_reboot(restored_client_t client)
dict = plist_new_dict();
plist_dict_add_label(dict, client->label);
- plist_dict_insert_item(dict,"Request", plist_new_string("Reboot"));
+ plist_dict_set_item(dict,"Request", plist_new_string("Reboot"));
/* send to device */
ret = restored_send(client, dict);
diff --git a/src/sbservices.c b/src/sbservices.c
index c761070..1d043f1 100644
--- a/src/sbservices.c
+++ b/src/sbservices.c
@@ -167,9 +167,9 @@ sbservices_error_t sbservices_get_icon_state(sbservices_client_t client, plist_t
sbservices_error_t res = SBSERVICES_E_UNKNOWN_ERROR;
plist_t dict = plist_new_dict();
- plist_dict_insert_item(dict, "command", plist_new_string("getIconState"));
+ plist_dict_set_item(dict, "command", plist_new_string("getIconState"));
if (format_version) {
- plist_dict_insert_item(dict, "formatVersion", plist_new_string(format_version));
+ plist_dict_set_item(dict, "formatVersion", plist_new_string(format_version));
}
sbs_lock(client);
@@ -216,8 +216,8 @@ sbservices_error_t sbservices_set_icon_state(sbservices_client_t client, plist_t
sbservices_error_t res = SBSERVICES_E_UNKNOWN_ERROR;
plist_t dict = plist_new_dict();
- plist_dict_insert_item(dict, "command", plist_new_string("setIconState"));
- plist_dict_insert_item(dict, "iconState", plist_copy(newstate));
+ plist_dict_set_item(dict, "command", plist_new_string("setIconState"));
+ plist_dict_set_item(dict, "iconState", plist_copy(newstate));
sbs_lock(client);
@@ -257,8 +257,8 @@ sbservices_error_t sbservices_get_icon_pngdata(sbservices_client_t client, const
sbservices_error_t res = SBSERVICES_E_UNKNOWN_ERROR;
plist_t dict = plist_new_dict();
- plist_dict_insert_item(dict, "command", plist_new_string("getIconPNGData"));
- plist_dict_insert_item(dict, "bundleId", plist_new_string(bundleId));
+ plist_dict_set_item(dict, "command", plist_new_string("getIconPNGData"));
+ plist_dict_set_item(dict, "bundleId", plist_new_string(bundleId));
sbs_lock(client);
@@ -303,7 +303,7 @@ sbservices_error_t sbservices_get_interface_orientation(sbservices_client_t clie
sbservices_error_t res = SBSERVICES_E_UNKNOWN_ERROR;
plist_t dict = plist_new_dict();
- plist_dict_insert_item(dict, "command", plist_new_string("getInterfaceOrientation"));
+ plist_dict_set_item(dict, "command", plist_new_string("getInterfaceOrientation"));
sbs_lock(client);
@@ -355,7 +355,7 @@ sbservices_error_t sbservices_get_home_screen_wallpaper_pngdata(sbservices_clien
sbservices_error_t res = SBSERVICES_E_UNKNOWN_ERROR;
plist_t dict = plist_new_dict();
- plist_dict_insert_item(dict, "command", plist_new_string("getHomeScreenWallpaperPNGData"));
+ plist_dict_set_item(dict, "command", plist_new_string("getHomeScreenWallpaperPNGData"));
sbs_lock(client);
diff --git a/src/screenshotr.c b/src/screenshotr.c
index 5367450..a1b5759 100644
--- a/src/screenshotr.c
+++ b/src/screenshotr.c
@@ -162,7 +162,7 @@ screenshotr_error_t screenshotr_take_screenshot(screenshotr_client_t client, cha
screenshotr_error_t res = SCREENSHOTR_E_UNKNOWN_ERROR;
plist_t dict = plist_new_dict();
- plist_dict_insert_item(dict, "MessageType", plist_new_string("ScreenShotRequest"));
+ plist_dict_set_item(dict, "MessageType", plist_new_string("ScreenShotRequest"));
res = screenshotr_error(device_link_service_send_process_message(client->parent, dict));
plist_free(dict);
diff --git a/src/webinspector.c b/src/webinspector.c
index c042df9..14a8bd8 100644
--- a/src/webinspector.c
+++ b/src/webinspector.c
@@ -178,12 +178,12 @@ webinspector_error_t webinspector_send(webinspector_client_t client, plist_t pli
plist_t outplist = plist_new_dict();
if (!is_final_message) {
/* split packet into partial chunks */
- plist_dict_insert_item(outplist, "WIRPartialMessageKey", plist_new_data(packet + offset, WEBINSPECTOR_PARTIAL_PACKET_CHUNK_SIZE));
+ plist_dict_set_item(outplist, "WIRPartialMessageKey", plist_new_data(packet + offset, WEBINSPECTOR_PARTIAL_PACKET_CHUNK_SIZE));
offset += WEBINSPECTOR_PARTIAL_PACKET_CHUNK_SIZE;
packet_length -= WEBINSPECTOR_PARTIAL_PACKET_CHUNK_SIZE;
} else {
/* send final chunk */
- plist_dict_insert_item(outplist, "WIRFinalMessageKey", plist_new_data(packet + offset, packet_length));
+ plist_dict_set_item(outplist, "WIRFinalMessageKey", plist_new_data(packet + offset, packet_length));
offset += packet_length;
packet_length -= packet_length;
}