summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Jonathan Beck2008-08-31 18:43:29 +0200
committerGravatar Jonathan Beck2008-08-31 19:33:19 +0200
commit5dc380594ad755dd5a9d2cad246e5dcb5480350d (patch)
treec90811184619c86f920872e9eb84f35604735779 /src
parent8333ca944cc56b4da1ab418c0b890f96f5135210 (diff)
downloadlibimobiledevice-5dc380594ad755dd5a9d2cad246e5dcb5480350d.tar.gz
libimobiledevice-5dc380594ad755dd5a9d2cad246e5dcb5480350d.tar.bz2
prefix public enum with IPHONE_
Diffstat (limited to 'src')
-rw-r--r--src/AFC.c2
-rw-r--r--src/ifuse.c10
-rw-r--r--src/main.c6
3 files changed, 9 insertions, 9 deletions
diff --git a/src/AFC.c b/src/AFC.c
index d2bae97..3828519 100644
--- a/src/AFC.c
+++ b/src/AFC.c
@@ -625,7 +625,7 @@ iphone_error_t iphone_afc_get_file_attr ( iphone_afc_client_t client, const char
* received by afc_get_file_info) as well as the handle to the file or
* NULL in the case of failure.
*/
-iphone_error_t iphone_afc_open_file ( iphone_afc_client_t client, const char *filename, uint32_t file_mode, iphone_afc_file_t *file ) {
+iphone_error_t iphone_afc_open_file ( iphone_afc_client_t client, const char *filename, iphone_afc_file_mode_t file_mode, iphone_afc_file_t *file ) {
iphone_afc_file_t file_loc = NULL;
uint32 ag = 0;
int bytes = 0, length = 0;
diff --git a/src/ifuse.c b/src/ifuse.c
index 6d2bae0..353188e 100644
--- a/src/ifuse.c
+++ b/src/ifuse.c
@@ -76,7 +76,7 @@ static int ifuse_create(const char *path, mode_t mode, struct fuse_file_info *fi
iphone_afc_file_t file;
iphone_afc_client_t afc = fuse_get_context()->private_data;
- iphone_afc_open_file(afc, path, AFC_FILE_WRITE, &file);
+ iphone_afc_open_file(afc, path, IPHONE_AFC_FILE_WRITE, &file);
fh_index++;
fi->fh = fh_index;
g_hash_table_insert(file_handles, &fh_index, file);
@@ -89,11 +89,11 @@ static int ifuse_open(const char *path, struct fuse_file_info *fi) {
uint32_t mode = 0;
if ((fi->flags & 3) == O_RDWR || (fi->flags & 3) == O_WRONLY) {
- mode = AFC_FILE_READ;
+ mode = IPHONE_AFC_FILE_READ;
} else if ((fi->flags & 3) == O_RDONLY) {
- mode = AFC_FILE_READ;
+ mode = IPHONE_AFC_FILE_READ;
} else {
- mode = AFC_FILE_READ;
+ mode = IPHONE_AFC_FILE_READ;
}
iphone_afc_open_file(afc, path, mode, &file);
@@ -235,7 +235,7 @@ int ifuse_truncate(const char *path, off_t size) {
int result = 0;
iphone_afc_client_t afc = fuse_get_context()->private_data;
iphone_afc_file_t tfile = NULL;
- iphone_afc_open_file(afc, path, AFC_FILE_READ, &tfile);
+ iphone_afc_open_file(afc, path, IPHONE_AFC_FILE_READ, &tfile);
if (!tfile) return -1;
result = iphone_afc_truncate_file(afc, tfile, size);
diff --git a/src/main.c b/src/main.c
index fd8e0fe..dd6e51b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -87,7 +87,7 @@ int main(int argc, char *argv[]) {
iphone_afc_file_t my_file = NULL;
struct stat stbuf;
iphone_afc_get_file_attr ( afc, "/iTunesOnTheGoPlaylist.plist", &stbuf );
- if (IPHONE_E_SUCCESS == iphone_afc_open_file(afc, "/iTunesOnTheGoPlaylist.plist", AFC_FILE_READ, &my_file) && my_file) {
+ if (IPHONE_E_SUCCESS == iphone_afc_open_file(afc, "/iTunesOnTheGoPlaylist.plist", IPHONE_AFC_FILE_READ, &my_file) && my_file) {
printf("A file size: %i\n", stbuf.st_size);
char *file_data = (char*)malloc(sizeof(char) * stbuf.st_size);
iphone_afc_read_file(afc, my_file, file_data, stbuf.st_size, &bytes);
@@ -100,7 +100,7 @@ int main(int argc, char *argv[]) {
free(file_data);
} else printf("couldn't open a file\n");
- iphone_afc_open_file(afc, "/readme.libiphone.fx", AFC_FILE_WRITE, &my_file);
+ iphone_afc_open_file(afc, "/readme.libiphone.fx", IPHONE_AFC_FILE_WRITE, &my_file);
if (my_file) {
char *outdatafile = strdup("this is a bitchin text file\n");
iphone_afc_write_file(afc, my_file, outdatafile, strlen(outdatafile), &bytes);
@@ -120,7 +120,7 @@ int main(int argc, char *argv[]) {
else printf("Failure. (expected unless you have a /renme file on your phone)\n");
printf("Seek & read\n");
- iphone_afc_open_file(afc, "/readme.libiphone.fx", AFC_FILE_READ, &my_file);
+ iphone_afc_open_file(afc, "/readme.libiphone.fx", IPHONE_AFC_FILE_READ, &my_file);
if (IPHONE_E_SUCCESS != iphone_afc_seek_file(afc, my_file, 5)) printf("WARN: SEEK DID NOT WORK\n");
char *threeletterword = (char*)malloc(sizeof(char) * 5);
iphone_afc_read_file(afc, my_file, threeletterword, 3, &bytes);