Skip to content

Commit

Permalink
Rename project and use libimobiledevice API
Browse files Browse the repository at this point in the history
  • Loading branch information
nikias authored and FunkyM committed Feb 2, 2010
1 parent 1f9bf77 commit 375a103
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 22 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,4 @@ libtool
*Makefile
stamp-h1
src/.libs
src/sbmanager
data/data.h
src/ideviceinstaller
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.61)
AC_INIT(iphoneinstaller, 1.0.0, [email protected])
AC_INIT(ideviceinstaller, 1.0.0, [email protected])
AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
AC_CONFIG_SRCDIR([src/])
Expand All @@ -15,7 +15,7 @@ AM_PROG_CC_C_O
AC_PROG_LIBTOOL

# Checks for libraries.
PKG_CHECK_MODULES(libiphone, libiphone-1.0)
PKG_CHECK_MODULES(libimobiledevice, libimobiledevice-1.0 >= 0.9.7)
PKG_CHECK_MODULES(libplist, libplist >= 0.15)
PKG_CHECK_MODULES(libzip, libzip >= 0.8)

Expand Down
12 changes: 6 additions & 6 deletions src/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
AM_CFLAGS = \
$(GLOBAL_CFLAGS) \
$(libiphone_CFLAGS) \
$(libimobiledevice_CFLAGS) \
$(libplist_CFLAGS) \
$(libzip_CFLAGS)

AM_LDFLAGS = \
$(libiphone_LIBS) \
$(libimobiledevice_LIBS) \
$(libplist_LIBS) \
$(libzip_LIBS)

bin_PROGRAMS = iphoneinstaller
bin_PROGRAMS = ideviceinstaller

iphoneinstaller_SOURCES = iphoneinstaller.c
iphoneinstaller_CFLAGS = $(AM_CFLAGS)
iphoneinstaller_LDFLAGS = $(AM_LDFLAGS)
ideviceinstaller_SOURCES = ideviceinstaller.c
ideviceinstaller_CFLAGS = $(AM_CFLAGS)
ideviceinstaller_LDFLAGS = $(AM_LDFLAGS)

24 changes: 12 additions & 12 deletions src/iphoneinstaller.c → src/ideviceinstaller.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* iphoneinstaller -- Manage iPhone/iPod apps
* ideviceinstaller -- Manage iPhone/iPod apps
*
* Copyright (C) 2010 Nikias Bassen <[email protected]>
*
Expand Down Expand Up @@ -29,11 +29,11 @@
#include <errno.h>
#include <time.h>

#include <libiphone/libiphone.h>
#include <libiphone/lockdown.h>
#include <libiphone/installation_proxy.h>
#include <libiphone/notification_proxy.h>
#include <libiphone/afc.h>
#include <libimobiledevice/libimobiledevice.h>
#include <libimobiledevice/lockdown.h>
#include <libimobiledevice/installation_proxy.h>
#include <libimobiledevice/notification_proxy.h>
#include <libimobiledevice/afc.h>

#include <plist/plist.h>

Expand Down Expand Up @@ -296,7 +296,7 @@ static void parse_opts(int argc, char **argv)
}
break;
case 'D':
iphone_set_debug_level(1);
idevice_set_debug_level(1);
break;
default:
print_usage(argc, argv);
Expand All @@ -312,7 +312,7 @@ static void parse_opts(int argc, char **argv)

int main(int argc, char **argv)
{
iphone_device_t phone = NULL;
idevice_t phone = NULL;
lockdownd_client_t client = NULL;
instproxy_client_t ipc = NULL;
np_client_t np = NULL;
Expand All @@ -325,12 +325,12 @@ int main(int argc, char **argv)
argc -= optind;
argv += optind;

if (IPHONE_E_SUCCESS != iphone_device_new(&phone, uuid)) {
if (IDEVICE_E_SUCCESS != idevice_new(&phone, uuid)) {
fprintf(stderr, "No iPhone found, is it plugged in?\n");
return -1;
}

if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "iphoneinstaller")) {
if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "ideviceinstaller")) {
fprintf(stderr, "Could not connect to lockdownd. Exiting.\n");
goto leave_cleanup;
}
Expand Down Expand Up @@ -950,7 +950,7 @@ int main(int argc, char **argv)
remove_archive_mode = 1;
free(options);
options = NULL;
if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "iphoneinstaller")) {
if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "ideviceinstaller")) {
fprintf(stderr, "Could not connect to lockdownd. Exiting.\n");
goto leave_cleanup;
}
Expand Down Expand Up @@ -993,7 +993,7 @@ int main(int argc, char **argv)
if (client) {
lockdownd_client_free(client);
}
iphone_device_free(phone);
idevice_free(phone);

if (uuid) {
free(uuid);
Expand Down

0 comments on commit 375a103

Please sign in to comment.