summaryrefslogtreecommitdiff
path: root/include/apr_file_io.h
diff options
context:
space:
mode:
authorcolm <colm@13f79535-47bb-0310-9956-ffa450edef68>2005-10-18 14:48:23 +0000
committercolm <colm@13f79535-47bb-0310-9956-ffa450edef68>2005-10-18 14:48:23 +0000
commitf299cdf56d365bad59f64858e62e8c0b0004019f (patch)
treead82e26840c2543fd69baed16764d08a46846136 /include/apr_file_io.h
parentcd180e64123371a70cec08c1d367e4290af7ada2 (diff)
downloadlibapr-f299cdf56d365bad59f64858e62e8c0b0004019f.tar.gz
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
Diffstat (limited to 'include/apr_file_io.h')
-rw-r--r--include/apr_file_io.h21
1 files changed, 21 insertions, 0 deletions
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
@@ -576,6 +576,27 @@ APR_DECLARE(apr_status_t) apr_file_setaside(apr_file_t **new_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
* @param where How to move the pointer, one of: