summaryrefslogtreecommitdiffstats
path: root/dev
diff options
context:
space:
mode:
Diffstat (limited to 'dev')
-rw-r--r--dev/Makefile.am24
-rw-r--r--dev/afccheck.c24
-rw-r--r--dev/filerelaytest.c16
-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.c18
-rwxr-xr-xdev/msync.py4
-rw-r--r--dev/msyncclient.c20
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
AM_LDFLAGS = $(libglib2_LIBS) $(libgnutls_LIBS) $(libtasn1_LIBS) $(libgthread2_LIBS)
if ENABLE_DEVTOOLS
-noinst_PROGRAMS = iphoneclient lckd-client afccheck msyncclient iphoneenterrecovery filerelaytest
+noinst_PROGRAMS = ideviceclient lckd-client afccheck msyncclient ideviceenterrecovery filerelaytest
-iphoneclient_SOURCES = iphoneclient.c
-iphoneclient_LDADD = ../src/libiphone.la
+ideviceclient_SOURCES = ideviceclient.c
+ideviceclient_LDADD = ../src/libimobiledevice.la
lckd_client_SOURCES = lckdclient.c
lckd_client_CFLAGS = $(AM_CFLAGS)
lckd_client_LDFLAGS = -lreadline $(AM_LDFLAGS)
-lckd_client_LDADD = ../src/libiphone.la
+lckd_client_LDADD = ../src/libimobiledevice.la
afccheck_SOURCES = afccheck.c
afccheck_CFLAGS = $(AM_CFLAGS)
afccheck_LDFLAGS = $(AM_LDFLAGS)
-afccheck_LDADD = ../src/libiphone.la
+afccheck_LDADD = ../src/libimobiledevice.la
msyncclient_SOURCES = msyncclient.c
msyncclient_CFLAGS = $(AM_CFLAGS)
msyncclient_LDFLAGS = $(AM_LDFLAGS)
-msyncclient_LDADD = ../src/libiphone.la
+msyncclient_LDADD = ../src/libimobiledevice.la
-iphoneenterrecovery_SOURCES = iphoneenterrecovery.c
-iphoneenterrecovery_CFLAGS = $(AM_CFLAGS)
-iphoneenterrecovery_LDFLAGS = $(AM_LDFLAGS)
-iphoneenterrecovery_LDADD = ../src/libiphone.la
+ideviceenterrecovery_SOURCES = ideviceenterrecovery.c
+ideviceenterrecovery_CFLAGS = $(AM_CFLAGS)
+ideviceenterrecovery_LDFLAGS = $(AM_LDFLAGS)
+ideviceenterrecovery_LDADD = ../src/libimobiledevice.la
filerelaytest_SOURCES = filerelaytest.c
filerelaytest_CFLAGS = $(AM_CFLAGS)
filerelaytest_LDFLAGS = $(AM_LDFLAGS)
-filerelaytest_LDADD = ../src/libiphone.la
+filerelaytest_LDADD = ../src/libimobiledevice.la
endif # ENABLE_DEVTOOLS
-EXTRA_DIST = iphoneclient.c lckdclient.c afccheck.c msyncclient.c iphoneenterrecovery.c
+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 @@
#include <string.h>
#include <glib.h>
-#include <libiphone/libiphone.h>
-#include <libiphone/lockdown.h>
-#include <libiphone/afc.h>
+#include <libimobiledevice/libimobiledevice.h>
+#include <libimobiledevice/lockdown.h>
+#include <libimobiledevice/afc.h>
#define BUFFER_SIZE 20000
#define NB_THREADS 10
@@ -53,7 +53,7 @@ static void check_afc(gpointer data)
buf[i] = ((param *) data)->id * i;
}
- //now writes buffer on iphone
+ //now writes buffer on device
uint64_t file = 0;
char path[50];
sprintf(path, "/Buf%i", ((param *) data)->id);
@@ -91,30 +91,30 @@ static void check_afc(gpointer data)
int main(int argc, char *argv[])
{
lockdownd_client_t client = NULL;
- iphone_device_t phone = NULL;
+ idevice_t phone = NULL;
GError *err;
uint16_t port = 0;
afc_client_t afc = NULL;
if (argc > 1 && !strcasecmp(argv[1], "--debug")) {
- iphone_set_debug_level(1);
+ idevice_set_debug_level(1);
} else {
- iphone_set_debug_level(0);
+ idevice_set_debug_level(0);
}
- if (IPHONE_E_SUCCESS != iphone_device_new(&phone, NULL)) {
- printf("No iPhone found, is it plugged in?\n");
+ if (IDEVICE_E_SUCCESS != idevice_new(&phone, NULL)) {
+ printf("No device found, is it plugged in?\n");
return 1;
}
if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "afccheck")) {
- iphone_device_free(phone);
+ idevice_free(phone);
return 1;
}
if (LOCKDOWN_E_SUCCESS == lockdownd_start_service(client, "com.apple.afc", &port) && !port) {
lockdownd_client_free(client);
- iphone_device_free(phone);
+ idevice_free(phone);
fprintf(stderr, "Something went wrong when starting AFC.");
return 1;
}
@@ -140,7 +140,7 @@ int main(int argc, char *argv[])
}
lockdownd_client_free(client);
- iphone_device_free(phone);
+ idevice_free(phone);
return 0;
}
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 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <stdio.h>
-#include <libiphone/libiphone.h>
-#include <libiphone/lockdown.h>
-#include <libiphone/file_relay.h>
+#include <libimobiledevice/libimobiledevice.h>
+#include <libimobiledevice/lockdown.h>
+#include <libimobiledevice/file_relay.h>
int main(int argc, char **argv)
{
- iphone_device_t dev = NULL;
+ idevice_t dev = NULL;
lockdownd_client_t client = NULL;
file_relay_client_t frc = NULL;
- if (iphone_device_new(&dev, NULL) != IPHONE_E_SUCCESS) {
+ if (idevice_new(&dev, NULL) != IDEVICE_E_SUCCESS) {
printf("no device connected?!\n");
goto leave_cleanup;
}
@@ -56,7 +56,7 @@ int main(int argc, char **argv)
goto leave_cleanup;
}
- iphone_connection_t dump = NULL;
+ idevice_connection_t dump = NULL;
const char *sources[] = {"AppleSupport", "Network", "VPN", "WiFi", "UserDatabases", "CrashReporter", "tmp", "SystemConfiguration", NULL};
printf("Requesting");
@@ -83,7 +83,7 @@ int main(int argc, char **argv)
FILE *f = fopen("dump.cpio.gz", "w");
setbuf(stdout, NULL);
printf("receiving ");
- while (iphone_connection_receive(dump, buf, 4096, &len) == IPHONE_E_SUCCESS) {
+ while (idevice_connection_receive(dump, buf, 4096, &len) == IDEVICE_E_SUCCESS) {
fwrite(buf, 1, len, f);
cnt += len;
printf(".", len);
@@ -101,7 +101,7 @@ leave_cleanup:
lockdownd_client_free(client);
}
if (dev) {
- iphone_device_free(dev);
+ idevice_free(dev);
}
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 @@
/*
* main.c
- * Rudimentary interface to the iPhone
+ * Test program for testing several services.
*
* Copyright (c) 2008 Zach C. All Rights Reserved.
*
@@ -25,10 +25,10 @@
#include <errno.h>
#include <glib.h>
-#include <libiphone/libiphone.h>
-#include <libiphone/lockdown.h>
-#include <libiphone/afc.h>
-#include <libiphone/notification_proxy.h>
+#include <libimobiledevice/libimobiledevice.h>
+#include <libimobiledevice/lockdown.h>
+#include <libimobiledevice/afc.h>
+#include <libimobiledevice/notification_proxy.h>
static void notifier(const char *notification)
{
@@ -37,7 +37,7 @@ static void notifier(const char *notification)
printf("---------------------------------------------------------\n");
}
-static void perform_notification(iphone_device_t phone, lockdownd_client_t client, const char *notification)
+static void perform_notification(idevice_t phone, lockdownd_client_t client, const char *notification)
{
uint16_t nport = 0;
np_client_t np;
@@ -62,30 +62,30 @@ int main(int argc, char *argv[])
uint16_t port = 0, i = 0;
uint16_t npp;
lockdownd_client_t client = NULL;
- iphone_device_t phone = NULL;
+ idevice_t phone = NULL;
uint64_t lockfile = 0;
np_client_t gnp = NULL;
if (argc > 1 && !strcasecmp(argv[1], "--debug")) {
- iphone_set_debug_level(1);
+ idevice_set_debug_level(1);
} else {
- iphone_set_debug_level(0);
+ idevice_set_debug_level(0);
}
- if (IPHONE_E_SUCCESS != iphone_device_new(&phone, NULL)) {
- printf("No iPhone found, is it plugged in?\n");
+ if (IDEVICE_E_SUCCESS != idevice_new(&phone, NULL)) {
+ printf("No device found, is it plugged in?\n");
return -1;
}
char *uuid = NULL;
- if (IPHONE_E_SUCCESS == iphone_device_get_uuid(phone, &uuid)) {
+ if (IDEVICE_E_SUCCESS == idevice_get_uuid(phone, &uuid)) {
printf("DeviceUniqueID : %s\n", uuid);
}
if (uuid)
free(uuid);
- if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "iphoneclient")) {
- iphone_device_free(phone);
+ if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "ideviceclient")) {
+ idevice_free(phone);
printf("Exiting.\n");
return -1;
}
@@ -154,7 +154,7 @@ int main(int argc, char *argv[])
uint64_t my_file = 0;
char **info = NULL;
uint64_t fsize = 0;
- if (AFC_E_SUCCESS == afc_get_file_info(afc, "/readme.libiphone.fx", &info) && info) {
+ if (AFC_E_SUCCESS == afc_get_file_info(afc, "/readme.libimobiledevice.fx", &info) && info) {
for (i = 0; info[i]; i += 2) {
printf("%s: %s\n", info[i], info[i+1]);
if (!strcmp(info[i], "st_size")) {
@@ -164,7 +164,7 @@ int main(int argc, char *argv[])
}
if (AFC_E_SUCCESS ==
- afc_file_open(afc, "/readme.libiphone.fx", AFC_FOPEN_RDONLY, &my_file) && my_file) {
+ afc_file_open(afc, "/readme.libimobiledevice.fx", AFC_FOPEN_RDONLY, &my_file) && my_file) {
printf("A file size: %llu\n", (long long)fsize);
char *file_data = (char *) malloc(sizeof(char) * fsize);
afc_file_read(afc, my_file, file_data, fsize, &bytes);
@@ -178,7 +178,7 @@ int main(int argc, char *argv[])
} else
printf("couldn't open a file\n");
- afc_file_open(afc, "/readme.libiphone.fx", AFC_FOPEN_WR, &my_file);
+ afc_file_open(afc, "/readme.libimobiledevice.fx", AFC_FOPEN_WR, &my_file);
if (my_file) {
char *outdatafile = strdup("this is a bitchin text file\n");
afc_file_write(afc, my_file, outdatafile, strlen(outdatafile), &bytes);
@@ -204,7 +204,7 @@ int main(int argc, char *argv[])
printf("Failure. (expected unless you have a /renme file on your phone)\n");
printf("Seek & read\n");
- afc_file_open(afc, "/readme.libiphone.fx", AFC_FOPEN_RDONLY, &my_file);
+ afc_file_open(afc, "/readme.libimobiledevice.fx", AFC_FOPEN_RDONLY, &my_file);
if (AFC_E_SUCCESS != afc_file_seek(afc, my_file, 5, SEEK_CUR))
printf("WARN: SEEK DID NOT WORK\n");
char *threeletterword = (char *) malloc(sizeof(char) * 5);
@@ -246,7 +246,7 @@ int main(int argc, char *argv[])
printf("All done.\n");
lockdownd_client_free(client);
- iphone_device_free(phone);
+ idevice_free(phone);
return 0;
}
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 @@
/*
- * iphoneenterrecovery.c
+ * ideviceenterrecovery.c
* Simple utility to make a device in normal mode enter recovery mode.
*
* Copyright (c) 2009 Martin Szulecki All Rights Reserved.
@@ -24,8 +24,8 @@
#include <errno.h>
#include <stdlib.h>
-#include <libiphone/libiphone.h>
-#include <libiphone/lockdown.h>
+#include <libimobiledevice/libimobiledevice.h>
+#include <libimobiledevice/lockdown.h>
static void print_usage(int argc, char **argv)
{
@@ -42,8 +42,8 @@ static void print_usage(int argc, char **argv)
int main(int argc, char *argv[])
{
lockdownd_client_t client = NULL;
- iphone_device_t phone = NULL;
- iphone_error_t ret = IPHONE_E_UNKNOWN_ERROR;
+ idevice_t phone = NULL;
+ idevice_error_t ret = IDEVICE_E_UNKNOWN_ERROR;
int i;
char uuid[41];
uuid[0] = 0;
@@ -51,7 +51,7 @@ int main(int argc, char *argv[])
/* parse cmdline args */
for (i = 1; i < argc; i++) {
if (!strcmp(argv[i], "-d") || !strcmp(argv[i], "--debug")) {
- iphone_set_debug_level(1);
+ idevice_set_debug_level(1);
continue;
}
else if (!strcmp(argv[i], "-h") || !strcmp(argv[i], "--help")) {
@@ -67,14 +67,14 @@ int main(int argc, char *argv[])
}
strcpy(uuid, argv[i]);
- ret = iphone_device_new(&phone, uuid);
- if (ret != IPHONE_E_SUCCESS) {
+ ret = idevice_new(&phone, uuid);
+ if (ret != IDEVICE_E_SUCCESS) {
printf("No device found with uuid %s, is it plugged in?\n", uuid);
return -1;
}
- if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "iphoneenterrecovery")) {
- iphone_device_free(phone);
+ if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "ideviceenterrecovery")) {
+ idevice_free(phone);
return -1;
}
@@ -87,7 +87,7 @@ int main(int argc, char *argv[])
printf("Device is successfully switching to recovery mode.\n");
lockdownd_client_free(client);
- iphone_device_free(phone);
+ idevice_free(phone);
return 0;
}
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 @@
#include <readline/readline.h>
#include <readline/history.h>
-#include <libiphone/libiphone.h>
-#include <libiphone/lockdown.h>
+#include <libimobiledevice/libimobiledevice.h>
+#include <libimobiledevice/lockdown.h>
int main(int argc, char *argv[])
{
lockdownd_client_t client = NULL;
- iphone_device_t phone = NULL;
+ idevice_t phone = NULL;
- iphone_set_debug_level(1);
+ idevice_set_debug_level(1);
- if (IPHONE_E_SUCCESS != iphone_device_new(&phone, NULL)) {
- printf("No iPhone found, is it plugged in?\n");
+ if (IDEVICE_E_SUCCESS != idevice_new(&phone, NULL)) {
+ printf("No device found, is it plugged in?\n");
return -1;
}
char *uuid = NULL;
- if (IPHONE_E_SUCCESS == iphone_device_get_uuid(phone, &uuid)) {
+ if (IDEVICE_E_SUCCESS == idevice_get_uuid(phone, &uuid)) {
printf("DeviceUniqueID : %s\n", uuid);
}
if (uuid)
free(uuid);
if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "lckdclient")) {
- iphone_device_free(phone);
+ idevice_free(phone);
return -1;
}
@@ -109,7 +109,7 @@ int main(int argc, char *argv[])
}
clear_history();
lockdownd_client_free(client);
- iphone_device_free(phone);
+ idevice_free(phone);
return 0;
}
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 @@
#! /usr/bin/env python
-from iphone import *
+from imobiledevice import *
from plist import *
# get msync client
def GetMobileSyncClient() :
- phone = iPhone()
+ phone = idevice()
if not phone.init_device() :
print "Couldn't find device, is it connected ?\n"
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 @@
/*
* msyncclient.c
- * Rudimentary interface to the MobileSync iPhone
+ * Rudimentary interface to the MobileSync service.
*
* Copyright (c) 2009 Jonathan Beck All Rights Reserved.
*
@@ -23,9 +23,9 @@
#include <string.h>
#include <errno.h>
-#include <libiphone/libiphone.h>
-#include <libiphone/lockdown.h>
-#include <libiphone/mobilesync.h>
+#include <libimobiledevice/libimobiledevice.h>
+#include <libimobiledevice/lockdown.h>
+#include <libimobiledevice/mobilesync.h>
static char check_string(plist_t node, char* string)
{
@@ -143,18 +143,18 @@ int main(int argc, char *argv[])
{
uint16_t port = 0;
lockdownd_client_t client = NULL;
- iphone_device_t phone = NULL;
+ idevice_t phone = NULL;
if (argc > 1 && !strcasecmp(argv[1], "--debug"))
- iphone_set_debug_level(1);
+ idevice_set_debug_level(1);
- if (IPHONE_E_SUCCESS != iphone_device_new(&phone, NULL)) {
- printf("No iPhone found, is it plugged in?\n");
+ if (IDEVICE_E_SUCCESS != idevice_new(&phone, NULL)) {
+ printf("No device found, is it plugged in?\n");
return -1;
}
if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "msyncclient")) {
- iphone_device_free(phone);
+ idevice_free(phone);
return -1;
}
@@ -174,7 +174,7 @@ int main(int argc, char *argv[])
printf("All done.\n");
lockdownd_client_free(client);
- iphone_device_free(phone);
+ idevice_free(phone);
return 0;
}