1251881Speter/** 2251881Speter * @copyright 3251881Speter * ==================================================================== 4251881Speter * Licensed to the Apache Software Foundation (ASF) under one 5251881Speter * or more contributor license agreements. See the NOTICE file 6251881Speter * distributed with this work for additional information 7251881Speter * regarding copyright ownership. The ASF licenses this file 8251881Speter * to you under the Apache License, Version 2.0 (the 9251881Speter * "License"); you may not use this file except in compliance 10251881Speter * with the License. You may obtain a copy of the License at 11251881Speter * 12251881Speter * http://www.apache.org/licenses/LICENSE-2.0 13251881Speter * 14251881Speter * Unless required by applicable law or agreed to in writing, 15251881Speter * software distributed under the License is distributed on an 16251881Speter * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17251881Speter * KIND, either express or implied. See the License for the 18251881Speter * specific language governing permissions and limitations 19251881Speter * under the License. 20251881Speter * ==================================================================== 21251881Speter * @endcopyright 22251881Speter * 23251881Speter * @file svn_quoprint.h 24251881Speter * @brief quoted-printable encoding and decoding functions. 25251881Speter */ 26251881Speter 27251881Speter#ifndef SVN_QUOPRINT_H 28251881Speter#define SVN_QUOPRINT_H 29251881Speter 30251881Speter#include <apr_pools.h> 31251881Speter 32251881Speter#include "svn_string.h" /* for svn_strinbuf_t */ 33251881Speter#include "svn_io.h" /* for svn_stream_t */ 34251881Speter 35251881Speter#ifdef __cplusplus 36251881Speterextern "C" { 37251881Speter#endif /* __cplusplus */ 38251881Speter 39251881Speter/** Return a writable generic stream which will encode binary data in 40251881Speter * quoted-printable format and write the encoded data to @a output. Be 41251881Speter * sure to close the stream when done writing in order to squeeze out 42251881Speter * the last bit of encoded data. 43251881Speter */ 44251881Spetersvn_stream_t * 45251881Spetersvn_quoprint_encode(svn_stream_t *output, 46251881Speter apr_pool_t *pool); 47251881Speter 48251881Speter/** Return a writable generic stream which will decode binary data in 49251881Speter * quoted-printable format and write the decoded data to @a output. Be 50251881Speter * sure to close the stream when done writing in order to squeeze out 51251881Speter * the last bit of encoded data. 52251881Speter */ 53251881Spetersvn_stream_t * 54251881Spetersvn_quoprint_decode(svn_stream_t *output, 55251881Speter apr_pool_t *pool); 56251881Speter 57251881Speter 58251881Speter/** Simpler interface for encoding quoted-printable data assuming we have all 59251881Speter * of it present at once. The returned string will be allocated from @a pool. 60251881Speter */ 61251881Spetersvn_stringbuf_t * 62251881Spetersvn_quoprint_encode_string(const svn_stringbuf_t *str, 63251881Speter apr_pool_t *pool); 64251881Speter 65251881Speter/** Simpler interface for decoding quoted-printable data assuming we have all 66251881Speter * of it present at once. The returned string will be allocated from @a pool. 67251881Speter */ 68251881Spetersvn_stringbuf_t * 69251881Spetersvn_quoprint_decode_string(const svn_stringbuf_t *str, 70251881Speter apr_pool_t *pool); 71251881Speter 72251881Speter 73251881Speter#ifdef __cplusplus 74251881Speter} 75251881Speter#endif /* __cplusplus */ 76251881Speter 77251881Speter#endif /* SVN_QUOPRINT_H */ 78