summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2009-07-24 17:46:30 +0200
committerGravatar Martin Szulecki2009-07-24 17:46:30 +0200
commit601e70e8ee757b769bdc10b16e108e846a1a0b93 (patch)
tree42f377a16f90da737bc68927845ffb9888805733
parentf995c63e1bc56dd2d098a06f130d55334979f38f (diff)
downloadlibimobiledevice-601e70e8ee757b769bdc10b16e108e846a1a0b93.tar.gz
libimobiledevice-601e70e8ee757b769bdc10b16e108e846a1a0b93.tar.bz2
Rename iphone_set_debug() to iphone_set_debug_level() and code using it
-rw-r--r--dev/iphone_id.c2
-rw-r--r--dev/iphoneinfo.c2
-rw-r--r--dev/lckdclient.c2
-rw-r--r--dev/main.c4
-rw-r--r--dev/syslog_relay.c2
-rw-r--r--include/libiphone/libiphone.h4
-rw-r--r--src/utils.c2
-rw-r--r--swig/iphone.i2
8 files changed, 10 insertions, 10 deletions
diff --git a/dev/iphone_id.c b/dev/iphone_id.c
index 15081f0..dde15bc 100644
--- a/dev/iphone_id.c
+++ b/dev/iphone_id.c
@@ -60,7 +60,7 @@ int main(int argc, char **argv)
60 return 0; 60 return 0;
61 } 61 }
62 62
63 iphone_set_debug(0); 63 iphone_set_debug_level(0);
64 64
65 iphone_get_device_by_uuid(&phone, argv[0]); 65 iphone_get_device_by_uuid(&phone, argv[0]);
66 if (!phone) { 66 if (!phone) {
diff --git a/dev/iphoneinfo.c b/dev/iphoneinfo.c
index 67e7552..02b62d5 100644
--- a/dev/iphoneinfo.c
+++ b/dev/iphoneinfo.c
@@ -73,7 +73,7 @@ int main(int argc, char *argv[])
73 for (i = 1; i < argc; i++) { 73 for (i = 1; i < argc; i++) {
74 if (!strcmp(argv[i], "-d") || !strcmp(argv[i], "--debug")) { 74 if (!strcmp(argv[i], "-d") || !strcmp(argv[i], "--debug")) {
75 iphone_set_debug_mask(DBGMASK_ALL); 75 iphone_set_debug_mask(DBGMASK_ALL);
76 iphone_set_debug(1); 76 iphone_set_debug_level(1);
77 continue; 77 continue;
78 } 78 }
79 else if (!strcmp(argv[i], "-u") || !strcmp(argv[i], "--uuid")) { 79 else if (!strcmp(argv[i], "-u") || !strcmp(argv[i], "--uuid")) {
diff --git a/dev/lckdclient.c b/dev/lckdclient.c
index e7ad962..820d05f 100644
--- a/dev/lckdclient.c
+++ b/dev/lckdclient.c
@@ -34,7 +34,7 @@ int main(int argc, char *argv[])
34 lockdownd_client_t client = NULL; 34 lockdownd_client_t client = NULL;
35 iphone_device_t phone = NULL; 35 iphone_device_t phone = NULL;
36 36
37 iphone_set_debug(1); 37 iphone_set_debug_level(1);
38 38
39 if (IPHONE_E_SUCCESS != iphone_get_device(&phone)) { 39 if (IPHONE_E_SUCCESS != iphone_get_device(&phone)) {
40 printf("No iPhone found, is it plugged in?\n"); 40 printf("No iPhone found, is it plugged in?\n");
diff --git a/dev/main.c b/dev/main.c
index b4e5c34..9c8b155 100644
--- a/dev/main.c
+++ b/dev/main.c
@@ -68,10 +68,10 @@ int main(int argc, char *argv[])
68 np_client_t gnp = NULL; 68 np_client_t gnp = NULL;
69 69
70 if (argc > 1 && !strcasecmp(argv[1], "--debug")) { 70 if (argc > 1 && !strcasecmp(argv[1], "--debug")) {
71 iphone_set_debug(1); 71 iphone_set_debug_level(1);
72 iphone_set_debug_mask(DBGMASK_ALL); 72 iphone_set_debug_mask(DBGMASK_ALL);
73 } else { 73 } else {
74 iphone_set_debug(0); 74 iphone_set_debug_level(0);
75 iphone_set_debug_mask(DBGMASK_NONE); 75 iphone_set_debug_mask(DBGMASK_NONE);
76 } 76 }
77 77
diff --git a/dev/syslog_relay.c b/dev/syslog_relay.c
index a93e85b..09be6b8 100644
--- a/dev/syslog_relay.c
+++ b/dev/syslog_relay.c
@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
62 for (i = 1; i < argc; i++) { 62 for (i = 1; i < argc; i++) {
63 if (!strcmp(argv[i], "-d") || !strcmp(argv[i], "--debug")) { 63 if (!strcmp(argv[i], "-d") || !strcmp(argv[i], "--debug")) {
64 iphone_set_debug_mask(DBGMASK_ALL); 64 iphone_set_debug_mask(DBGMASK_ALL);
65 iphone_set_debug(1); 65 iphone_set_debug_level(1);
66 continue; 66 continue;
67 } 67 }
68 else if (!strcmp(argv[i], "-u") || !strcmp(argv[i], "--uuid")) { 68 else if (!strcmp(argv[i], "-u") || !strcmp(argv[i], "--uuid")) {
diff --git a/include/libiphone/libiphone.h b/include/libiphone/libiphone.h
index fa26d14..fef59e0 100644
--- a/include/libiphone/libiphone.h
+++ b/include/libiphone/libiphone.h
@@ -57,7 +57,7 @@ typedef int16_t iphone_error_t;
57struct iphone_device_int; 57struct iphone_device_int;
58typedef struct iphone_device_int *iphone_device_t; 58typedef struct iphone_device_int *iphone_device_t;
59 59
60//debug related functions 60/* Debugging */
61#define DBGMASK_ALL 0xFFFF 61#define DBGMASK_ALL 0xFFFF
62#define DBGMASK_NONE 0x0000 62#define DBGMASK_NONE 0x0000
63#define DBGMASK_USBMUX (1 << 1) 63#define DBGMASK_USBMUX (1 << 1)
@@ -65,7 +65,7 @@ typedef struct iphone_device_int *iphone_device_t;
65#define DBGMASK_MOBILESYNC (1 << 3) 65#define DBGMASK_MOBILESYNC (1 << 3)
66 66
67void iphone_set_debug_mask(uint16_t mask); 67void iphone_set_debug_mask(uint16_t mask);
68void iphone_set_debug(int level); 68void iphone_set_debug_level(int level);
69 69
70//device related functions 70//device related functions
71iphone_error_t iphone_get_device(iphone_device_t *device); 71iphone_error_t iphone_get_device(iphone_device_t *device);
diff --git a/src/utils.c b/src/utils.c
index 5b0872d..121bc55 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -31,7 +31,7 @@ uint16_t dbg_mask = 0;
31 * 31 *
32 * @param level Set to 0 for no debugging or 1 for debugging. 32 * @param level Set to 0 for no debugging or 1 for debugging.
33 */ 33 */
34void iphone_set_debug(int level) 34void iphone_set_debug_level(int level)
35{ 35{
36 toto_debug = level; 36 toto_debug = level;
37} 37}
diff --git a/swig/iphone.i b/swig/iphone.i
index 53fa8da..a089cc2 100644
--- a/swig/iphone.i
+++ b/swig/iphone.i
@@ -118,7 +118,7 @@ MobileSync* my_new_MobileSync(Lockdownd* lckd) {
118 } 118 }
119 119
120 void set_debug_level(int level) { 120 void set_debug_level(int level) {
121 iphone_set_debug(level); 121 iphone_set_debug_level(level);
122 } 122 }
123 123
124 int init_device_by_uuid(char* uuid) { 124 int init_device_by_uuid(char* uuid) {