Last change
on this file since 5 was 5, checked in by cheese, 11 years ago |
#1 add windows project and fix build compatibility
|
File size:
1018 bytes
|
Line | |
---|
1 | /**
|
---|
2 | * cf_file.h
|
---|
3 | */
|
---|
4 | #ifndef __CF_FILE_H__
|
---|
5 | #define __CF_FILE_H__
|
---|
6 |
|
---|
7 | #include "cf_base.h"
|
---|
8 | #include <fcntl.h>
|
---|
9 |
|
---|
10 | #define CF_ERROR_FILE CF_ERROR_BASE * 2
|
---|
11 |
|
---|
12 | #define CF_ERROR_FILE_OPEN CF_ERROR_FILE - 1
|
---|
13 | #define CF_ERROR_FILE_INVALID_ARGS CF_ERROR_FILE - 2
|
---|
14 | #define CF_ERROR_FILE_READ CF_ERROR_FILE - 3
|
---|
15 | #define CF_ERROR_FILE_WRITE CF_ERROR_FILE - 4
|
---|
16 | #define CF_ERROR_FILE_CREATE CF_ERROR_FILE - 5
|
---|
17 | #define CF_ERROR_FILE_CLOSE CF_ERROR_FILE - 6
|
---|
18 | #define CF_ERROR_FILE_GET_SIZE CF_ERROR_FILE - 7
|
---|
19 |
|
---|
20 | #ifdef __cplusplus
|
---|
21 | extern "C" {
|
---|
22 | #endif
|
---|
23 |
|
---|
24 | CF_EXPORT int
|
---|
25 | CF_File_Open (const char * path,
|
---|
26 | const int flag);
|
---|
27 |
|
---|
28 | CF_EXPORT int
|
---|
29 | CF_FILE_Close (const int fd);
|
---|
30 |
|
---|
31 | CF_EXPORT int
|
---|
32 | CF_File_Create (const char * path);
|
---|
33 |
|
---|
34 | CF_EXPORT int
|
---|
35 | CF_File_Read (const int fd,
|
---|
36 | void * buf,
|
---|
37 | const size_t len);
|
---|
38 |
|
---|
39 | CF_EXPORT int
|
---|
40 | CF_File_Write (const int fd,
|
---|
41 | const void * buf,
|
---|
42 | const size_t len);
|
---|
43 |
|
---|
44 | CF_EXPORT int
|
---|
45 | CF_File_GetSize (const int fd);
|
---|
46 |
|
---|
47 | #ifdef __cplusplus
|
---|
48 | }
|
---|
49 | #endif
|
---|
50 |
|
---|
51 | #endif // #ifndef __CF_FILE_H__
|
---|
Note:
See
TracBrowser
for help on using the repository browser.