Back to index

im-sdk  12.3.91
iiimp-file-operation.h
Go to the documentation of this file.
00001 #if !defined(IIIMP_FILE_OPERATION_H)
00002 #define IIIMP_FILE_OPERATION_H
00003 
00004 
00005 #ifdef __cplusplus
00006 extern "C" {
00007 #endif
00008 
00009 /* IIIMP_FILE_OPERATION */
00010 
00011 enum IIIMP_FILE_OPERATION {
00012        IIIMP_FILE_OPERATION_NONE   = 0,
00013 
00014        IIIMP_FILE_OPERATION_CLOSE  = 1,
00015        IIIMP_FILE_OPERATION_CREAT  = 2,
00016        IIIMP_FILE_OPERATION_FTRUNCATE     = 3,
00017        IIIMP_FILE_OPERATION_LSEEK  = 4,
00018        IIIMP_FILE_OPERATION_OPEN   = 5,
00019        IIIMP_FILE_OPERATION_READ   = 6,
00020        IIIMP_FILE_OPERATION_TRUNCATE      = 7,
00021        IIIMP_FILE_OPERATION_WRITE  = 8,
00022 
00023        IIIMP_FILE_OPERATION_LINK   = 9,
00024        IIIMP_FILE_OPERATION_READLINK      = 10,
00025        IIIMP_FILE_OPERATION_RENAME        = 11,
00026        IIIMP_FILE_OPERATION_SYMLINK       = 12,
00027        IIIMP_FILE_OPERATION_UNLINK        = 13,
00028 
00029        IIIMP_FILE_OPERATION_CHMOD  = 14,
00030        IIIMP_FILE_OPERATION_CHOWN  = 15,
00031        IIIMP_FILE_OPERATION_FCHMOD        = 16,
00032        IIIMP_FILE_OPERATION_FCHOWN        = 17,
00033        IIIMP_FILE_OPERATION_LCHOWN        = 18,
00034        IIIMP_FILE_OPERATION_UTIME  = 19,
00035        IIIMP_FILE_OPERATION_UTIMES        = 20,
00036 
00037        IIIMP_FILE_OPERATION_FSTAT  = 21,
00038        IIIMP_FILE_OPERATION_LSTAT  = 22,
00039        IIIMP_FILE_OPERATION_STAT   = 23,
00040        IIIMP_FILE_OPERATION_ACCESS        = 24,
00041 
00042        IIIMP_FILE_OPERATION_CLOSEDIR      = 25,
00043        IIIMP_FILE_OPERATION_OPENDIR       = 26,
00044        IIIMP_FILE_OPERATION_READDIR       = 27,
00045        IIIMP_FILE_OPERATION_REWINDDIR     = 28,
00046        IIIMP_FILE_OPERATION_SEEKDIR       = 29,
00047        IIIMP_FILE_OPERATION_TELLDIR       = 30,
00048 
00049        IIIMP_FILE_OPERATION_MKDIR  = 31,
00050        IIIMP_FILE_OPERATION_RMDIR  = 32,
00051 
00052        IIIMP_FILE_OPERATION_FCNTL  = 33,
00053 
00054        IIIMP_FILE_OPERATION_LAST   = 34
00055 };
00056 
00057 
00058 /*
00059  * open flag
00060  */
00061 #define IIIMP_FILE_OPERATION_OPEN_O_RDONLY              (0)
00062 #define IIIMP_FILE_OPERATION_OPEN_O_WRONLY              (1)
00063 #define IIIMP_FILE_OPERATION_OPEN_O_RDWR         (2)
00064 #define IIIMP_FILE_OPERATION_OPEN_O_APPEND              (0x0008)
00065 #define IIIMP_FILE_OPERATION_OPEN_O_CREAT        (0x0100)
00066 #define IIIMP_FILE_OPERATION_OPEN_O_TRUNC        (0x0200)
00067 #define IIIMP_FILE_OPERATION_OPEN_O_EXCL         (0x0400)
00068 
00069 /*
00070  * fcntl request
00071  */
00072 #define IIIMP_FILE_OPERATION_FCNTL_F_SETFD              (2)
00073 #define IIIMP_FILE_OPERATION_FCNTL_F_SETFL              (4)
00074 #define IIIMP_FILE_OPERATION_FCNTL_F_GETLK              (5)
00075 #define IIIMP_FILE_OPERATION_FCNTL_F_SETLK              (6)
00076 #define IIIMP_FILE_OPERATION_FCNTL_F_SETLKW             (7)
00077 
00078 
00079 /*
00080  * fcntl file descriptor flags
00081  */
00082 #define IIIMP_FILE_OPERATION_FCNTL_SETFD_FLAG_FD_CLOEXEC       (1)
00083 
00084 
00085 /*
00086  * fcntl flock type
00087  */
00088 #define IIIMP_FILE_OPERATION_FCNTL_FLOCK_TYPE_F_RDLCK   (1)
00089 #define IIIMP_FILE_OPERATION_FCNTL_FLOCK_TYPE_F_WRLCK   (2)
00090 #define IIIMP_FILE_OPERATION_FCNTL_FLOCK_TYPE_F_UNLCK   (3)
00091 #define IIIMP_FILE_OPERATION_FCNTL_FLOCK_TYPE_F_UNLKSYS (4)
00092 
00093 
00094 /*
00095  * whence
00096  */
00097 #define IIIMP_FILE_OPERATION_WHENCE_SEEK_SET            (0)
00098 #define IIIMP_FILE_OPERATION_WHENCE_SEEK_CUR            (1)
00099 #define IIIMP_FILE_OPERATION_WHENCE_SEEK_END            (2)
00100 
00101 
00102 /*
00103  * access mode
00104  */
00105 #define IIIMP_FILE_OPERATION_ACCESS_F_OK         (0)
00106 #define IIIMP_FILE_OPERATION_ACCESS_X_OK         (1)
00107 #define IIIMP_FILE_OPERATION_ACCESS_W_OK         (2)
00108 #define IIIMP_FILE_OPERATION_ACCESS_R_OK         (4)
00109 
00110 
00111 /*
00112  * error number
00113  */
00114 #define IIIMP_FILE_OPERATION_ERRNO_NONE                 (0)
00115 #define IIIMP_FILE_OPERATION_ERRNO_EPERM         (1)
00116 #define IIIMP_FILE_OPERATION_ERRNO_ENOENT        (2)
00117 #define IIIMP_FILE_OPERATION_ERRNO_EINTR         (4)
00118 #define IIIMP_FILE_OPERATION_ERRNO_EIO                  (5)
00119 #define IIIMP_FILE_OPERATION_ERRNO_ENXIO         (6)
00120 #define IIIMP_FILE_OPERATION_ERRNO_EBADF         (9)
00121 #define IIIMP_FILE_OPERATION_ERRNO_EAGAIN        (11)
00122 #define IIIMP_FILE_OPERATION_ERRNO_ENOMEM        (12)
00123 #define IIIMP_FILE_OPERATION_ERRNO_EACCES        (13)
00124 #define IIIMP_FILE_OPERATION_ERRNO_EFAULT        (14)
00125 #define IIIMP_FILE_OPERATION_ERRNO_EBUSY         (16)
00126 #define IIIMP_FILE_OPERATION_ERRNO_EEXIST        (17)
00127 #define IIIMP_FILE_OPERATION_ERRNO_EXDEV         (18)
00128 #define IIIMP_FILE_OPERATION_ERRNO_ENOTDIR              (20)
00129 #define IIIMP_FILE_OPERATION_ERRNO_EISDIR        (21)
00130 #define IIIMP_FILE_OPERATION_ERRNO_EINVAL        (22)
00131 #define IIIMP_FILE_OPERATION_ERRNO_ENFILE        (23)
00132 #define IIIMP_FILE_OPERATION_ERRNO_EMFILE        (24)
00133 #define IIIMP_FILE_OPERATION_ERRNO_ETXTBSY              (26)
00134 #define IIIMP_FILE_OPERATION_ERRNO_EFBIG         (27)
00135 #define IIIMP_FILE_OPERATION_ERRNO_ENOSPC        (28)
00136 #define IIIMP_FILE_OPERATION_ERRNO_EROFS         (30)
00137 #define IIIMP_FILE_OPERATION_ERRNO_EMLINK        (31)
00138 #define IIIMP_FILE_OPERATION_ERRNO_EDEADLK              (45)
00139 #define IIIMP_FILE_OPERATION_ERRNO_ENOLCK        (46)
00140 #define IIIMP_FILE_OPERATION_ERRNO_EDQUOT        (49)
00141 #define IIIMP_FILE_OPERATION_ERRNO_ENAMETOOLONG         (78)
00142 #define IIIMP_FILE_OPERATION_ERRNO_EOVERFLOW            (79)
00143 #define IIIMP_FILE_OPERATION_ERRNO_ENOSYS        (89)
00144 #define IIIMP_FILE_OPERATION_ERRNO_ELOOP         (90)
00145 
00146 
00147 #ifdef __cplusplus
00148 }
00149 #endif
00150 
00151 #endif /* !IIIMP_FILE_OPERATION_H */
00152 
00153 
00154 /* Local Variables: */
00155 /* c-file-style: "iiim-project" */
00156 /* End: */