summaryrefslogtreecommitdiffstats
path: root/include/libimobiledevice/afc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libimobiledevice/afc.h')
-rw-r--r--include/libimobiledevice/afc.h27
1 files changed, 16 insertions, 11 deletions
diff --git a/include/libimobiledevice/afc.h b/include/libimobiledevice/afc.h
index d800d19..c060eb7 100644
--- a/include/libimobiledevice/afc.h
+++ b/include/libimobiledevice/afc.h
@@ -29,7 +29,8 @@ extern "C" {
29 29
30#include <libimobiledevice/libimobiledevice.h> 30#include <libimobiledevice/libimobiledevice.h>
31 31
32/* Error Codes */ 32/** @name Error Codes */
33/*@{*/
33#define AFC_E_SUCCESS 0 34#define AFC_E_SUCCESS 0
34#define AFC_E_UNKNOWN_ERROR 1 35#define AFC_E_UNKNOWN_ERROR 1
35#define AFC_E_OP_HEADER_INVALID 2 36#define AFC_E_OP_HEADER_INVALID 2
@@ -59,28 +60,32 @@ extern "C" {
59#define AFC_E_NO_MEM 31 60#define AFC_E_NO_MEM 31
60#define AFC_E_NOT_ENOUGH_DATA 32 61#define AFC_E_NOT_ENOUGH_DATA 32
61#define AFC_E_DIR_NOT_EMPTY 33 62#define AFC_E_DIR_NOT_EMPTY 33
63/*@}*/
62 64
65/** Represents an error code. */
63typedef int16_t afc_error_t; 66typedef int16_t afc_error_t;
64 67
65/* Flags */ 68/** Flags for afc_file_open */
66typedef enum { 69typedef enum {
67 AFC_FOPEN_RDONLY = 0x00000001, // r O_RDONLY 70 AFC_FOPEN_RDONLY = 0x00000001, /**< r O_RDONLY */
68 AFC_FOPEN_RW = 0x00000002, // r+ O_RDWR | O_CREAT 71 AFC_FOPEN_RW = 0x00000002, /**< r+ O_RDWR | O_CREAT */
69 AFC_FOPEN_WRONLY = 0x00000003, // w O_WRONLY | O_CREAT | O_TRUNC 72 AFC_FOPEN_WRONLY = 0x00000003, /**< w O_WRONLY | O_CREAT | O_TRUNC */
70 AFC_FOPEN_WR = 0x00000004, // w+ O_RDWR | O_CREAT | O_TRUNC 73 AFC_FOPEN_WR = 0x00000004, /**< w+ O_RDWR | O_CREAT | O_TRUNC */
71 AFC_FOPEN_APPEND = 0x00000005, // a O_WRONLY | O_APPEND | O_CREAT 74 AFC_FOPEN_APPEND = 0x00000005, /**< a O_WRONLY | O_APPEND | O_CREAT */
72 AFC_FOPEN_RDAPPEND = 0x00000006 // a+ O_RDWR | O_APPEND | O_CREAT 75 AFC_FOPEN_RDAPPEND = 0x00000006 /**< a+ O_RDWR | O_APPEND | O_CREAT */
73} afc_file_mode_t; 76} afc_file_mode_t;
74 77
78/** Type of link for afc_make_link() calls */
75typedef enum { 79typedef enum {
76 AFC_HARDLINK = 1, 80 AFC_HARDLINK = 1,
77 AFC_SYMLINK = 2 81 AFC_SYMLINK = 2
78} afc_link_type_t; 82} afc_link_type_t;
79 83
84/** Lock operation flags */
80typedef enum { 85typedef enum {
81 AFC_LOCK_SH = 1 | 4, // shared lock 86 AFC_LOCK_SH = 1 | 4, /**< shared lock */
82 AFC_LOCK_EX = 2 | 4, // exclusive lock 87 AFC_LOCK_EX = 2 | 4, /**< exclusive lock */
83 AFC_LOCK_UN = 8 | 4 // unlock 88 AFC_LOCK_UN = 8 | 4 /**< unlock */
84} afc_lock_op_t; 89} afc_lock_op_t;
85 90
86typedef struct afc_client_private afc_client_private; 91typedef struct afc_client_private afc_client_private;