summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2010-01-22 15:00:16 +0100
committerGravatar Martin Szulecki2010-01-22 15:00:16 +0100
commit82d682b850329f2660fa6c6cc658ec03b5ffbadc (patch)
tree427e63c6e788ced9ae7de6c930dd4ee1644bba72
parent3183e7c96e7f66d9f0b215d549912411b146dd77 (diff)
downloadlibimobiledevice-82d682b850329f2660fa6c6cc658ec03b5ffbadc.tar.gz
libimobiledevice-82d682b850329f2660fa6c6cc658ec03b5ffbadc.tar.bz2
Rename all *_recv functions to *_receive to match underlying API
-rw-r--r--dev/msyncclient.c8
-rw-r--r--include/libiphone/lockdown.h2
-rw-r--r--include/libiphone/mobilesync.h2
-rw-r--r--src/iphone.c10
-rw-r--r--src/lockdown.c26
-rw-r--r--src/mobilesync.c2
-rw-r--r--src/property_list_service.c6
-rw-r--r--swig/iphone.i4
8 files changed, 30 insertions, 30 deletions
diff --git a/dev/msyncclient.c b/dev/msyncclient.c
index c136ef2..0107240 100644
--- a/dev/msyncclient.c
+++ b/dev/msyncclient.c
@@ -64,7 +64,7 @@ static mobilesync_error_t mobilesync_get_all_contacts(mobilesync_client_t client
plist_free(array);
array = NULL;
- ret = mobilesync_recv(client, &array);
+ ret = mobilesync_receive(client, &array);
plist_free(array);
array = NULL;
@@ -77,7 +77,7 @@ static mobilesync_error_t mobilesync_get_all_contacts(mobilesync_client_t client
plist_free(array);
array = NULL;
- ret = mobilesync_recv(client, &array);
+ ret = mobilesync_receive(client, &array);
plist_t contact_node;
plist_t switch_node;
@@ -100,7 +100,7 @@ static mobilesync_error_t mobilesync_get_all_contacts(mobilesync_client_t client
plist_free(array);
array = NULL;
- ret = mobilesync_recv(client, &array);
+ ret = mobilesync_receive(client, &array);
contact_node = plist_array_get_item(array, 0);
switch_node = plist_array_get_item(array, 0);
@@ -132,7 +132,7 @@ static mobilesync_error_t mobilesync_get_all_contacts(mobilesync_client_t client
plist_free(array);
array = NULL;
- ret = mobilesync_recv(client, &array);
+ ret = mobilesync_receive(client, &array);
plist_free(array);
array = NULL;
diff --git a/include/libiphone/lockdown.h b/include/libiphone/lockdown.h
index e80851b..003a99b 100644
--- a/include/libiphone/lockdown.h
+++ b/include/libiphone/lockdown.h
@@ -78,7 +78,7 @@ lockdownd_error_t lockdownd_start_service(lockdownd_client_t client, const char
lockdownd_error_t lockdownd_start_session(lockdownd_client_t client, const char *host_id, char **session_id, int *ssl_enabled);
lockdownd_error_t lockdownd_stop_session(lockdownd_client_t client, const char *session_id);
lockdownd_error_t lockdownd_send(lockdownd_client_t client, plist_t plist);
-lockdownd_error_t lockdownd_recv(lockdownd_client_t client, plist_t *plist);
+lockdownd_error_t lockdownd_receive(lockdownd_client_t client, plist_t *plist);
lockdownd_error_t lockdownd_pair(lockdownd_client_t client, lockdownd_pair_record_t pair_record);
lockdownd_error_t lockdownd_validate_pair(lockdownd_client_t client, lockdownd_pair_record_t pair_record);
lockdownd_error_t lockdownd_unpair(lockdownd_client_t client, lockdownd_pair_record_t pair_record);
diff --git a/include/libiphone/mobilesync.h b/include/libiphone/mobilesync.h
index 94fbedc..f85113d 100644
--- a/include/libiphone/mobilesync.h
+++ b/include/libiphone/mobilesync.h
@@ -45,7 +45,7 @@ typedef struct mobilesync_client_int *mobilesync_client_t;
mobilesync_error_t mobilesync_client_new(iphone_device_t device, uint16_t port, mobilesync_client_t * client);
mobilesync_error_t mobilesync_client_free(mobilesync_client_t client);
-mobilesync_error_t mobilesync_recv(mobilesync_client_t client, plist_t *plist);
+mobilesync_error_t mobilesync_receive(mobilesync_client_t client, plist_t *plist);
mobilesync_error_t mobilesync_send(mobilesync_client_t client, plist_t plist);
#ifdef __cplusplus
diff --git a/src/iphone.c b/src/iphone.c
index 85d136c..b471e35 100644
--- a/src/iphone.c
+++ b/src/iphone.c
@@ -316,7 +316,7 @@ iphone_error_t iphone_connection_send(iphone_connection_t connection, const char
* Internally used function for receiving raw data over the given connection
* using a timeout.
*/
-static iphone_error_t internal_connection_recv_timeout(iphone_connection_t connection, char *data, uint32_t len, uint32_t *recv_bytes, unsigned int timeout)
+static iphone_error_t internal_connection_receive_timeout(iphone_connection_t connection, char *data, uint32_t len, uint32_t *recv_bytes, unsigned int timeout)
{
if (!connection) {
return IPHONE_E_INVALID_ARG;
@@ -365,13 +365,13 @@ iphone_error_t iphone_connection_receive_timeout(iphone_connection_t connection,
*recv_bytes = 0;
return IPHONE_E_SSL_ERROR;
}
- return internal_connection_recv_timeout(connection, data, len, recv_bytes, timeout);
+ return internal_connection_receive_timeout(connection, data, len, recv_bytes, timeout);
}
/**
* Internally used function for receiving raw data over the given connection.
*/
-static iphone_error_t internal_connection_recv(iphone_connection_t connection, char *data, uint32_t len, uint32_t *recv_bytes)
+static iphone_error_t internal_connection_receive(iphone_connection_t connection, char *data, uint32_t len, uint32_t *recv_bytes)
{
if (!connection) {
return IPHONE_E_INVALID_ARG;
@@ -419,7 +419,7 @@ iphone_error_t iphone_connection_receive(iphone_connection_t connection, char *d
*recv_bytes = 0;
return IPHONE_E_SSL_ERROR;
}
- return internal_connection_recv(connection, data, len, recv_bytes);
+ return internal_connection_receive(connection, data, len, recv_bytes);
}
iphone_error_t iphone_device_get_handle(iphone_device_t device, uint32_t *handle)
@@ -463,7 +463,7 @@ static ssize_t internal_ssl_read(gnutls_transport_ptr_t transport, char *buffer,
/* repeat until we have the full data or an error occurs */
do {
- if ((res = internal_connection_recv(connection, recv_buffer, this_len, (uint32_t*)&bytes)) != IPHONE_E_SUCCESS) {
+ if ((res = internal_connection_receive(connection, recv_buffer, this_len, (uint32_t*)&bytes)) != IPHONE_E_SUCCESS) {
debug_info("ERROR: iphone_connection_receive returned %d", res);
return res;
}
diff --git a/src/lockdown.c b/src/lockdown.c
index 8f15b3f..792dd33 100644
--- a/src/lockdown.c
+++ b/src/lockdown.c
@@ -158,7 +158,7 @@ lockdownd_error_t lockdownd_stop_session(lockdownd_client_t client, const char *
plist_free(dict);
dict = NULL;
- ret = lockdownd_recv(client, &dict);
+ ret = lockdownd_receive(client, &dict);
if (!dict) {
debug_info("LOCKDOWN_E_PLIST_ERROR");
@@ -236,7 +236,7 @@ void lockdownd_client_set_label(lockdownd_client_t client, const char *label)
*
* @return an error code (LOCKDOWN_E_SUCCESS on success)
*/
-lockdownd_error_t lockdownd_recv(lockdownd_client_t client, plist_t *plist)
+lockdownd_error_t lockdownd_receive(lockdownd_client_t client, plist_t *plist)
{
if (!client || !plist || (plist && *plist))
return LOCKDOWN_E_INVALID_ARG;
@@ -304,7 +304,7 @@ lockdownd_error_t lockdownd_query_type(lockdownd_client_t client, char **type)
plist_free(dict);
dict = NULL;
- ret = lockdownd_recv(client, &dict);
+ ret = lockdownd_receive(client, &dict);
if (LOCKDOWN_E_SUCCESS != ret)
return ret;
@@ -363,7 +363,7 @@ lockdownd_error_t lockdownd_get_value(lockdownd_client_t client, const char *dom
return ret;
/* Now get device's answer */
- ret = lockdownd_recv(client, &dict);
+ ret = lockdownd_receive(client, &dict);
if (ret != LOCKDOWN_E_SUCCESS)
return ret;
@@ -426,7 +426,7 @@ lockdownd_error_t lockdownd_set_value(lockdownd_client_t client, const char *dom
return ret;
/* Now get device's answer */
- ret = lockdownd_recv(client, &dict);
+ ret = lockdownd_receive(client, &dict);
if (ret != LOCKDOWN_E_SUCCESS)
return ret;
@@ -483,7 +483,7 @@ lockdownd_error_t lockdownd_remove_value(lockdownd_client_t client, const char *
return ret;
/* Now get device's answer */
- ret = lockdownd_recv(client, &dict);
+ ret = lockdownd_receive(client, &dict);
if (ret != LOCKDOWN_E_SUCCESS)
return ret;
@@ -796,7 +796,7 @@ static lockdownd_error_t lockdownd_do_pair(lockdownd_client_t client, lockdownd_
return ret;
/* Now get iPhone's answer */
- ret = lockdownd_recv(client, &dict);
+ ret = lockdownd_receive(client, &dict);
if (ret != LOCKDOWN_E_SUCCESS)
return ret;
@@ -914,7 +914,7 @@ lockdownd_error_t lockdownd_enter_recovery(lockdownd_client_t client)
plist_free(dict);
dict = NULL;
- ret = lockdownd_recv(client, &dict);
+ ret = lockdownd_receive(client, &dict);
if (lockdown_check_result(dict, "EnterRecovery") == RESULT_SUCCESS) {
debug_info("success");
@@ -950,7 +950,7 @@ lockdownd_error_t lockdownd_goodbye(lockdownd_client_t client)
plist_free(dict);
dict = NULL;
- ret = lockdownd_recv(client, &dict);
+ ret = lockdownd_receive(client, &dict);
if (!dict) {
debug_info("did not get goodbye response back");
return LOCKDOWN_E_PLIST_ERROR;
@@ -1139,7 +1139,7 @@ lockdownd_error_t lockdownd_start_session(lockdownd_client_t client, const char
if (ret != LOCKDOWN_E_SUCCESS)
return ret;
- ret = lockdownd_recv(client, &dict);
+ ret = lockdownd_receive(client, &dict);
if (!dict)
return LOCKDOWN_E_PLIST_ERROR;
@@ -1239,7 +1239,7 @@ lockdownd_error_t lockdownd_start_service(lockdownd_client_t client, const char
if (LOCKDOWN_E_SUCCESS != ret)
return ret;
- ret = lockdownd_recv(client, &dict);
+ ret = lockdownd_receive(client, &dict);
if (LOCKDOWN_E_SUCCESS != ret)
return ret;
@@ -1314,7 +1314,7 @@ lockdownd_error_t lockdownd_activate(lockdownd_client_t client, plist_t activati
plist_free(dict);
dict = NULL;
- ret = lockdownd_recv(client, &dict);
+ ret = lockdownd_receive(client, &dict);
if (!dict) {
debug_info("LOCKDOWN_E_PLIST_ERROR");
return LOCKDOWN_E_PLIST_ERROR;
@@ -1357,7 +1357,7 @@ lockdownd_error_t lockdownd_deactivate(lockdownd_client_t client)
plist_free(dict);
dict = NULL;
- ret = lockdownd_recv(client, &dict);
+ ret = lockdownd_receive(client, &dict);
if (!dict) {
debug_info("LOCKDOWN_E_PLIST_ERROR");
return LOCKDOWN_E_PLIST_ERROR;
diff --git a/src/mobilesync.c b/src/mobilesync.c
index 64c06d5..3492673 100644
--- a/src/mobilesync.c
+++ b/src/mobilesync.c
@@ -104,7 +104,7 @@ mobilesync_error_t mobilesync_client_free(mobilesync_client_t client)
*
* @return an error code
*/
-mobilesync_error_t mobilesync_recv(mobilesync_client_t client, plist_t * plist)
+mobilesync_error_t mobilesync_receive(mobilesync_client_t client, plist_t * plist)
{
if (!client)
return MOBILESYNC_E_INVALID_ARG;
diff --git a/src/property_list_service.c b/src/property_list_service.c
index 39483c2..dbf02d6 100644
--- a/src/property_list_service.c
+++ b/src/property_list_service.c
@@ -211,7 +211,7 @@ property_list_service_error_t property_list_service_send_binary_plist(property_l
* communication error occurs, or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR
* when an unspecified error occurs.
*/
-static property_list_service_error_t internal_plist_recv_timeout(property_list_service_client_t client, plist_t *plist, unsigned int timeout)
+static property_list_service_error_t internal_plist_receive_timeout(property_list_service_client_t client, plist_t *plist, unsigned int timeout)
{
property_list_service_error_t res = PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR;
uint32_t pktlen = 0;
@@ -282,7 +282,7 @@ static property_list_service_error_t internal_plist_recv_timeout(property_list_s
*/
property_list_service_error_t property_list_service_receive_plist_with_timeout(property_list_service_client_t client, plist_t *plist, unsigned int timeout)
{
- return internal_plist_recv_timeout(client, plist, timeout);
+ return internal_plist_receive_timeout(client, plist, timeout);
}
/**
@@ -306,7 +306,7 @@ property_list_service_error_t property_list_service_receive_plist_with_timeout(p
*/
property_list_service_error_t property_list_service_receive_plist(property_list_service_client_t client, plist_t *plist)
{
- return internal_plist_recv_timeout(client, plist, 10000);
+ return internal_plist_receive_timeout(client, plist, 10000);
}
/**
diff --git a/swig/iphone.i b/swig/iphone.i
index f1969ed..81ef488 100644
--- a/swig/iphone.i
+++ b/swig/iphone.i
@@ -188,7 +188,7 @@ PList::Node* new_node_from_plist(plist_t node)
PList::Node* receive() {
plist_t node = NULL;
- lockdownd_recv($self->client, &node);
+ lockdownd_receive($self->client, &node);
return new_node_from_plist(node);
}
@@ -213,7 +213,7 @@ PList::Node* new_node_from_plist(plist_t node)
PList::Node* receive() {
plist_t node = NULL;
- mobilesync_recv($self->client, &node);
+ mobilesync_receive($self->client, &node);
return new_node_from_plist(node);
}
};