diff options
Diffstat (limited to 'dev')
| -rw-r--r-- | dev/Makefile.am | 24 | ||||
| -rw-r--r-- | dev/afccheck.c | 24 | ||||
| -rw-r--r-- | dev/filerelaytest.c | 16 | ||||
| -rw-r--r-- | dev/ideviceclient.c (renamed from dev/iphoneclient.c) | 38 | ||||
| -rw-r--r-- | dev/ideviceenterrecovery.c (renamed from dev/iphoneenterrecovery.c) | 22 | ||||
| -rw-r--r-- | dev/lckdclient.c | 18 | ||||
| -rwxr-xr-x | dev/msync.py | 4 | ||||
| -rw-r--r-- | dev/msyncclient.c | 20 |
8 files changed, 83 insertions, 83 deletions
diff --git a/dev/Makefile.am b/dev/Makefile.am index 1ca15e5..9b3ec6a 100644 --- a/dev/Makefile.am +++ b/dev/Makefile.am | |||
| @@ -4,36 +4,36 @@ AM_CFLAGS = $(GLOBAL_CFLAGS) $(libglib2_CFLAGS) $(libgnutls_CFLAGS) $(libtasn1_C | |||
| 4 | AM_LDFLAGS = $(libglib2_LIBS) $(libgnutls_LIBS) $(libtasn1_LIBS) $(libgthread2_LIBS) | 4 | AM_LDFLAGS = $(libglib2_LIBS) $(libgnutls_LIBS) $(libtasn1_LIBS) $(libgthread2_LIBS) |
| 5 | 5 | ||
| 6 | if ENABLE_DEVTOOLS | 6 | if ENABLE_DEVTOOLS |
| 7 | noinst_PROGRAMS = iphoneclient lckd-client afccheck msyncclient iphoneenterrecovery filerelaytest | 7 | noinst_PROGRAMS = ideviceclient lckd-client afccheck msyncclient ideviceenterrecovery filerelaytest |
| 8 | 8 | ||
| 9 | iphoneclient_SOURCES = iphoneclient.c | 9 | ideviceclient_SOURCES = ideviceclient.c |
| 10 | iphoneclient_LDADD = ../src/libiphone.la | 10 | ideviceclient_LDADD = ../src/libimobiledevice.la |
| 11 | 11 | ||
| 12 | lckd_client_SOURCES = lckdclient.c | 12 | lckd_client_SOURCES = lckdclient.c |
| 13 | lckd_client_CFLAGS = $(AM_CFLAGS) | 13 | lckd_client_CFLAGS = $(AM_CFLAGS) |
| 14 | lckd_client_LDFLAGS = -lreadline $(AM_LDFLAGS) | 14 | lckd_client_LDFLAGS = -lreadline $(AM_LDFLAGS) |
| 15 | lckd_client_LDADD = ../src/libiphone.la | 15 | lckd_client_LDADD = ../src/libimobiledevice.la |
| 16 | 16 | ||
| 17 | afccheck_SOURCES = afccheck.c | 17 | afccheck_SOURCES = afccheck.c |
| 18 | afccheck_CFLAGS = $(AM_CFLAGS) | 18 | afccheck_CFLAGS = $(AM_CFLAGS) |
| 19 | afccheck_LDFLAGS = $(AM_LDFLAGS) | 19 | afccheck_LDFLAGS = $(AM_LDFLAGS) |
| 20 | afccheck_LDADD = ../src/libiphone.la | 20 | afccheck_LDADD = ../src/libimobiledevice.la |
| 21 | 21 | ||
| 22 | msyncclient_SOURCES = msyncclient.c | 22 | msyncclient_SOURCES = msyncclient.c |
| 23 | msyncclient_CFLAGS = $(AM_CFLAGS) | 23 | msyncclient_CFLAGS = $(AM_CFLAGS) |
| 24 | msyncclient_LDFLAGS = $(AM_LDFLAGS) | 24 | msyncclient_LDFLAGS = $(AM_LDFLAGS) |
| 25 | msyncclient_LDADD = ../src/libiphone.la | 25 | msyncclient_LDADD = ../src/libimobiledevice.la |
| 26 | 26 | ||
| 27 | iphoneenterrecovery_SOURCES = iphoneenterrecovery.c | 27 | ideviceenterrecovery_SOURCES = ideviceenterrecovery.c |
| 28 | iphoneenterrecovery_CFLAGS = $(AM_CFLAGS) | 28 | ideviceenterrecovery_CFLAGS = $(AM_CFLAGS) |
| 29 | iphoneenterrecovery_LDFLAGS = $(AM_LDFLAGS) | 29 | ideviceenterrecovery_LDFLAGS = $(AM_LDFLAGS) |
| 30 | iphoneenterrecovery_LDADD = ../src/libiphone.la | 30 | ideviceenterrecovery_LDADD = ../src/libimobiledevice.la |
| 31 | 31 | ||
| 32 | filerelaytest_SOURCES = filerelaytest.c | 32 | filerelaytest_SOURCES = filerelaytest.c |
| 33 | filerelaytest_CFLAGS = $(AM_CFLAGS) | 33 | filerelaytest_CFLAGS = $(AM_CFLAGS) |
| 34 | filerelaytest_LDFLAGS = $(AM_LDFLAGS) | 34 | filerelaytest_LDFLAGS = $(AM_LDFLAGS) |
| 35 | filerelaytest_LDADD = ../src/libiphone.la | 35 | filerelaytest_LDADD = ../src/libimobiledevice.la |
| 36 | 36 | ||
| 37 | endif # ENABLE_DEVTOOLS | 37 | endif # ENABLE_DEVTOOLS |
| 38 | 38 | ||
| 39 | EXTRA_DIST = iphoneclient.c lckdclient.c afccheck.c msyncclient.c iphoneenterrecovery.c | 39 | EXTRA_DIST = ideviceclient.c lckdclient.c afccheck.c msyncclient.c ideviceenterrecovery.c |
diff --git a/dev/afccheck.c b/dev/afccheck.c index 569acf1..b4d8910 100644 --- a/dev/afccheck.c +++ b/dev/afccheck.c | |||
| @@ -24,9 +24,9 @@ | |||
| 24 | #include <string.h> | 24 | #include <string.h> |
| 25 | #include <glib.h> | 25 | #include <glib.h> |
| 26 | 26 | ||
| 27 | #include <libiphone/libiphone.h> | 27 | #include <libimobiledevice/libimobiledevice.h> |
| 28 | #include <libiphone/lockdown.h> | 28 | #include <libimobiledevice/lockdown.h> |
| 29 | #include <libiphone/afc.h> | 29 | #include <libimobiledevice/afc.h> |
| 30 | 30 | ||
| 31 | #define BUFFER_SIZE 20000 | 31 | #define BUFFER_SIZE 20000 |
| 32 | #define NB_THREADS 10 | 32 | #define NB_THREADS 10 |
| @@ -53,7 +53,7 @@ static void check_afc(gpointer data) | |||
| 53 | buf[i] = ((param *) data)->id * i; | 53 | buf[i] = ((param *) data)->id * i; |
| 54 | } | 54 | } |
| 55 | 55 | ||
| 56 | //now writes buffer on iphone | 56 | //now writes buffer on device |
| 57 | uint64_t file = 0; | 57 | uint64_t file = 0; |
| 58 | char path[50]; | 58 | char path[50]; |
| 59 | sprintf(path, "/Buf%i", ((param *) data)->id); | 59 | sprintf(path, "/Buf%i", ((param *) data)->id); |
| @@ -91,30 +91,30 @@ static void check_afc(gpointer data) | |||
| 91 | int main(int argc, char *argv[]) | 91 | int main(int argc, char *argv[]) |
| 92 | { | 92 | { |
| 93 | lockdownd_client_t client = NULL; | 93 | lockdownd_client_t client = NULL; |
| 94 | iphone_device_t phone = NULL; | 94 | idevice_t phone = NULL; |
| 95 | GError *err; | 95 | GError *err; |
| 96 | uint16_t port = 0; | 96 | uint16_t port = 0; |
| 97 | afc_client_t afc = NULL; | 97 | afc_client_t afc = NULL; |
| 98 | 98 | ||
| 99 | if (argc > 1 && !strcasecmp(argv[1], "--debug")) { | 99 | if (argc > 1 && !strcasecmp(argv[1], "--debug")) { |
| 100 | iphone_set_debug_level(1); | 100 | idevice_set_debug_level(1); |
| 101 | } else { | 101 | } else { |
| 102 | iphone_set_debug_level(0); | 102 | idevice_set_debug_level(0); |
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | if (IPHONE_E_SUCCESS != iphone_device_new(&phone, NULL)) { | 105 | if (IDEVICE_E_SUCCESS != idevice_new(&phone, NULL)) { |
| 106 | printf("No iPhone found, is it plugged in?\n"); | 106 | printf("No device found, is it plugged in?\n"); |
| 107 | return 1; | 107 | return 1; |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "afccheck")) { | 110 | if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "afccheck")) { |
| 111 | iphone_device_free(phone); | 111 | idevice_free(phone); |
| 112 | return 1; | 112 | return 1; |
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | if (LOCKDOWN_E_SUCCESS == lockdownd_start_service(client, "com.apple.afc", &port) && !port) { | 115 | if (LOCKDOWN_E_SUCCESS == lockdownd_start_service(client, "com.apple.afc", &port) && !port) { |
| 116 | lockdownd_client_free(client); | 116 | lockdownd_client_free(client); |
| 117 | iphone_device_free(phone); | 117 | idevice_free(phone); |
| 118 | fprintf(stderr, "Something went wrong when starting AFC."); | 118 | fprintf(stderr, "Something went wrong when starting AFC."); |
| 119 | return 1; | 119 | return 1; |
| 120 | } | 120 | } |
| @@ -140,7 +140,7 @@ int main(int argc, char *argv[]) | |||
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | lockdownd_client_free(client); | 142 | lockdownd_client_free(client); |
| 143 | iphone_device_free(phone); | 143 | idevice_free(phone); |
| 144 | 144 | ||
| 145 | return 0; | 145 | return 0; |
| 146 | } | 146 | } |
diff --git a/dev/filerelaytest.c b/dev/filerelaytest.c index f7e0d07..caaa491 100644 --- a/dev/filerelaytest.c +++ b/dev/filerelaytest.c | |||
| @@ -19,17 +19,17 @@ | |||
| 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 20 | */ | 20 | */ |
| 21 | #include <stdio.h> | 21 | #include <stdio.h> |
| 22 | #include <libiphone/libiphone.h> | 22 | #include <libimobiledevice/libimobiledevice.h> |
| 23 | #include <libiphone/lockdown.h> | 23 | #include <libimobiledevice/lockdown.h> |
| 24 | #include <libiphone/file_relay.h> | 24 | #include <libimobiledevice/file_relay.h> |
| 25 | 25 | ||
| 26 | int main(int argc, char **argv) | 26 | int main(int argc, char **argv) |
| 27 | { | 27 | { |
| 28 | iphone_device_t dev = NULL; | 28 | idevice_t dev = NULL; |
| 29 | lockdownd_client_t client = NULL; | 29 | lockdownd_client_t client = NULL; |
| 30 | file_relay_client_t frc = NULL; | 30 | file_relay_client_t frc = NULL; |
| 31 | 31 | ||
| 32 | if (iphone_device_new(&dev, NULL) != IPHONE_E_SUCCESS) { | 32 | if (idevice_new(&dev, NULL) != IDEVICE_E_SUCCESS) { |
| 33 | printf("no device connected?!\n"); | 33 | printf("no device connected?!\n"); |
| 34 | goto leave_cleanup; | 34 | goto leave_cleanup; |
| 35 | } | 35 | } |
| @@ -56,7 +56,7 @@ int main(int argc, char **argv) | |||
| 56 | goto leave_cleanup; | 56 | goto leave_cleanup; |
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | iphone_connection_t dump = NULL; | 59 | idevice_connection_t dump = NULL; |
| 60 | const char *sources[] = {"AppleSupport", "Network", "VPN", "WiFi", "UserDatabases", "CrashReporter", "tmp", "SystemConfiguration", NULL}; | 60 | const char *sources[] = {"AppleSupport", "Network", "VPN", "WiFi", "UserDatabases", "CrashReporter", "tmp", "SystemConfiguration", NULL}; |
| 61 | 61 | ||
| 62 | printf("Requesting"); | 62 | printf("Requesting"); |
| @@ -83,7 +83,7 @@ int main(int argc, char **argv) | |||
| 83 | FILE *f = fopen("dump.cpio.gz", "w"); | 83 | FILE *f = fopen("dump.cpio.gz", "w"); |
| 84 | setbuf(stdout, NULL); | 84 | setbuf(stdout, NULL); |
| 85 | printf("receiving "); | 85 | printf("receiving "); |
| 86 | while (iphone_connection_receive(dump, buf, 4096, &len) == IPHONE_E_SUCCESS) { | 86 | while (idevice_connection_receive(dump, buf, 4096, &len) == IDEVICE_E_SUCCESS) { |
| 87 | fwrite(buf, 1, len, f); | 87 | fwrite(buf, 1, len, f); |
| 88 | cnt += len; | 88 | cnt += len; |
| 89 | printf(".", len); | 89 | printf(".", len); |
| @@ -101,7 +101,7 @@ leave_cleanup: | |||
| 101 | lockdownd_client_free(client); | 101 | lockdownd_client_free(client); |
| 102 | } | 102 | } |
| 103 | if (dev) { | 103 | if (dev) { |
| 104 | iphone_device_free(dev); | 104 | idevice_free(dev); |
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | return 0; | 107 | return 0; |
diff --git a/dev/iphoneclient.c b/dev/ideviceclient.c index eab903c..2ed93d2 100644 --- a/dev/iphoneclient.c +++ b/dev/ideviceclient.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * main.c | 2 | * main.c |
| 3 | * Rudimentary interface to the iPhone | 3 | * Test program for testing several services. |
| 4 | * | 4 | * |
| 5 | * Copyright (c) 2008 Zach C. All Rights Reserved. | 5 | * Copyright (c) 2008 Zach C. All Rights Reserved. |
| 6 | * | 6 | * |
| @@ -25,10 +25,10 @@ | |||
| 25 | #include <errno.h> | 25 | #include <errno.h> |
| 26 | #include <glib.h> | 26 | #include <glib.h> |
| 27 | 27 | ||
| 28 | #include <libiphone/libiphone.h> | 28 | #include <libimobiledevice/libimobiledevice.h> |
| 29 | #include <libiphone/lockdown.h> | 29 | #include <libimobiledevice/lockdown.h> |
| 30 | #include <libiphone/afc.h> | 30 | #include <libimobiledevice/afc.h> |
| 31 | #include <libiphone/notification_proxy.h> | 31 | #include <libimobiledevice/notification_proxy.h> |
| 32 | 32 | ||
| 33 | static void notifier(const char *notification) | 33 | static void notifier(const char *notification) |
| 34 | { | 34 | { |
| @@ -37,7 +37,7 @@ static void notifier(const char *notification) | |||
| 37 | printf("---------------------------------------------------------\n"); | 37 | printf("---------------------------------------------------------\n"); |
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | static void perform_notification(iphone_device_t phone, lockdownd_client_t client, const char *notification) | 40 | static void perform_notification(idevice_t phone, lockdownd_client_t client, const char *notification) |
| 41 | { | 41 | { |
| 42 | uint16_t nport = 0; | 42 | uint16_t nport = 0; |
| 43 | np_client_t np; | 43 | np_client_t np; |
| @@ -62,30 +62,30 @@ int main(int argc, char *argv[]) | |||
| 62 | uint16_t port = 0, i = 0; | 62 | uint16_t port = 0, i = 0; |
| 63 | uint16_t npp; | 63 | uint16_t npp; |
| 64 | lockdownd_client_t client = NULL; | 64 | lockdownd_client_t client = NULL; |
| 65 | iphone_device_t phone = NULL; | 65 | idevice_t phone = NULL; |
| 66 | uint64_t lockfile = 0; | 66 | uint64_t lockfile = 0; |
| 67 | np_client_t gnp = NULL; | 67 | np_client_t gnp = NULL; |
| 68 | 68 | ||
| 69 | if (argc > 1 && !strcasecmp(argv[1], "--debug")) { | 69 | if (argc > 1 && !strcasecmp(argv[1], "--debug")) { |
| 70 | iphone_set_debug_level(1); | 70 | idevice_set_debug_level(1); |
| 71 | } else { | 71 | } else { |
| 72 | iphone_set_debug_level(0); | 72 | idevice_set_debug_level(0); |
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | if (IPHONE_E_SUCCESS != iphone_device_new(&phone, NULL)) { | 75 | if (IDEVICE_E_SUCCESS != idevice_new(&phone, NULL)) { |
| 76 | printf("No iPhone found, is it plugged in?\n"); | 76 | printf("No device found, is it plugged in?\n"); |
| 77 | return -1; | 77 | return -1; |
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | char *uuid = NULL; | 80 | char *uuid = NULL; |
| 81 | if (IPHONE_E_SUCCESS == iphone_device_get_uuid(phone, &uuid)) { | 81 | if (IDEVICE_E_SUCCESS == idevice_get_uuid(phone, &uuid)) { |
| 82 | printf("DeviceUniqueID : %s\n", uuid); | 82 | printf("DeviceUniqueID : %s\n", uuid); |
| 83 | } | 83 | } |
| 84 | if (uuid) | 84 | if (uuid) |
| 85 | free(uuid); | 85 | free(uuid); |
| 86 | 86 | ||
| 87 | if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "iphoneclient")) { | 87 | if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "ideviceclient")) { |
| 88 | iphone_device_free(phone); | 88 | idevice_free(phone); |
| 89 | printf("Exiting.\n"); | 89 | printf("Exiting.\n"); |
| 90 | return -1; | 90 | return -1; |
| 91 | } | 91 | } |
| @@ -154,7 +154,7 @@ int main(int argc, char *argv[]) | |||
| 154 | uint64_t my_file = 0; | 154 | uint64_t my_file = 0; |
| 155 | char **info = NULL; | 155 | char **info = NULL; |
| 156 | uint64_t fsize = 0; | 156 | uint64_t fsize = 0; |
| 157 | if (AFC_E_SUCCESS == afc_get_file_info(afc, "/readme.libiphone.fx", &info) && info) { | 157 | if (AFC_E_SUCCESS == afc_get_file_info(afc, "/readme.libimobiledevice.fx", &info) && info) { |
| 158 | for (i = 0; info[i]; i += 2) { | 158 | for (i = 0; info[i]; i += 2) { |
| 159 | printf("%s: %s\n", info[i], info[i+1]); | 159 | printf("%s: %s\n", info[i], info[i+1]); |
| 160 | if (!strcmp(info[i], "st_size")) { | 160 | if (!strcmp(info[i], "st_size")) { |
| @@ -164,7 +164,7 @@ int main(int argc, char *argv[]) | |||
| 164 | } | 164 | } |
| 165 | 165 | ||
| 166 | if (AFC_E_SUCCESS == | 166 | if (AFC_E_SUCCESS == |
| 167 | afc_file_open(afc, "/readme.libiphone.fx", AFC_FOPEN_RDONLY, &my_file) && my_file) { | 167 | afc_file_open(afc, "/readme.libimobiledevice.fx", AFC_FOPEN_RDONLY, &my_file) && my_file) { |
| 168 | printf("A file size: %llu\n", (long long)fsize); | 168 | printf("A file size: %llu\n", (long long)fsize); |
| 169 | char *file_data = (char *) malloc(sizeof(char) * fsize); | 169 | char *file_data = (char *) malloc(sizeof(char) * fsize); |
| 170 | afc_file_read(afc, my_file, file_data, fsize, &bytes); | 170 | afc_file_read(afc, my_file, file_data, fsize, &bytes); |
| @@ -178,7 +178,7 @@ int main(int argc, char *argv[]) | |||
| 178 | } else | 178 | } else |
| 179 | printf("couldn't open a file\n"); | 179 | printf("couldn't open a file\n"); |
| 180 | 180 | ||
| 181 | afc_file_open(afc, "/readme.libiphone.fx", AFC_FOPEN_WR, &my_file); | 181 | afc_file_open(afc, "/readme.libimobiledevice.fx", AFC_FOPEN_WR, &my_file); |
| 182 | if (my_file) { | 182 | if (my_file) { |
| 183 | char *outdatafile = strdup("this is a bitchin text file\n"); | 183 | char *outdatafile = strdup("this is a bitchin text file\n"); |
| 184 | afc_file_write(afc, my_file, outdatafile, strlen(outdatafile), &bytes); | 184 | afc_file_write(afc, my_file, outdatafile, strlen(outdatafile), &bytes); |
| @@ -204,7 +204,7 @@ int main(int argc, char *argv[]) | |||
| 204 | printf("Failure. (expected unless you have a /renme file on your phone)\n"); | 204 | printf("Failure. (expected unless you have a /renme file on your phone)\n"); |
| 205 | 205 | ||
| 206 | printf("Seek & read\n"); | 206 | printf("Seek & read\n"); |
| 207 | afc_file_open(afc, "/readme.libiphone.fx", AFC_FOPEN_RDONLY, &my_file); | 207 | afc_file_open(afc, "/readme.libimobiledevice.fx", AFC_FOPEN_RDONLY, &my_file); |
| 208 | if (AFC_E_SUCCESS != afc_file_seek(afc, my_file, 5, SEEK_CUR)) | 208 | if (AFC_E_SUCCESS != afc_file_seek(afc, my_file, 5, SEEK_CUR)) |
| 209 | printf("WARN: SEEK DID NOT WORK\n"); | 209 | printf("WARN: SEEK DID NOT WORK\n"); |
| 210 | char *threeletterword = (char *) malloc(sizeof(char) * 5); | 210 | char *threeletterword = (char *) malloc(sizeof(char) * 5); |
| @@ -246,7 +246,7 @@ int main(int argc, char *argv[]) | |||
| 246 | printf("All done.\n"); | 246 | printf("All done.\n"); |
| 247 | 247 | ||
| 248 | lockdownd_client_free(client); | 248 | lockdownd_client_free(client); |
| 249 | iphone_device_free(phone); | 249 | idevice_free(phone); |
| 250 | 250 | ||
| 251 | return 0; | 251 | return 0; |
| 252 | } | 252 | } |
diff --git a/dev/iphoneenterrecovery.c b/dev/ideviceenterrecovery.c index 153df15..82ea786 100644 --- a/dev/iphoneenterrecovery.c +++ b/dev/ideviceenterrecovery.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * iphoneenterrecovery.c | 2 | * ideviceenterrecovery.c |
| 3 | * Simple utility to make a device in normal mode enter recovery mode. | 3 | * Simple utility to make a device in normal mode enter recovery mode. |
| 4 | * | 4 | * |
| 5 | * Copyright (c) 2009 Martin Szulecki All Rights Reserved. | 5 | * Copyright (c) 2009 Martin Szulecki All Rights Reserved. |
| @@ -24,8 +24,8 @@ | |||
| 24 | #include <errno.h> | 24 | #include <errno.h> |
| 25 | #include <stdlib.h> | 25 | #include <stdlib.h> |
| 26 | 26 | ||
| 27 | #include <libiphone/libiphone.h> | 27 | #include <libimobiledevice/libimobiledevice.h> |
| 28 | #include <libiphone/lockdown.h> | 28 | #include <libimobiledevice/lockdown.h> |
| 29 | 29 | ||
| 30 | static void print_usage(int argc, char **argv) | 30 | static void print_usage(int argc, char **argv) |
| 31 | { | 31 | { |
| @@ -42,8 +42,8 @@ static void print_usage(int argc, char **argv) | |||
| 42 | int main(int argc, char *argv[]) | 42 | int main(int argc, char *argv[]) |
| 43 | { | 43 | { |
| 44 | lockdownd_client_t client = NULL; | 44 | lockdownd_client_t client = NULL; |
| 45 | iphone_device_t phone = NULL; | 45 | idevice_t phone = NULL; |
| 46 | iphone_error_t ret = IPHONE_E_UNKNOWN_ERROR; | 46 | idevice_error_t ret = IDEVICE_E_UNKNOWN_ERROR; |
| 47 | int i; | 47 | int i; |
| 48 | char uuid[41]; | 48 | char uuid[41]; |
| 49 | uuid[0] = 0; | 49 | uuid[0] = 0; |
| @@ -51,7 +51,7 @@ int main(int argc, char *argv[]) | |||
| 51 | /* parse cmdline args */ | 51 | /* parse cmdline args */ |
| 52 | for (i = 1; i < argc; i++) { | 52 | for (i = 1; i < argc; i++) { |
| 53 | if (!strcmp(argv[i], "-d") || !strcmp(argv[i], "--debug")) { | 53 | if (!strcmp(argv[i], "-d") || !strcmp(argv[i], "--debug")) { |
| 54 | iphone_set_debug_level(1); | 54 | idevice_set_debug_level(1); |
| 55 | continue; | 55 | continue; |
| 56 | } | 56 | } |
| 57 | else if (!strcmp(argv[i], "-h") || !strcmp(argv[i], "--help")) { | 57 | else if (!strcmp(argv[i], "-h") || !strcmp(argv[i], "--help")) { |
| @@ -67,14 +67,14 @@ int main(int argc, char *argv[]) | |||
| 67 | } | 67 | } |
| 68 | strcpy(uuid, argv[i]); | 68 | strcpy(uuid, argv[i]); |
| 69 | 69 | ||
| 70 | ret = iphone_device_new(&phone, uuid); | 70 | ret = idevice_new(&phone, uuid); |
| 71 | if (ret != IPHONE_E_SUCCESS) { | 71 | if (ret != IDEVICE_E_SUCCESS) { |
| 72 | printf("No device found with uuid %s, is it plugged in?\n", uuid); | 72 | printf("No device found with uuid %s, is it plugged in?\n", uuid); |
| 73 | return -1; | 73 | return -1; |
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "iphoneenterrecovery")) { | 76 | if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "ideviceenterrecovery")) { |
| 77 | iphone_device_free(phone); | 77 | idevice_free(phone); |
| 78 | return -1; | 78 | return -1; |
| 79 | } | 79 | } |
| 80 | 80 | ||
| @@ -87,7 +87,7 @@ int main(int argc, char *argv[]) | |||
| 87 | printf("Device is successfully switching to recovery mode.\n"); | 87 | printf("Device is successfully switching to recovery mode.\n"); |
| 88 | 88 | ||
| 89 | lockdownd_client_free(client); | 89 | lockdownd_client_free(client); |
| 90 | iphone_device_free(phone); | 90 | idevice_free(phone); |
| 91 | 91 | ||
| 92 | return 0; | 92 | return 0; |
| 93 | } | 93 | } |
diff --git a/dev/lckdclient.c b/dev/lckdclient.c index 7b7604e..773de9f 100644 --- a/dev/lckdclient.c +++ b/dev/lckdclient.c | |||
| @@ -26,30 +26,30 @@ | |||
| 26 | #include <readline/readline.h> | 26 | #include <readline/readline.h> |
| 27 | #include <readline/history.h> | 27 | #include <readline/history.h> |
| 28 | 28 | ||
| 29 | #include <libiphone/libiphone.h> | 29 | #include <libimobiledevice/libimobiledevice.h> |
| 30 | #include <libiphone/lockdown.h> | 30 | #include <libimobiledevice/lockdown.h> |
| 31 | 31 | ||
| 32 | int main(int argc, char *argv[]) | 32 | int main(int argc, char *argv[]) |
| 33 | { | 33 | { |
| 34 | lockdownd_client_t client = NULL; | 34 | lockdownd_client_t client = NULL; |
| 35 | iphone_device_t phone = NULL; | 35 | idevice_t phone = NULL; |
| 36 | 36 | ||
| 37 | iphone_set_debug_level(1); | 37 | idevice_set_debug_level(1); |
| 38 | 38 | ||
| 39 | if (IPHONE_E_SUCCESS != iphone_device_new(&phone, NULL)) { | 39 | if (IDEVICE_E_SUCCESS != idevice_new(&phone, NULL)) { |
| 40 | printf("No iPhone found, is it plugged in?\n"); | 40 | printf("No device found, is it plugged in?\n"); |
| 41 | return -1; | 41 | return -1; |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | char *uuid = NULL; | 44 | char *uuid = NULL; |
| 45 | if (IPHONE_E_SUCCESS == iphone_device_get_uuid(phone, &uuid)) { | 45 | if (IDEVICE_E_SUCCESS == idevice_get_uuid(phone, &uuid)) { |
| 46 | printf("DeviceUniqueID : %s\n", uuid); | 46 | printf("DeviceUniqueID : %s\n", uuid); |
| 47 | } | 47 | } |
| 48 | if (uuid) | 48 | if (uuid) |
| 49 | free(uuid); | 49 | free(uuid); |
| 50 | 50 | ||
| 51 | if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "lckdclient")) { | 51 | if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "lckdclient")) { |
| 52 | iphone_device_free(phone); | 52 | idevice_free(phone); |
| 53 | return -1; | 53 | return -1; |
| 54 | } | 54 | } |
| 55 | 55 | ||
| @@ -109,7 +109,7 @@ int main(int argc, char *argv[]) | |||
| 109 | } | 109 | } |
| 110 | clear_history(); | 110 | clear_history(); |
| 111 | lockdownd_client_free(client); | 111 | lockdownd_client_free(client); |
| 112 | iphone_device_free(phone); | 112 | idevice_free(phone); |
| 113 | 113 | ||
| 114 | return 0; | 114 | return 0; |
| 115 | } | 115 | } |
diff --git a/dev/msync.py b/dev/msync.py index 6bb85d7..951355c 100755 --- a/dev/msync.py +++ b/dev/msync.py | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | #! /usr/bin/env python | 1 | #! /usr/bin/env python |
| 2 | 2 | ||
| 3 | from iphone import * | 3 | from imobiledevice import * |
| 4 | from plist import * | 4 | from plist import * |
| 5 | 5 | ||
| 6 | # get msync client | 6 | # get msync client |
| 7 | def GetMobileSyncClient() : | 7 | def GetMobileSyncClient() : |
| 8 | phone = iPhone() | 8 | phone = idevice() |
| 9 | if not phone.init_device() : | 9 | if not phone.init_device() : |
| 10 | print "Couldn't find device, is it connected ?\n" | 10 | print "Couldn't find device, is it connected ?\n" |
| 11 | return None | 11 | return None |
diff --git a/dev/msyncclient.c b/dev/msyncclient.c index 0107240..b9e39e6 100644 --- a/dev/msyncclient.c +++ b/dev/msyncclient.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * msyncclient.c | 2 | * msyncclient.c |
| 3 | * Rudimentary interface to the MobileSync iPhone | 3 | * Rudimentary interface to the MobileSync service. |
| 4 | * | 4 | * |
| 5 | * Copyright (c) 2009 Jonathan Beck All Rights Reserved. | 5 | * Copyright (c) 2009 Jonathan Beck All Rights Reserved. |
| 6 | * | 6 | * |
| @@ -23,9 +23,9 @@ | |||
| 23 | #include <string.h> | 23 | #include <string.h> |
| 24 | #include <errno.h> | 24 | #include <errno.h> |
| 25 | 25 | ||
| 26 | #include <libiphone/libiphone.h> | 26 | #include <libimobiledevice/libimobiledevice.h> |
| 27 | #include <libiphone/lockdown.h> | 27 | #include <libimobiledevice/lockdown.h> |
| 28 | #include <libiphone/mobilesync.h> | 28 | #include <libimobiledevice/mobilesync.h> |
| 29 | 29 | ||
| 30 | static char check_string(plist_t node, char* string) | 30 | static char check_string(plist_t node, char* string) |
| 31 | { | 31 | { |
| @@ -143,18 +143,18 @@ int main(int argc, char *argv[]) | |||
| 143 | { | 143 | { |
| 144 | uint16_t port = 0; | 144 | uint16_t port = 0; |
| 145 | lockdownd_client_t client = NULL; | 145 | lockdownd_client_t client = NULL; |
| 146 | iphone_device_t phone = NULL; | 146 | idevice_t phone = NULL; |
| 147 | 147 | ||
| 148 | if (argc > 1 && !strcasecmp(argv[1], "--debug")) | 148 | if (argc > 1 && !strcasecmp(argv[1], "--debug")) |
| 149 | iphone_set_debug_level(1); | 149 | idevice_set_debug_level(1); |
| 150 | 150 | ||
| 151 | if (IPHONE_E_SUCCESS != iphone_device_new(&phone, NULL)) { | 151 | if (IDEVICE_E_SUCCESS != idevice_new(&phone, NULL)) { |
| 152 | printf("No iPhone found, is it plugged in?\n"); | 152 | printf("No device found, is it plugged in?\n"); |
| 153 | return -1; | 153 | return -1; |
| 154 | } | 154 | } |
| 155 | 155 | ||
| 156 | if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "msyncclient")) { | 156 | if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "msyncclient")) { |
| 157 | iphone_device_free(phone); | 157 | idevice_free(phone); |
| 158 | return -1; | 158 | return -1; |
| 159 | } | 159 | } |
| 160 | 160 | ||
| @@ -174,7 +174,7 @@ int main(int argc, char *argv[]) | |||
| 174 | printf("All done.\n"); | 174 | printf("All done.\n"); |
| 175 | 175 | ||
| 176 | lockdownd_client_free(client); | 176 | lockdownd_client_free(client); |
| 177 | iphone_device_free(phone); | 177 | idevice_free(phone); |
| 178 | 178 | ||
| 179 | return 0; | 179 | return 0; |
| 180 | } | 180 | } |
