From f299cdf56d365bad59f64858e62e8c0b0004019f Mon Sep 17 00:00:00 2001 From: colm Date: Tue, 18 Oct 2005 14:48:23 +0000 Subject: Add apr-wide definitions and unix implementation of apr_file_buffer_set() and apr_file_buffer_size_get() functions, to support variable buffer sizes for file handles. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@326116 13f79535-47bb-0310-9956-ffa450edef68 --- include/apr_file_io.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'include/apr_file_io.h') diff --git a/include/apr_file_io.h b/include/apr_file_io.h index 4c4519851..0c4a0bfdb 100644 --- a/include/apr_file_io.h +++ b/include/apr_file_io.h @@ -575,6 +575,27 @@ APR_DECLARE(apr_status_t) apr_file_setaside(apr_file_t **new_file, apr_file_t *old_file, apr_pool_t *p); +/** + * Give the specified apr file handle a new buffer + * @param thefile The file handle that is to be modified + * @param buffer The buffer + * @param bufsize The size of the buffer + * @remark It is possible to add a buffer to previously unbuffered + * file handles, the APR_BUFFERED flag will be added to + * the file handle's flags. Likewise, with buffer=NULL and + * bufsize=0 arguments it is possible to make a previously + * buffered file handle unbuffered. + */ +APR_DECLARE(apr_status_t) apr_file_buffer_set(apr_file_t *thefile, + char * buffer, + apr_size_t bufsize); + +/** + * Get the size of any buffer for the specified apr file handle + * @param thefile The file handle + */ +APR_DECLARE(apr_size_t) apr_file_buffer_size_get(apr_file_t *thefile); + /** * Move the read/write file offset to a specified byte within a file. * @param thefile The file descriptor -- cgit v1.2.1