summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2010-03-16 02:47:27 +0100
committerGravatar Martin Szulecki2010-03-16 02:47:27 +0100
commit535af4c6a44c1dcf36d2da1ef0d33c69763bd186 (patch)
treeac8cfe6a71ed197584a60d2bc76be6b8fa5cca88 /src
parentdd48a2c0051be9e0f7a8ae99b035ee3c3a333dd4 (diff)
downloadlibimobiledevice-535af4c6a44c1dcf36d2da1ef0d33c69763bd186.tar.gz
libimobiledevice-535af4c6a44c1dcf36d2da1ef0d33c69763bd186.tar.bz2
Rename the *_int to *_private for better semantic and fix public typedefs
This changes the typedef logic slightly for the public headers in order for doxygen to correctly pickup and enable the client struct documentation.
Diffstat (limited to 'src')
-rw-r--r--src/afc.c2
-rw-r--r--src/afc.h2
-rw-r--r--src/device_link_service.c2
-rw-r--r--src/device_link_service.h5
-rw-r--r--src/file_relay.c2
-rw-r--r--src/file_relay.h2
-rw-r--r--src/idevice.c6
-rw-r--r--src/idevice.h8
-rw-r--r--src/installation_proxy.c2
-rw-r--r--src/installation_proxy.h2
-rw-r--r--src/lockdown.c2
-rw-r--r--src/lockdown.h2
-rw-r--r--src/mobile_image_mounter.c2
-rw-r--r--src/mobile_image_mounter.h2
-rw-r--r--src/mobilebackup.c2
-rw-r--r--src/mobilebackup.h2
-rw-r--r--src/mobilesync.c2
-rw-r--r--src/mobilesync.h2
-rw-r--r--src/notification_proxy.c2
-rw-r--r--src/notification_proxy.h2
-rw-r--r--src/property_list_service.c2
-rw-r--r--src/property_list_service.h4
-rw-r--r--src/sbservices.c2
-rw-r--r--src/sbservices.h2
-rw-r--r--src/screenshotr.c2
-rw-r--r--src/screenshotr.h2
26 files changed, 33 insertions, 34 deletions
diff --git a/src/afc.c b/src/afc.c
index 4367add..f872ed9 100644
--- a/src/afc.c
+++ b/src/afc.c
@@ -76,7 +76,7 @@ afc_error_t afc_client_new(idevice_t device, uint16_t port, afc_client_t * clien
76 return AFC_E_MUX_ERROR; 76 return AFC_E_MUX_ERROR;
77 } 77 }
78 78
79 afc_client_t client_loc = (afc_client_t) malloc(sizeof(struct afc_client_int)); 79 afc_client_t client_loc = (afc_client_t) malloc(sizeof(struct afc_client_private));
80 client_loc->connection = connection; 80 client_loc->connection = connection;
81 81
82 /* allocate a packet */ 82 /* allocate a packet */
diff --git a/src/afc.h b/src/afc.h
index 07df1ec..abf38e3 100644
--- a/src/afc.h
+++ b/src/afc.h
@@ -52,7 +52,7 @@ typedef struct {
52 uint64_t filehandle, size; 52 uint64_t filehandle, size;
53} AFCFilePacket; 53} AFCFilePacket;
54 54
55struct afc_client_int { 55struct afc_client_private {
56 idevice_connection_t connection; 56 idevice_connection_t connection;
57 AFCPacket *afc_packet; 57 AFCPacket *afc_packet;
58 int file_handle; 58 int file_handle;
diff --git a/src/device_link_service.c b/src/device_link_service.c
index 430b1db..a5befc7 100644
--- a/src/device_link_service.c
+++ b/src/device_link_service.c
@@ -90,7 +90,7 @@ device_link_service_error_t device_link_service_client_new(idevice_t device, uin
90 } 90 }
91 91
92 /* create client object */ 92 /* create client object */
93 device_link_service_client_t client_loc = (device_link_service_client_t) malloc(sizeof(struct device_link_service_client_int)); 93 device_link_service_client_t client_loc = (device_link_service_client_t) malloc(sizeof(struct device_link_service_client_private));
94 client_loc->parent = plistclient; 94 client_loc->parent = plistclient;
95 95
96 /* all done, return success */ 96 /* all done, return success */
diff --git a/src/device_link_service.h b/src/device_link_service.h
index 4e652c4..c80686d 100644
--- a/src/device_link_service.h
+++ b/src/device_link_service.h
@@ -33,13 +33,12 @@
33#define DEVICE_LINK_SERVICE_E_UNKNOWN_ERROR -256 33#define DEVICE_LINK_SERVICE_E_UNKNOWN_ERROR -256
34 34
35 35
36struct device_link_service_client_int { 36struct device_link_service_client_private {
37 property_list_service_client_t parent; 37 property_list_service_client_t parent;
38}; 38};
39 39
40typedef struct device_link_service_client_int *device_link_service_client_t;
41
42typedef int16_t device_link_service_error_t; 40typedef int16_t device_link_service_error_t;
41typedef struct device_link_service_client_private *device_link_service_client_t;
43 42
44device_link_service_error_t device_link_service_client_new(idevice_t device, uint16_t port, device_link_service_client_t *client); 43device_link_service_error_t device_link_service_client_new(idevice_t device, uint16_t port, device_link_service_client_t *client);
45device_link_service_error_t device_link_service_client_free(device_link_service_client_t client); 44device_link_service_error_t device_link_service_client_free(device_link_service_client_t client);
diff --git a/src/file_relay.c b/src/file_relay.c
index 067384f..680e28d 100644
--- a/src/file_relay.c
+++ b/src/file_relay.c
@@ -48,7 +48,7 @@ file_relay_error_t file_relay_client_new(idevice_t device, uint16_t port, file_r
48 } 48 }
49 49
50 /* create client object */ 50 /* create client object */
51 file_relay_client_t client_loc = (file_relay_client_t) malloc(sizeof(struct file_relay_client_int)); 51 file_relay_client_t client_loc = (file_relay_client_t) malloc(sizeof(struct file_relay_client_private));
52 client_loc->parent = plistclient; 52 client_loc->parent = plistclient;
53 53
54 /* all done, return success */ 54 /* all done, return success */
diff --git a/src/file_relay.h b/src/file_relay.h
index e1a133d..60cc32f 100644
--- a/src/file_relay.h
+++ b/src/file_relay.h
@@ -33,7 +33,7 @@
33#define FILE_RELAY_E_UNKNOWN_ERROR -256 33#define FILE_RELAY_E_UNKNOWN_ERROR -256
34 34
35 35
36struct file_relay_client_int { 36struct file_relay_client_private {
37 property_list_service_client_t parent; 37 property_list_service_client_t parent;
38}; 38};
39 39
diff --git a/src/idevice.c b/src/idevice.c
index c5050d5..0bdf3f5 100644
--- a/src/idevice.c
+++ b/src/idevice.c
@@ -160,7 +160,7 @@ idevice_error_t idevice_new(idevice_t * device, const char *uuid)
160 usbmuxd_device_info_t muxdev; 160 usbmuxd_device_info_t muxdev;
161 int res = usbmuxd_get_device_by_uuid(uuid, &muxdev); 161 int res = usbmuxd_get_device_by_uuid(uuid, &muxdev);
162 if (res > 0) { 162 if (res > 0) {
163 idevice_t phone = (idevice_t) malloc(sizeof(struct idevice_int)); 163 idevice_t phone = (idevice_t) malloc(sizeof(struct idevice_private));
164 phone->uuid = strdup(muxdev.uuid); 164 phone->uuid = strdup(muxdev.uuid);
165 phone->conn_type = CONNECTION_USBMUXD; 165 phone->conn_type = CONNECTION_USBMUXD;
166 phone->conn_data = (void*)muxdev.handle; 166 phone->conn_data = (void*)muxdev.handle;
@@ -220,7 +220,7 @@ idevice_error_t idevice_connect(idevice_t device, uint16_t port, idevice_connect
220 debug_info("ERROR: Connecting to usbmuxd failed: %d (%s)", sfd, strerror(-sfd)); 220 debug_info("ERROR: Connecting to usbmuxd failed: %d (%s)", sfd, strerror(-sfd));
221 return IDEVICE_E_UNKNOWN_ERROR; 221 return IDEVICE_E_UNKNOWN_ERROR;
222 } 222 }
223 idevice_connection_t new_connection = (idevice_connection_t)malloc(sizeof(struct idevice_connection_int)); 223 idevice_connection_t new_connection = (idevice_connection_t)malloc(sizeof(struct idevice_connection_private));
224 new_connection->type = CONNECTION_USBMUXD; 224 new_connection->type = CONNECTION_USBMUXD;
225 new_connection->data = (void*)sfd; 225 new_connection->data = (void*)sfd;
226 new_connection->ssl_data = NULL; 226 new_connection->ssl_data = NULL;
@@ -536,7 +536,7 @@ idevice_error_t idevice_connection_enable_ssl(idevice_connection_t connection)
536 idevice_error_t ret = IDEVICE_E_SSL_ERROR; 536 idevice_error_t ret = IDEVICE_E_SSL_ERROR;
537 uint32_t return_me = 0; 537 uint32_t return_me = 0;
538 538
539 ssl_data_t ssl_data_loc = (ssl_data_t)malloc(sizeof(struct ssl_data_int)); 539 ssl_data_t ssl_data_loc = (ssl_data_t)malloc(sizeof(struct ssl_data_private));
540 540
541 // Set up GnuTLS... 541 // Set up GnuTLS...
542 debug_info("enabling SSL mode"); 542 debug_info("enabling SSL mode");
diff --git a/src/idevice.h b/src/idevice.h
index 4aab440..5d83e4c 100644
--- a/src/idevice.h
+++ b/src/idevice.h
@@ -30,19 +30,19 @@ enum connection_type {
30 CONNECTION_USBMUXD = 1 30 CONNECTION_USBMUXD = 1
31}; 31};
32 32
33struct ssl_data_int { 33struct ssl_data_private {
34 gnutls_certificate_credentials_t certificate; 34 gnutls_certificate_credentials_t certificate;
35 gnutls_session_t session; 35 gnutls_session_t session;
36}; 36};
37typedef struct ssl_data_int *ssl_data_t; 37typedef struct ssl_data_private *ssl_data_t;
38 38
39struct idevice_connection_int { 39struct idevice_connection_private {
40 enum connection_type type; 40 enum connection_type type;
41 void *data; 41 void *data;
42 ssl_data_t ssl_data; 42 ssl_data_t ssl_data;
43}; 43};
44 44
45struct idevice_int { 45struct idevice_private {
46 char *uuid; 46 char *uuid;
47 enum connection_type conn_type; 47 enum connection_type conn_type;
48 void *conn_data; 48 void *conn_data;
diff --git a/src/installation_proxy.c b/src/installation_proxy.c
index 9fb5109..40e4bc5 100644
--- a/src/installation_proxy.c
+++ b/src/installation_proxy.c
@@ -108,7 +108,7 @@ instproxy_error_t instproxy_client_new(idevice_t device, uint16_t port, instprox
108 return INSTPROXY_E_CONN_FAILED; 108 return INSTPROXY_E_CONN_FAILED;
109 } 109 }
110 110
111 instproxy_client_t client_loc = (instproxy_client_t) malloc(sizeof(struct instproxy_client_int)); 111 instproxy_client_t client_loc = (instproxy_client_t) malloc(sizeof(struct instproxy_client_private));
112 client_loc->parent = plistclient; 112 client_loc->parent = plistclient;
113 client_loc->mutex = g_mutex_new(); 113 client_loc->mutex = g_mutex_new();
114 client_loc->status_updater = NULL; 114 client_loc->status_updater = NULL;
diff --git a/src/installation_proxy.h b/src/installation_proxy.h
index 91eed2b..b497d62 100644
--- a/src/installation_proxy.h
+++ b/src/installation_proxy.h
@@ -26,7 +26,7 @@
26#include "libimobiledevice/installation_proxy.h" 26#include "libimobiledevice/installation_proxy.h"
27#include "property_list_service.h" 27#include "property_list_service.h"
28 28
29struct instproxy_client_int { 29struct instproxy_client_private {
30 property_list_service_client_t parent; 30 property_list_service_client_t parent;
31 GMutex *mutex; 31 GMutex *mutex;
32 GThread *status_updater; 32 GThread *status_updater;
diff --git a/src/lockdown.c b/src/lockdown.c
index 512ec9e..25a6c6a 100644
--- a/src/lockdown.c
+++ b/src/lockdown.c
@@ -591,7 +591,7 @@ lockdownd_error_t lockdownd_client_new(idevice_t device, lockdownd_client_t *cli
591 return LOCKDOWN_E_MUX_ERROR; 591 return LOCKDOWN_E_MUX_ERROR;
592 } 592 }
593 593
594 lockdownd_client_t client_loc = (lockdownd_client_t) malloc(sizeof(struct lockdownd_client_int)); 594 lockdownd_client_t client_loc = (lockdownd_client_t) malloc(sizeof(struct lockdownd_client_private));
595 client_loc->parent = plistclient; 595 client_loc->parent = plistclient;
596 client_loc->ssl_enabled = 0; 596 client_loc->ssl_enabled = 0;
597 client_loc->session_id = NULL; 597 client_loc->session_id = NULL;
diff --git a/src/lockdown.h b/src/lockdown.h
index f515f7f..bf3ac38 100644
--- a/src/lockdown.h
+++ b/src/lockdown.h
@@ -28,7 +28,7 @@
28#include "libimobiledevice/lockdown.h" 28#include "libimobiledevice/lockdown.h"
29#include "property_list_service.h" 29#include "property_list_service.h"
30 30
31struct lockdownd_client_int { 31struct lockdownd_client_private {
32 property_list_service_client_t parent; 32 property_list_service_client_t parent;
33 int ssl_enabled; 33 int ssl_enabled;
34 char *session_id; 34 char *session_id;
diff --git a/src/mobile_image_mounter.c b/src/mobile_image_mounter.c
index 88b6c47..9c50084 100644
--- a/src/mobile_image_mounter.c
+++ b/src/mobile_image_mounter.c
@@ -104,7 +104,7 @@ mobile_image_mounter_error_t mobile_image_mounter_new(idevice_t device, uint16_t
104 return MOBILE_IMAGE_MOUNTER_E_CONN_FAILED; 104 return MOBILE_IMAGE_MOUNTER_E_CONN_FAILED;
105 } 105 }
106 106
107 mobile_image_mounter_client_t client_loc = (mobile_image_mounter_client_t) malloc(sizeof(struct mobile_image_mounter_client_int)); 107 mobile_image_mounter_client_t client_loc = (mobile_image_mounter_client_t) malloc(sizeof(struct mobile_image_mounter_client_private));
108 client_loc->parent = plistclient; 108 client_loc->parent = plistclient;
109 109
110 client_loc->mutex = g_mutex_new(); 110 client_loc->mutex = g_mutex_new();
diff --git a/src/mobile_image_mounter.h b/src/mobile_image_mounter.h
index da8bf3e..2615dbc 100644
--- a/src/mobile_image_mounter.h
+++ b/src/mobile_image_mounter.h
@@ -26,7 +26,7 @@
26#include "libimobiledevice/mobile_image_mounter.h" 26#include "libimobiledevice/mobile_image_mounter.h"
27#include "property_list_service.h" 27#include "property_list_service.h"
28 28
29struct mobile_image_mounter_client_int { 29struct mobile_image_mounter_client_private {
30 property_list_service_client_t parent; 30 property_list_service_client_t parent;
31 GMutex *mutex; 31 GMutex *mutex;
32}; 32};
diff --git a/src/mobilebackup.c b/src/mobilebackup.c
index d4f36d6..c5f0a84 100644
--- a/src/mobilebackup.c
+++ b/src/mobilebackup.c
@@ -71,7 +71,7 @@ mobilebackup_error_t mobilebackup_client_new(idevice_t device, uint16_t port,
71 return ret; 71 return ret;
72 } 72 }
73 73
74 mobilebackup_client_t client_loc = (mobilebackup_client_t) malloc(sizeof(struct mobilebackup_client_int)); 74 mobilebackup_client_t client_loc = (mobilebackup_client_t) malloc(sizeof(struct mobilebackup_client_private));
75 client_loc->parent = dlclient; 75 client_loc->parent = dlclient;
76 76
77 /* perform handshake */ 77 /* perform handshake */
diff --git a/src/mobilebackup.h b/src/mobilebackup.h
index 8f58236..2c5be62 100644
--- a/src/mobilebackup.h
+++ b/src/mobilebackup.h
@@ -24,7 +24,7 @@
24#include "libimobiledevice/mobilebackup.h" 24#include "libimobiledevice/mobilebackup.h"
25#include "device_link_service.h" 25#include "device_link_service.h"
26 26
27struct mobilebackup_client_int { 27struct mobilebackup_client_private {
28 device_link_service_client_t parent; 28 device_link_service_client_t parent;
29}; 29};
30 30
diff --git a/src/mobilesync.c b/src/mobilesync.c
index fec97bc..88d8497 100644
--- a/src/mobilesync.c
+++ b/src/mobilesync.c
@@ -71,7 +71,7 @@ mobilesync_error_t mobilesync_client_new(idevice_t device, uint16_t port,
71 return ret; 71 return ret;
72 } 72 }
73 73
74 mobilesync_client_t client_loc = (mobilesync_client_t) malloc(sizeof(struct mobilesync_client_int)); 74 mobilesync_client_t client_loc = (mobilesync_client_t) malloc(sizeof(struct mobilesync_client_private));
75 client_loc->parent = dlclient; 75 client_loc->parent = dlclient;
76 76
77 /* perform handshake */ 77 /* perform handshake */
diff --git a/src/mobilesync.h b/src/mobilesync.h
index defb3f4..8317c69 100644
--- a/src/mobilesync.h
+++ b/src/mobilesync.h
@@ -24,7 +24,7 @@
24#include "libimobiledevice/mobilesync.h" 24#include "libimobiledevice/mobilesync.h"
25#include "device_link_service.h" 25#include "device_link_service.h"
26 26
27struct mobilesync_client_int { 27struct mobilesync_client_private {
28 device_link_service_client_t parent; 28 device_link_service_client_t parent;
29}; 29};
30 30
diff --git a/src/notification_proxy.c b/src/notification_proxy.c
index 41647c8..b82378a 100644
--- a/src/notification_proxy.c
+++ b/src/notification_proxy.c
@@ -110,7 +110,7 @@ np_error_t np_client_new(idevice_t device, uint16_t port, np_client_t *client)
110 return NP_E_CONN_FAILED; 110 return NP_E_CONN_FAILED;
111 } 111 }
112 112
113 np_client_t client_loc = (np_client_t) malloc(sizeof(struct np_client_int)); 113 np_client_t client_loc = (np_client_t) malloc(sizeof(struct np_client_private));
114 client_loc->parent = plistclient; 114 client_loc->parent = plistclient;
115 115
116 client_loc->mutex = g_mutex_new(); 116 client_loc->mutex = g_mutex_new();
diff --git a/src/notification_proxy.h b/src/notification_proxy.h
index 442f5d8..8d5cd24 100644
--- a/src/notification_proxy.h
+++ b/src/notification_proxy.h
@@ -26,7 +26,7 @@
26#include "libimobiledevice/notification_proxy.h" 26#include "libimobiledevice/notification_proxy.h"
27#include "property_list_service.h" 27#include "property_list_service.h"
28 28
29struct np_client_int { 29struct np_client_private {
30 property_list_service_client_t parent; 30 property_list_service_client_t parent;
31 GMutex *mutex; 31 GMutex *mutex;
32 GThread *notifier; 32 GThread *notifier;
diff --git a/src/property_list_service.c b/src/property_list_service.c
index 68aa455..56e735b 100644
--- a/src/property_list_service.c
+++ b/src/property_list_service.c
@@ -76,7 +76,7 @@ property_list_service_error_t property_list_service_client_new(idevice_t device,
76 } 76 }
77 77
78 /* create client object */ 78 /* create client object */
79 property_list_service_client_t client_loc = (property_list_service_client_t)malloc(sizeof(struct property_list_service_client_int)); 79 property_list_service_client_t client_loc = (property_list_service_client_t)malloc(sizeof(struct property_list_service_client_private));
80 client_loc->connection = connection; 80 client_loc->connection = connection;
81 81
82 *client = client_loc; 82 *client = client_loc;
diff --git a/src/property_list_service.h b/src/property_list_service.h
index 70d8793..037f9aa 100644
--- a/src/property_list_service.h
+++ b/src/property_list_service.h
@@ -32,11 +32,11 @@
32 32
33#define PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR -256 33#define PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR -256
34 34
35struct property_list_service_client_int { 35struct property_list_service_client_private {
36 idevice_connection_t connection; 36 idevice_connection_t connection;
37}; 37};
38 38
39typedef struct property_list_service_client_int *property_list_service_client_t; 39typedef struct property_list_service_client_private *property_list_service_client_t;
40 40
41typedef int16_t property_list_service_error_t; 41typedef int16_t property_list_service_error_t;
42 42
diff --git a/src/sbservices.c b/src/sbservices.c
index 25602d3..91f4b9c 100644
--- a/src/sbservices.c
+++ b/src/sbservices.c
@@ -103,7 +103,7 @@ sbservices_error_t sbservices_client_new(idevice_t device, uint16_t port, sbserv
103 return err; 103 return err;
104 } 104 }
105 105
106 sbservices_client_t client_loc = (sbservices_client_t) malloc(sizeof(struct sbservices_client_int)); 106 sbservices_client_t client_loc = (sbservices_client_t) malloc(sizeof(struct sbservices_client_private));
107 client_loc->parent = plistclient; 107 client_loc->parent = plistclient;
108 client_loc->mutex = g_mutex_new(); 108 client_loc->mutex = g_mutex_new();
109 109
diff --git a/src/sbservices.h b/src/sbservices.h
index 7be1447..3a4120f 100644
--- a/src/sbservices.h
+++ b/src/sbservices.h
@@ -26,7 +26,7 @@
26#include "libimobiledevice/sbservices.h" 26#include "libimobiledevice/sbservices.h"
27#include "property_list_service.h" 27#include "property_list_service.h"
28 28
29struct sbservices_client_int { 29struct sbservices_client_private {
30 property_list_service_client_t parent; 30 property_list_service_client_t parent;
31 GMutex *mutex; 31 GMutex *mutex;
32}; 32};
diff --git a/src/screenshotr.c b/src/screenshotr.c
index 07c51ca..380d28c 100644
--- a/src/screenshotr.c
+++ b/src/screenshotr.c
@@ -86,7 +86,7 @@ screenshotr_error_t screenshotr_client_new(idevice_t device, uint16_t port,
86 return ret; 86 return ret;
87 } 87 }
88 88
89 screenshotr_client_t client_loc = (screenshotr_client_t) malloc(sizeof(struct screenshotr_client_int)); 89 screenshotr_client_t client_loc = (screenshotr_client_t) malloc(sizeof(struct screenshotr_client_private));
90 client_loc->parent = dlclient; 90 client_loc->parent = dlclient;
91 91
92 /* perform handshake */ 92 /* perform handshake */
diff --git a/src/screenshotr.h b/src/screenshotr.h
index 97172dc..5ba93b0 100644
--- a/src/screenshotr.h
+++ b/src/screenshotr.h
@@ -24,7 +24,7 @@
24#include "libimobiledevice/screenshotr.h" 24#include "libimobiledevice/screenshotr.h"
25#include "device_link_service.h" 25#include "device_link_service.h"
26 26
27struct screenshotr_client_int { 27struct screenshotr_client_private {
28 device_link_service_client_t parent; 28 device_link_service_client_t parent;
29}; 29};
30 30