summaryrefslogtreecommitdiffstats
path: root/include/libiphone
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2009-05-08 08:26:38 -0700
committerGravatar Matt Colyer2009-05-08 08:26:38 -0700
commita00db256b55698eea91efab16b6be883246249ca (patch)
tree52501080a57f5c933e3888eced92cd7b30b90cae /include/libiphone
parent2ce660f06cd9399d8aaf3c585130ba6d410b1d17 (diff)
downloadlibimobiledevice-a00db256b55698eea91efab16b6be883246249ca.tar.gz
libimobiledevice-a00db256b55698eea91efab16b6be883246249ca.tar.bz2
file open modes updated
Signed-off-by: Matt Colyer <matt@colyer.name>
Diffstat (limited to 'include/libiphone')
-rw-r--r--include/libiphone/libiphone.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/include/libiphone/libiphone.h b/include/libiphone/libiphone.h
index 36b1512..a45319f 100644
--- a/include/libiphone/libiphone.h
+++ b/include/libiphone/libiphone.h
@@ -54,14 +54,12 @@ extern "C" {
typedef int16_t iphone_error_t;
typedef enum {
- IPHONE_AFC_FILE_READ = 0x00000001, // seems to be able to read and write files
- IPHONE_AFC_FILE_WRITE = 0x00000002, // writes and creates a file, blanks it out, etc.
- IPHONE_AFC_FILE_RW = 0x00000003, // seems to do the same as 2. Might even create the file.
- IPHONE_AFC_FILE_CREAT = 0x00000004, // no idea -- appears to be "write" -- clears file beforehand like 3
- IPHONE_AFC_FILE_OP6 = 0x00000006, // no idea yet -- appears to be the same as 5.
- IPHONE_AFC_FILE_OP1 = 0x00000001, // no idea juuust yet... probably read.
- IPHONE_AFC_FILE_OP0 = 0x00000000,
- IPHONE_AFC_FILE_OP10 = 0x0000000a
+ AFC_FOPEN_RDONLY = 0x00000001, // r O_RDONLY
+ AFC_FOPEN_RW = 0x00000002, // r+ O_RDWR | O_CREAT
+ AFC_FOPEN_WRONLY = 0x00000003, // w O_WRONLY | O_CREAT | O_TRUNC
+ AFC_FOPEN_WR = 0x00000004, // w+ O_RDWR | O_CREAT | O_TRUNC
+ AFC_FOPEN_APPEND = 0x00000005, // a O_WRONLY | O_APPEND | O_CREAT
+ AFC_FOPEN_RDAPPEND = 0x00000006 // a+ O_RDWR | O_APPEND | O_CREAT
} iphone_afc_file_mode_t;
struct iphone_device_int;