diff options
| author | 2009-04-13 08:48:00 -0700 | |
|---|---|---|
| committer | 2009-04-13 08:48:00 -0700 | |
| commit | 6671ca3d6de6a1fd27853e3b1ce7a81d568703f0 (patch) | |
| tree | 735c5ace7ed57cd4e19f2fde423b22e6104eaa98 /dev/main.c | |
| parent | bd31783d7fde0b5bd101f4a3f97ca1aca2aa6fab (diff) | |
| parent | 288929f45cb2641690879b52ec514097995cd41a (diff) | |
| download | libimobiledevice-6671ca3d6de6a1fd27853e3b1ce7a81d568703f0.tar.gz libimobiledevice-6671ca3d6de6a1fd27853e3b1ce7a81d568703f0.tar.bz2 | |
Merged in Jonathan's libplist libiphone. [#2 state:resolved]
Diffstat (limited to 'dev/main.c')
| -rw-r--r-- | dev/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
| @@ -24,10 +24,8 @@ | |||
| 24 | #include <errno.h> | 24 | #include <errno.h> |
| 25 | #include <usb.h> | 25 | #include <usb.h> |
| 26 | 26 | ||
| 27 | #include <libxml/parser.h> | ||
| 28 | #include <libxml/tree.h> | ||
| 29 | |||
| 30 | #include <libiphone/libiphone.h> | 27 | #include <libiphone/libiphone.h> |
| 28 | #include "../src/utils.h" | ||
| 31 | 29 | ||
| 32 | void perform_syncWillStart(iphone_device_t phone, iphone_lckd_client_t control) | 30 | void perform_syncWillStart(iphone_device_t phone, iphone_lckd_client_t control) |
| 33 | { | 31 | { |
| @@ -77,8 +75,10 @@ int main(int argc, char *argv[]) | |||
| 77 | 75 | ||
| 78 | if (argc > 1 && !strcasecmp(argv[1], "--debug")) { | 76 | if (argc > 1 && !strcasecmp(argv[1], "--debug")) { |
| 79 | iphone_set_debug(1); | 77 | iphone_set_debug(1); |
| 78 | iphone_set_debug_mask(DBGMASK_ALL); | ||
| 80 | } else { | 79 | } else { |
| 81 | iphone_set_debug(0); | 80 | iphone_set_debug(0); |
| 81 | iphone_set_debug_mask(DBGMASK_NONE); | ||
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | if (IPHONE_E_SUCCESS != iphone_get_device(&phone)) { | 84 | if (IPHONE_E_SUCCESS != iphone_get_device(&phone)) { |
| @@ -136,7 +136,7 @@ int main(int argc, char *argv[]) | |||
| 136 | iphone_afc_get_file_attr(afc, "/iTunesOnTheGoPlaylist.plist", &stbuf); | 136 | iphone_afc_get_file_attr(afc, "/iTunesOnTheGoPlaylist.plist", &stbuf); |
| 137 | if (IPHONE_E_SUCCESS == | 137 | if (IPHONE_E_SUCCESS == |
| 138 | iphone_afc_open_file(afc, "/iTunesOnTheGoPlaylist.plist", IPHONE_AFC_FILE_READ, &my_file) && my_file) { | 138 | iphone_afc_open_file(afc, "/iTunesOnTheGoPlaylist.plist", IPHONE_AFC_FILE_READ, &my_file) && my_file) { |
| 139 | printf("A file size: %i\n", stbuf.st_size); | 139 | printf("A file size: %i\n", (int) stbuf.st_size); |
| 140 | char *file_data = (char *) malloc(sizeof(char) * stbuf.st_size); | 140 | char *file_data = (char *) malloc(sizeof(char) * stbuf.st_size); |
| 141 | iphone_afc_read_file(afc, my_file, file_data, stbuf.st_size, &bytes); | 141 | iphone_afc_read_file(afc, my_file, file_data, stbuf.st_size, &bytes); |
| 142 | if (bytes >= 0) { | 142 | if (bytes >= 0) { |
