/usr/src/redhat/BUILD/httpd-2.2.3/srclib/apr/include/apr_file_io.h

説明を見る。
00001 /* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
00002  * applicable.
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #ifndef APR_FILE_IO_H
00018 #define APR_FILE_IO_H
00019 
00025 #include "apr.h"
00026 #include "apr_pools.h"
00027 #include "apr_time.h"
00028 #include "apr_errno.h"
00029 #include "apr_file_info.h"
00030 #include "apr_inherit.h"
00031 
00032 #define APR_WANT_STDIO          
00033 #define APR_WANT_IOVEC          
00034 #include "apr_want.h"
00035 
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif /* __cplusplus */
00039 
00051 /* Note to implementors: Values in the range 0x00100000--0x80000000
00052    are reserved for platform-specific values. */
00053 
00054 #define APR_FOPEN_READ       0x00001  
00055 #define APR_FOPEN_WRITE      0x00002  
00056 #define APR_FOPEN_CREATE     0x00004  
00057 #define APR_FOPEN_APPEND     0x00008  
00058 #define APR_FOPEN_TRUNCATE   0x00010  
00060 #define APR_FOPEN_BINARY     0x00020  
00061 #define APR_FOPEN_EXCL       0x00040  
00063 #define APR_FOPEN_BUFFERED   0x00080  
00064 #define APR_FOPEN_DELONCLOSE 0x00100  
00065 #define APR_FOPEN_XTHREAD    0x00200  
00068 #define APR_FOPEN_SHARELOCK  0x00400  
00072 #define APR_FOPEN_NOCLEANUP  0x00800  
00074 #define APR_FOPEN_SENDFILE_ENABLED 0x01000 
00077 #define APR_FOPEN_LARGEFILE   0x04000 
00080 /* backcompat */
00081 #define APR_READ             APR_FOPEN_READ       
00082 #define APR_WRITE            APR_FOPEN_WRITE      
00083 #define APR_CREATE           APR_FOPEN_CREATE     
00084 #define APR_APPEND           APR_FOPEN_APPEND     
00085 #define APR_TRUNCATE         APR_FOPEN_TRUNCATE   
00086 #define APR_BINARY           APR_FOPEN_BINARY     
00087 #define APR_EXCL             APR_FOPEN_EXCL       
00088 #define APR_BUFFERED         APR_FOPEN_BUFFERED   
00089 #define APR_DELONCLOSE       APR_FOPEN_DELONCLOSE 
00090 #define APR_XTHREAD          APR_FOPEN_XTHREAD    
00091 #define APR_SHARELOCK        APR_FOPEN_SHARELOCK  
00092 #define APR_FILE_NOCLEANUP   APR_FOPEN_NOCLEANUP  
00093 #define APR_SENDFILE_ENABLED APR_FOPEN_SENDFILE_ENABLED 
00094 #define APR_LARGEFILE        APR_FOPEN_LARGEFILE  
00114 /* flags for apr_file_seek */
00115 
00116 #define APR_SET SEEK_SET
00117 
00118 #define APR_CUR SEEK_CUR
00119 
00120 #define APR_END SEEK_END
00121 
00128 /* flags for apr_file_attrs_set */
00129 #define APR_FILE_ATTR_READONLY   0x01          
00130 #define APR_FILE_ATTR_EXECUTABLE 0x02          
00131 #define APR_FILE_ATTR_HIDDEN     0x04          
00138 #if defined(DOXYGEN)
00139 #define APR_MAX_IOVEC_SIZE 1024                
00141 #elif defined(IOV_MAX)
00142 #define APR_MAX_IOVEC_SIZE IOV_MAX
00143 #elif defined(MAX_IOVEC)
00144 #define APR_MAX_IOVEC_SIZE MAX_IOVEC
00145 #else
00146 #define APR_MAX_IOVEC_SIZE 1024
00147 #endif
00148 
00151 typedef apr_uint32_t apr_fileattrs_t;
00152 
00154 typedef int       apr_seek_where_t;
00155 
00159 typedef struct apr_file_t         apr_file_t;
00160 
00161 /* File lock types/flags */
00167 #define APR_FLOCK_SHARED        1       
00173 #define APR_FLOCK_EXCLUSIVE     2       
00178 #define APR_FLOCK_TYPEMASK      0x000F  
00179 #define APR_FLOCK_NONBLOCK      0x0010  
00217 APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **newf, const char *fname,
00218                                         apr_int32_t flag, apr_fileperms_t perm,
00219                                         apr_pool_t *pool);
00220 
00225 APR_DECLARE(apr_status_t) apr_file_close(apr_file_t *file);
00226 
00234 APR_DECLARE(apr_status_t) apr_file_remove(const char *path, apr_pool_t *pool);
00235 
00245 APR_DECLARE(apr_status_t) apr_file_rename(const char *from_path, 
00246                                           const char *to_path,
00247                                           apr_pool_t *pool);
00248 
00261 APR_DECLARE(apr_status_t) apr_file_copy(const char *from_path, 
00262                                         const char *to_path,
00263                                         apr_fileperms_t perms,
00264                                         apr_pool_t *pool);
00265 
00277 APR_DECLARE(apr_status_t) apr_file_append(const char *from_path, 
00278                                           const char *to_path,
00279                                           apr_fileperms_t perms,
00280                                           apr_pool_t *pool);
00281 
00287 APR_DECLARE(apr_status_t) apr_file_eof(apr_file_t *fptr);
00288 
00304 APR_DECLARE(apr_status_t) apr_file_open_stderr(apr_file_t **thefile,
00305                                                apr_pool_t *pool);
00306 
00314 APR_DECLARE(apr_status_t) apr_file_open_stdout(apr_file_t **thefile,
00315                                                apr_pool_t *pool);
00316 
00324 APR_DECLARE(apr_status_t) apr_file_open_stdin(apr_file_t **thefile,
00325                                               apr_pool_t *pool);
00326 
00344 APR_DECLARE(apr_status_t) apr_file_read(apr_file_t *thefile, void *buf,
00345                                         apr_size_t *nbytes);
00346 
00362 APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf,
00363                                          apr_size_t *nbytes);
00364 
00380 APR_DECLARE(apr_status_t) apr_file_writev(apr_file_t *thefile,
00381                                           const struct iovec *vec,
00382                                           apr_size_t nvec, apr_size_t *nbytes);
00383 
00404 APR_DECLARE(apr_status_t) apr_file_read_full(apr_file_t *thefile, void *buf,
00405                                              apr_size_t nbytes,
00406                                              apr_size_t *bytes_read);
00407 
00428 APR_DECLARE(apr_status_t) apr_file_write_full(apr_file_t *thefile, 
00429                                               const void *buf,
00430                                               apr_size_t nbytes, 
00431                                               apr_size_t *bytes_written);
00432 
00433 
00447 APR_DECLARE(apr_status_t) apr_file_writev_full(apr_file_t *thefile,
00448                                                const struct iovec *vec,
00449                                                apr_size_t nvec,
00450                                                apr_size_t *nbytes);
00456 APR_DECLARE(apr_status_t) apr_file_putc(char ch, apr_file_t *thefile);
00457 
00463 APR_DECLARE(apr_status_t) apr_file_getc(char *ch, apr_file_t *thefile);
00464 
00470 APR_DECLARE(apr_status_t) apr_file_ungetc(char ch, apr_file_t *thefile);
00471 
00479 APR_DECLARE(apr_status_t) apr_file_gets(char *str, int len, 
00480                                         apr_file_t *thefile);
00481 
00487 APR_DECLARE(apr_status_t) apr_file_puts(const char *str, apr_file_t *thefile);
00488 
00493 APR_DECLARE(apr_status_t) apr_file_flush(apr_file_t *thefile);
00494 
00502 APR_DECLARE(apr_status_t) apr_file_dup(apr_file_t **new_file,
00503                                        apr_file_t *old_file,
00504                                        apr_pool_t *p);
00505 
00514 APR_DECLARE(apr_status_t) apr_file_dup2(apr_file_t *new_file,
00515                                         apr_file_t *old_file,
00516                                         apr_pool_t *p);
00517 
00529 APR_DECLARE(apr_status_t) apr_file_setaside(apr_file_t **new_file,
00530                                             apr_file_t *old_file,
00531                                             apr_pool_t *p);
00532 
00546 APR_DECLARE(apr_status_t) apr_file_seek(apr_file_t *thefile, 
00547                                    apr_seek_where_t where,
00548                                    apr_off_t *offset);
00549 
00556 APR_DECLARE(apr_status_t) apr_file_pipe_create(apr_file_t **in, 
00557                                                apr_file_t **out,
00558                                                apr_pool_t *pool);
00559 
00566 APR_DECLARE(apr_status_t) apr_file_namedpipe_create(const char *filename, 
00567                                                     apr_fileperms_t perm, 
00568                                                     apr_pool_t *pool);
00569 
00575 APR_DECLARE(apr_status_t) apr_file_pipe_timeout_get(apr_file_t *thepipe, 
00576                                                apr_interval_time_t *timeout);
00577 
00584 APR_DECLARE(apr_status_t) apr_file_pipe_timeout_set(apr_file_t *thepipe, 
00585                                                   apr_interval_time_t timeout);
00586 
00598 APR_DECLARE(apr_status_t) apr_file_lock(apr_file_t *thefile, int type);
00599 
00604 APR_DECLARE(apr_status_t) apr_file_unlock(apr_file_t *thefile);
00605 
00613 APR_DECLARE(apr_status_t) apr_file_name_get(const char **new_path, 
00614                                             apr_file_t *thefile);
00615     
00622 APR_DECLARE(apr_status_t) apr_file_data_get(void **data, const char *key, 
00623                                             apr_file_t *file);
00624 
00632 APR_DECLARE(apr_status_t) apr_file_data_set(apr_file_t *file, void *data,
00633                                             const char *key,
00634                                             apr_status_t (*cleanup)(void *));
00635 
00643 APR_DECLARE_NONSTD(int) apr_file_printf(apr_file_t *fptr, 
00644                                         const char *format, ...)
00645         __attribute__((format(printf,2,3)));
00646 
00659 APR_DECLARE(apr_status_t) apr_file_perms_set(const char *fname,
00660                                              apr_fileperms_t perms);
00661 
00680 APR_DECLARE(apr_status_t) apr_file_attrs_set(const char *fname,
00681                                              apr_fileattrs_t attributes,
00682                                              apr_fileattrs_t attr_mask,
00683                                              apr_pool_t *pool);
00684 
00693 APR_DECLARE(apr_status_t) apr_file_mtime_set(const char *fname,
00694                                              apr_time_t mtime,
00695                                              apr_pool_t *pool);
00696 
00703 APR_DECLARE(apr_status_t) apr_dir_make(const char *path, apr_fileperms_t perm, 
00704                                        apr_pool_t *pool);
00705 
00713 APR_DECLARE(apr_status_t) apr_dir_make_recursive(const char *path,
00714                                                  apr_fileperms_t perm,
00715                                                  apr_pool_t *pool);
00716 
00722 APR_DECLARE(apr_status_t) apr_dir_remove(const char *path, apr_pool_t *pool);
00723 
00730 APR_DECLARE(apr_status_t) apr_file_info_get(apr_finfo_t *finfo, 
00731                                             apr_int32_t wanted,
00732                                             apr_file_t *thefile);
00733     
00734 
00740 APR_DECLARE(apr_status_t) apr_file_trunc(apr_file_t *fp, apr_off_t offset);
00741 
00747 APR_DECLARE(apr_int32_t) apr_file_flags_get(apr_file_t *f);
00748 
00752 APR_POOL_DECLARE_ACCESSOR(file);
00753 
00758 APR_DECLARE_INHERIT_SET(file);
00759 
00763 APR_DECLARE_INHERIT_UNSET(file);
00764 
00781 APR_DECLARE(apr_status_t) apr_file_mktemp(apr_file_t **fp, char *templ,
00782                                           apr_int32_t flags, apr_pool_t *p);
00783 
00784 
00797 APR_DECLARE(apr_status_t) apr_temp_dir_get(const char **temp_dir, 
00798                                            apr_pool_t *p);
00799 
00802 #ifdef __cplusplus
00803 }
00804 #endif
00805 
00806 #endif  /* ! APR_FILE_IO_H */

Apacheに対してSun Jul 19 22:05:24 2009に生成されました。  doxygen 1.4.7