summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2014-10-02 16:13:49 +0200
committerGravatar Martin Szulecki2014-10-02 16:13:49 +0200
commit9eaaae751d4a3b3e6bd6d95e5c355cb26390845f (patch)
tree782fb20c2a638993b44b003da33dc8b9a609e42e /src
parentff5807ceca06d67a3f87c1aa147416b4ef3c25ec (diff)
downloadlibimobiledevice-9eaaae751d4a3b3e6bd6d95e5c355cb26390845f.tar.gz
libimobiledevice-9eaaae751d4a3b3e6bd6d95e5c355cb26390845f.tar.bz2
afc: Unify argument names for some functions to match overall API
Diffstat (limited to 'src')
-rw-r--r--src/afc.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/afc.c b/src/afc.c
index ae5e245..50ac5bf 100644
--- a/src/afc.c
+++ b/src/afc.c
@@ -402,19 +402,19 @@ static char **make_strings_list(char *tokens, uint32_t length)
return list;
}
-afc_error_t afc_read_directory(afc_client_t client, const char *dir, char ***list)
+afc_error_t afc_read_directory(afc_client_t client, const char *path, char ***directory_information)
{
uint32_t bytes = 0;
char *data = NULL, **list_loc = NULL;
afc_error_t ret = AFC_E_UNKNOWN_ERROR;
- if (!client || !dir || !list || (list && *list))
+ if (!client || !path || !directory_information || (directory_information && *directory_information))
return AFC_E_INVALID_ARG;
afc_lock(client);
/* Send the command */
- ret = afc_dispatch_packet(client, AFC_OP_READ_DIR, dir, strlen(dir)+1, NULL, 0, &bytes);
+ ret = afc_dispatch_packet(client, AFC_OP_READ_DIR, path, strlen(path)+1, NULL, 0, &bytes);
if (ret != AFC_E_SUCCESS) {
afc_unlock(client);
return AFC_E_NOT_ENOUGH_DATA;
@@ -433,18 +433,18 @@ afc_error_t afc_read_directory(afc_client_t client, const char *dir, char ***lis
free(data);
afc_unlock(client);
- *list = list_loc;
+ *directory_information = list_loc;
return ret;
}
-afc_error_t afc_get_device_info(afc_client_t client, char ***infos)
+afc_error_t afc_get_device_info(afc_client_t client, char ***device_information)
{
uint32_t bytes = 0;
char *data = NULL, **list = NULL;
afc_error_t ret = AFC_E_UNKNOWN_ERROR;
- if (!client || !infos)
+ if (!client || !device_information)
return AFC_E_INVALID_ARG;
afc_lock(client);
@@ -470,7 +470,7 @@ afc_error_t afc_get_device_info(afc_client_t client, char ***infos)
afc_unlock(client);
- *infos = list;
+ *device_information = list;
return ret;
}
@@ -559,7 +559,7 @@ afc_error_t afc_rename_path(afc_client_t client, const char *from, const char *t
return ret;
}
-afc_error_t afc_make_directory(afc_client_t client, const char *dir)
+afc_error_t afc_make_directory(afc_client_t client, const char *path)
{
uint32_t bytes = 0;
afc_error_t ret = AFC_E_UNKNOWN_ERROR;
@@ -570,7 +570,7 @@ afc_error_t afc_make_directory(afc_client_t client, const char *dir)
afc_lock(client);
/* Send command */
- ret = afc_dispatch_packet(client, AFC_OP_MAKE_DIR, dir, strlen(dir)+1, NULL, 0, &bytes);
+ ret = afc_dispatch_packet(client, AFC_OP_MAKE_DIR, path, strlen(path)+1, NULL, 0, &bytes);
if (ret != AFC_E_SUCCESS) {
afc_unlock(client);
return AFC_E_NOT_ENOUGH_DATA;
@@ -583,13 +583,13 @@ afc_error_t afc_make_directory(afc_client_t client, const char *dir)
return ret;
}
-afc_error_t afc_get_file_info(afc_client_t client, const char *path, char ***infolist)
+afc_error_t afc_get_file_info(afc_client_t client, const char *path, char ***file_information)
{
char *received = NULL;
uint32_t bytes = 0;
afc_error_t ret = AFC_E_UNKNOWN_ERROR;
- if (!client || !path || !infolist)
+ if (!client || !path || !file_information)
return AFC_E_INVALID_ARG;
afc_lock(client);
@@ -604,7 +604,7 @@ afc_error_t afc_get_file_info(afc_client_t client, const char *path, char ***inf
/* Receive data */
ret = afc_receive_data(client, &received, &bytes);
if (received) {
- *infolist = make_strings_list(received, bytes);
+ *file_information = make_strings_list(received, bytes);
free(received);
}