gwenhywfar  5.11.1beta
syncio_file.h
Go to the documentation of this file.
1 /***************************************************************************
2  begin : Tue Apr 27 2010
3  copyright : (C) 2010 by Martin Preuss
4  email : martin@libchipcard.de
5 
6  ***************************************************************************
7  * *
8  * This library is free software; you can redistribute it and/or *
9  * modify it under the terms of the GNU Lesser General Public *
10  * License as published by the Free Software Foundation; either *
11  * version 2.1 of the License, or (at your option) any later version. *
12  * *
13  * This library is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16  * Lesser General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU Lesser General Public *
19  * License along with this library; if not, write to the Free Software *
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
21  * MA 02111-1307 USA *
22  * *
23  ***************************************************************************/
24 
25 
26 #ifndef GWENHYWFAR_SYNCIO_FILE_H
27 #define GWENHYWFAR_SYNCIO_FILE_H
28 
29 #include <gwenhywfar/syncio.h>
30 
31 
32 #define GWEN_SYNCIO_FILE_TYPE "file"
33 
34 
35 
36 typedef enum {
44 
45 
46 typedef enum {
51 
52 
53 #define GWEN_SYNCIO_FILE_FLAGS_READ 0x00000001
54 #define GWEN_SYNCIO_FILE_FLAGS_WRITE 0x00000002
55 #define GWEN_SYNCIO_FILE_FLAGS_APPEND 0x00000008
56 #define GWEN_SYNCIO_FILE_FLAGS_RANDOM 0x00000010
57 
58 #define GWEN_SYNCIO_FILE_FLAGS_UREAD 0x00000100
59 #define GWEN_SYNCIO_FILE_FLAGS_UWRITE 0x00000200
60 #define GWEN_SYNCIO_FILE_FLAGS_UEXEC 0x00000400
61 
62 #define GWEN_SYNCIO_FILE_FLAGS_GREAD 0x00001000
63 #define GWEN_SYNCIO_FILE_FLAGS_GWRITE 0x00002000
64 #define GWEN_SYNCIO_FILE_FLAGS_GEXEC 0x00004000
65 
66 #define GWEN_SYNCIO_FILE_FLAGS_OREAD 0x00010000
67 #define GWEN_SYNCIO_FILE_FLAGS_OWRITE 0x00020000
68 #define GWEN_SYNCIO_FILE_FLAGS_OEXEC 0x00040000
69 
70 
71 
72 #ifdef __cplusplus
73 extern "C" {
74 #endif
75 
76 
77 
80 
81 
84 
87 
90 
92 const char *GWEN_SyncIo_File_GetPath(const GWEN_SYNCIO *sio);
93 
95 int64_t GWEN_SyncIo_File_Seek(GWEN_SYNCIO *sio, int64_t pos, GWEN_SYNCIO_FILE_WHENCE whence);
96 
97 
98 #ifdef __cplusplus
99 }
100 #endif
101 
102 
103 #endif
104 
105 
#define GWENHYWFAR_API
Definition: gwenhywfarapi.h:67
struct GWEN_SYNCIO GWEN_SYNCIO
Definition: syncio.h:40
GWEN_SYNCIO_FILE_CREATIONMODE
Definition: syncio_file.h:36
@ GWEN_SyncIo_File_CreationMode_Unknown
Definition: syncio_file.h:37
@ GWEN_SyncIo_File_CreationMode_OpenAlways
Definition: syncio_file.h:41
@ GWEN_SyncIo_File_CreationMode_CreateNew
Definition: syncio_file.h:39
@ GWEN_SyncIo_File_CreationMode_CreateAlways
Definition: syncio_file.h:40
@ GWEN_SyncIo_File_CreationMode_TruncateExisting
Definition: syncio_file.h:42
@ GWEN_SyncIo_File_CreationMode_OpenExisting
Definition: syncio_file.h:38
GWENHYWFAR_API const char * GWEN_SyncIo_File_GetPath(const GWEN_SYNCIO *sio)
GWENHYWFAR_API GWEN_SYNCIO * GWEN_SyncIo_File_new(const char *path, GWEN_SYNCIO_FILE_CREATIONMODE cm)
GWENHYWFAR_API GWEN_SYNCIO * GWEN_SyncIo_File_fromStdout(void)
GWENHYWFAR_API GWEN_SYNCIO * GWEN_SyncIo_File_fromStdin(void)
GWENHYWFAR_API int64_t GWEN_SyncIo_File_Seek(GWEN_SYNCIO *sio, int64_t pos, GWEN_SYNCIO_FILE_WHENCE whence)
GWEN_SYNCIO_FILE_WHENCE
Definition: syncio_file.h:46
@ GWEN_SyncIo_File_Whence_Set
Definition: syncio_file.h:47
@ GWEN_SyncIo_File_Whence_Current
Definition: syncio_file.h:48
@ GWEN_SyncIo_File_Whence_End
Definition: syncio_file.h:49
GWENHYWFAR_API GWEN_SYNCIO * GWEN_SyncIo_File_fromStderr(void)