diff options
| author | 2008-08-31 18:43:29 +0200 | |
|---|---|---|
| committer | 2008-08-31 19:33:19 +0200 | |
| commit | 5dc380594ad755dd5a9d2cad246e5dcb5480350d (patch) | |
| tree | c90811184619c86f920872e9eb84f35604735779 /src/main.c | |
| parent | 8333ca944cc56b4da1ab418c0b890f96f5135210 (diff) | |
| download | libimobiledevice-5dc380594ad755dd5a9d2cad246e5dcb5480350d.tar.gz libimobiledevice-5dc380594ad755dd5a9d2cad246e5dcb5480350d.tar.bz2 | |
prefix public enum with IPHONE_
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -87,7 +87,7 @@ int main(int argc, char *argv[]) { | |||
| 87 | iphone_afc_file_t my_file = NULL; | 87 | iphone_afc_file_t my_file = NULL; |
| 88 | struct stat stbuf; | 88 | struct stat stbuf; |
| 89 | iphone_afc_get_file_attr ( afc, "/iTunesOnTheGoPlaylist.plist", &stbuf ); | 89 | iphone_afc_get_file_attr ( afc, "/iTunesOnTheGoPlaylist.plist", &stbuf ); |
| 90 | if (IPHONE_E_SUCCESS == iphone_afc_open_file(afc, "/iTunesOnTheGoPlaylist.plist", AFC_FILE_READ, &my_file) && my_file) { | 90 | if (IPHONE_E_SUCCESS == iphone_afc_open_file(afc, "/iTunesOnTheGoPlaylist.plist", IPHONE_AFC_FILE_READ, &my_file) && my_file) { |
| 91 | printf("A file size: %i\n", stbuf.st_size); | 91 | printf("A file size: %i\n", stbuf.st_size); |
| 92 | char *file_data = (char*)malloc(sizeof(char) * stbuf.st_size); | 92 | char *file_data = (char*)malloc(sizeof(char) * stbuf.st_size); |
| 93 | iphone_afc_read_file(afc, my_file, file_data, stbuf.st_size, &bytes); | 93 | iphone_afc_read_file(afc, my_file, file_data, stbuf.st_size, &bytes); |
| @@ -100,7 +100,7 @@ int main(int argc, char *argv[]) { | |||
| 100 | free(file_data); | 100 | free(file_data); |
| 101 | } else printf("couldn't open a file\n"); | 101 | } else printf("couldn't open a file\n"); |
| 102 | 102 | ||
| 103 | iphone_afc_open_file(afc, "/readme.libiphone.fx", AFC_FILE_WRITE, &my_file); | 103 | iphone_afc_open_file(afc, "/readme.libiphone.fx", IPHONE_AFC_FILE_WRITE, &my_file); |
| 104 | if (my_file) { | 104 | if (my_file) { |
| 105 | char *outdatafile = strdup("this is a bitchin text file\n"); | 105 | char *outdatafile = strdup("this is a bitchin text file\n"); |
| 106 | iphone_afc_write_file(afc, my_file, outdatafile, strlen(outdatafile), &bytes); | 106 | iphone_afc_write_file(afc, my_file, outdatafile, strlen(outdatafile), &bytes); |
| @@ -120,7 +120,7 @@ int main(int argc, char *argv[]) { | |||
| 120 | else printf("Failure. (expected unless you have a /renme file on your phone)\n"); | 120 | else printf("Failure. (expected unless you have a /renme file on your phone)\n"); |
| 121 | 121 | ||
| 122 | printf("Seek & read\n"); | 122 | printf("Seek & read\n"); |
| 123 | iphone_afc_open_file(afc, "/readme.libiphone.fx", AFC_FILE_READ, &my_file); | 123 | iphone_afc_open_file(afc, "/readme.libiphone.fx", IPHONE_AFC_FILE_READ, &my_file); |
| 124 | if (IPHONE_E_SUCCESS != iphone_afc_seek_file(afc, my_file, 5)) printf("WARN: SEEK DID NOT WORK\n"); | 124 | if (IPHONE_E_SUCCESS != iphone_afc_seek_file(afc, my_file, 5)) printf("WARN: SEEK DID NOT WORK\n"); |
| 125 | char *threeletterword = (char*)malloc(sizeof(char) * 5); | 125 | char *threeletterword = (char*)malloc(sizeof(char) * 5); |
| 126 | iphone_afc_read_file(afc, my_file, threeletterword, 3, &bytes); | 126 | iphone_afc_read_file(afc, my_file, threeletterword, 3, &bytes); |
