BLOG | DOCUMENTATION | TRAC

Home --> Documentations --> PJLIB Reference

file_io.h
Go to the documentation of this file.
1 /* $Id: file_io.h 3553 2011-05-05 06:14:19Z nanang $ */
2 /*
3  * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
4  * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  */
20 #ifndef __PJ_FILE_IO_H__
21 #define __PJ_FILE_IO_H__
22 
27 #include <pj/types.h>
28 
30 
60 {
61  PJ_O_RDONLY = 0x1101,
62  PJ_O_WRONLY = 0x1102,
63  PJ_O_RDWR = 0x1103,
65  PJ_O_APPEND = 0x1108
66 };
67 
72 {
73  PJ_SEEK_SET = 0x1201,
74  PJ_SEEK_CUR = 0x1202,
75  PJ_SEEK_END = 0x1203
76 };
77 
94 PJ_DECL(pj_status_t) pj_file_open(pj_pool_t *pool,
95  const char *pathname,
96  unsigned flags,
97  pj_oshandle_t *fd);
98 
107 
120  const void *data,
121  pj_ssize_t *size);
122 
139  void *data,
140  pj_ssize_t *size);
141 
152  pj_off_t offset,
153  enum pj_file_seek_type whence);
154 
165  pj_off_t *pos);
166 
175 
176 
181 
182 #endif /* __PJ_FILE_IO_H__ */
183 
Definition: file_io.h:74
pj_file_access
Definition: file_io.h:59
Definition: file_io.h:61
pj_status_t pj_file_flush(pj_oshandle_t fd)
Definition: file_io.h:75
Definition: file_io.h:63
Declaration of basic types and utility.
Definition: file_io.h:62
int pj_status_t
Definition: types.h:68
pj_file_seek_type
Definition: file_io.h:71
void * pj_oshandle_t
Definition: types.h:257
pj_ssize_t pj_off_t
Definition: types.h:108
#define PJ_END_DECL
Definition: config.h:1067
pj_status_t pj_file_close(pj_oshandle_t fd)
#define PJ_BEGIN_DECL
Definition: config.h:1066
pj_status_t pj_file_getpos(pj_oshandle_t fd, pj_off_t *pos)
long pj_ssize_t
Definition: types.h:64
Definition: pool.h:313
pj_status_t pj_file_write(pj_oshandle_t fd, const void *data, pj_ssize_t *size)
pj_status_t pj_file_read(pj_oshandle_t fd, void *data, pj_ssize_t *size)
pj_status_t pj_file_setpos(pj_oshandle_t fd, pj_off_t offset, enum pj_file_seek_type whence)
Definition: file_io.h:73
Definition: file_io.h:65
pj_status_t pj_file_open(pj_pool_t *pool, const char *pathname, unsigned flags, pj_oshandle_t *fd)

 


PJLIB Open Source, high performance, small footprint, and very very portable framework
Copyright (C) 2006-2009 Teluu Inc.