Subversion
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
svn_quoprint.h
Go to the documentation of this file.
1 /**
2  * @copyright
3  * ====================================================================
4  * Licensed to the Apache Software Foundation (ASF) under one
5  * or more contributor license agreements. See the NOTICE file
6  * distributed with this work for additional information
7  * regarding copyright ownership. The ASF licenses this file
8  * to you under the Apache License, Version 2.0 (the
9  * "License"); you may not use this file except in compliance
10  * with the License. You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing,
15  * software distributed under the License is distributed on an
16  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17  * KIND, either express or implied. See the License for the
18  * specific language governing permissions and limitations
19  * under the License.
20  * ====================================================================
21  * @endcopyright
22  *
23  * @file svn_quoprint.h
24  * @brief quoted-printable encoding and decoding functions.
25  */
26 
27 #ifndef SVN_QUOPRINT_H
28 #define SVN_QUOPRINT_H
29 
30 #include <apr_pools.h>
31 
32 #include "svn_string.h" /* for svn_strinbuf_t */
33 #include "svn_io.h" /* for svn_stream_t */
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif /* __cplusplus */
38 
39 /** Return a writable generic stream which will encode binary data in
40  * quoted-printable format and write the encoded data to @a output. Be
41  * sure to close the stream when done writing in order to squeeze out
42  * the last bit of encoded data.
43  */
46  apr_pool_t *pool);
47 
48 /** Return a writable generic stream which will decode binary data in
49  * quoted-printable format and write the decoded data to @a output. Be
50  * sure to close the stream when done writing in order to squeeze out
51  * the last bit of encoded data.
52  */
55  apr_pool_t *pool);
56 
57 
58 /** Simpler interface for encoding quoted-printable data assuming we have all
59  * of it present at once. The returned string will be allocated from @a pool.
60  */
63  apr_pool_t *pool);
64 
65 /** Simpler interface for decoding quoted-printable data assuming we have all
66  * of it present at once. The returned string will be allocated from @a pool.
67  */
70  apr_pool_t *pool);
71 
72 
73 #ifdef __cplusplus
74 }
75 #endif /* __cplusplus */
76 
77 #endif /* SVN_QUOPRINT_H */
Counted-length strings for Subversion, plus some C string goodies.
General file I/O for Subversion.
struct svn_stream_t svn_stream_t
An abstract stream of bytes–either incoming or outgoing or both.
Definition: svn_io.h:863
svn_stringbuf_t * svn_quoprint_decode_string(const svn_stringbuf_t *str, apr_pool_t *pool)
Simpler interface for decoding quoted-printable data assuming we have all of it present at once...
svn_stream_t * svn_quoprint_decode(svn_stream_t *output, apr_pool_t *pool)
Return a writable generic stream which will decode binary data in quoted-printable format and write t...
svn_stream_t * svn_quoprint_encode(svn_stream_t *output, apr_pool_t *pool)
Return a writable generic stream which will encode binary data in quoted-printable format and write t...
svn_stringbuf_t * svn_quoprint_encode_string(const svn_stringbuf_t *str, apr_pool_t *pool)
Simpler interface for encoding quoted-printable data assuming we have all of it present at once...
A buffered string, capable of appending without an allocation and copy for each append.
Definition: svn_string.h:104