Subversion 1.6.16

svn_quoprint.h

Go to the documentation of this file.
00001 /**
00002  * @copyright
00003  * ====================================================================
00004  * Copyright (c) 2000-2004, 2008 CollabNet.  All rights reserved.
00005  *
00006  * This software is licensed as described in the file COPYING, which
00007  * you should have received as part of this distribution.  The terms
00008  * are also available at http://subversion.tigris.org/license-1.html.
00009  * If newer versions of this license are posted there, you may use a
00010  * newer version instead, at your option.
00011  *
00012  * This software consists of voluntary contributions made by many
00013  * individuals.  For exact contribution history, see the revision
00014  * history and logs, available at http://subversion.tigris.org/.
00015  * ====================================================================
00016  * @endcopyright
00017  *
00018  * @file svn_quoprint.h
00019  * @brief quoted-printable encoding and decoding functions.
00020  */
00021 
00022 #ifndef SVN_QUOPRINT_H
00023 #define SVN_QUOPRINT_H
00024 
00025 #include <apr_pools.h>
00026 
00027 #include "svn_string.h"  /* for svn_strinbuf_t */
00028 #include "svn_io.h"      /* for svn_stream_t */
00029 
00030 #ifdef __cplusplus
00031 extern "C" {
00032 #endif /* __cplusplus */
00033 
00034 /** Return a writable generic stream which will encode binary data in
00035  * quoted-printable format and write the encoded data to @a output.  Be
00036  * sure to close the stream when done writing in order to squeeze out
00037  * the last bit of encoded data.
00038  */
00039 svn_stream_t *
00040 svn_quoprint_encode(svn_stream_t *output,
00041                     apr_pool_t *pool);
00042 
00043 /** Return a writable generic stream which will decode binary data in
00044  * quoted-printable format and write the decoded data to @a output.  Be
00045  * sure to close the stream when done writing in order to squeeze out
00046  * the last bit of encoded data.
00047  */
00048 svn_stream_t *
00049 svn_quoprint_decode(svn_stream_t *output,
00050                     apr_pool_t *pool);
00051 
00052 
00053 /** Simpler interface for encoding quoted-printable data assuming we have all
00054  * of it present at once.  The returned string will be allocated from @a pool.
00055  */
00056 svn_stringbuf_t *
00057 svn_quoprint_encode_string(const svn_stringbuf_t *str,
00058                            apr_pool_t *pool);
00059 
00060 /** Simpler interface for decoding quoted-printable data assuming we have all
00061  * of it present at once.  The returned string will be allocated from @a pool.
00062  */
00063 svn_stringbuf_t *
00064 svn_quoprint_decode_string(const svn_stringbuf_t *str,
00065                            apr_pool_t *pool);
00066 
00067 
00068 #ifdef __cplusplus
00069 }
00070 #endif /* __cplusplus */
00071 
00072 #endif /* SVN_QUOPRINT_H */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines