.TH "FBB::IQuotedPrintableStreambuf" "3bobcat" "2005\-2018" "libbobcat\-dev_4\&.08\&.06\-x\&.tar\&.gz" "QuotedPrintable converting Stream Buffer" .PP .SH "NAME" FBB::IQuotedPrintableStreambuf \- Input Filtering stream buffer doing quoted printable conversions .PP .SH "SYNOPSIS" \fB#include \fP .br Linking option: \fI\-lbobcat\fP .PP .SH "DESCRIPTION" .PP The information made available by \fBIQuotedPrintableStreambuf\fP objects is either quoted\-printable encoded or decoded\&. The information to convert is read by \fBIQuotedPrintableStreambuf\fP objects via \fIstd::istream\fP objects\&. .PP The class \fBIQuotedPrintableStreambuf\fP is a class template, using a \fIFBB::CryptType\fP template non\-type parameter\&. Objects of the class \fBFBB::IQuotedPrintableStreambuf\fP encode the information they receive, objects of the class \fBFBB::IQuotedPrintableStreambuf\fP decode the information they receive\&. See also section \fBENUMERATION\fP below\&. .PP Quoted\-printable encoding is sometimes used in e\-mail attachments (See also https://en\&.wikipedia\&.org/wiki/Quoted\-printable and https://www\&.ietf\&.org/rfc/rfc2045\&.txt (section 6\&.7))\&. Its main characteristics are: .IP o Lines are at most 76 characters long; .IP o Lines longer than 76 characters are split into sub\-lines, using \fI=\en\fP combinations to indicate `soft line breaks\(cq\&\&. Lines not ending in soft line breaks indicate true end of lines\&. .IP o All printable characters, except for the \fI=\fP character and (final) blank characters just before the end of lines, are copied as\-is, all other characters are escaped by writing \fI=XX\fP sequences, with XX being the ascii\-character representation of the hexadecimal value of the escaped character (e\&.g\&., the \fI=\fP character is encoded as \fI=3D\fP, a final space before end\-of\-line is encoded as \fI=20\fP, a final tab as \fI=09\fP)\&. Only capital letters are used when escaping characters\&. .br .PP .SH "NAMESPACE" \fBFBB\fP .br All constructors, members, operators and manipulators, mentioned in this man\-page, are defined in the namespace \fBFBB\fP\&. .PP .SH "INHERITS FROM" \fBFBB::IFilterStreambuf\fP .PP .SH "MEMBER FUNCTIONS" All members of \fBFBB::IFilterStreambuf\fP are available, as \fBIQuotedPrintableStreambuf\fP inherits from this class\&. .PP Overloaded move and/or copy assignment operators are not available\&. .PP .SH "ENUMERATION" .PP \fBIQuotedPrintableStreambuf\fP objects either encode or decode quoted\-printable information\&. \fBIQuotedPrintableStreambuf\fP objects of the class \fBFBB::IQuotedPrintableStreambuf\fP encode the data they receive, \fBIQuotedPrintableStreambuf\fP objects of the class \fBFBB::IQuotedPrintableStreambuf\fP decode the data they receive\&. .PP The values \fIENCODE\fP and \fIDECODE\fP are defined in the \fIenum CryptType\fP, defined in the \fIFBB\fP namespace\&. .PP .SH "CONSTRUCTOR" .IP o \fBIQuotedPrintableStreambuf(std::istream &in, size_t bufSize = 1000)\fP: .br This constructor initializes the streambuf\&. .IP \- \fIIQuotedPrintableStreambuf\fP objects perform quoted\-printable encoding; .br \- \fIIQuotedPrintableStreambuf\fP objects perform quoted\-printable decoding; .br \- \fIIQuotedPrintableStreambuf\fP objects obtain the bytes to encode or decode from \fIstd::istream &in\fP; .br \- The \fIIFilterStreambuf\fP base class is initialized with a buffer of size \fIbufSize\fP, using a lower bound of 100 characters\&. .IP The constructor uses a configurable buffer size for reading\&. Characters read into the buffer which are not part of the actual quoted\-printable encoded data are unavailable after completing the quoted\-printable decoding\&. If information beyond the quoted\-printable input block should remain available, then a buffer size of 1 should be specified\&. .PP Copy\- and move constructors are not available\&. .PP .SH "EXAMPLE" .PP The example shows the construction of \fIIQuotedPrintableStreambuf\fP objects \fIencode\fP which are used to initialize a \fIstd::istream\fP object\&. The information read from this \fIistream\fP is quoted\-printable encoded\&. .PP \fIIQuotedPrintableStreambuf\fP objects read quoted\-printable encoded information from \fIstd::istream\fP objects, decoding the information\&. .PP The \fIstd::istream din\fP object is initialized with the \fIIQuotedPrintableStreambuf\fP object, and its contents is sent to \fIstd::cout\fP\&. The information that is presented at \fIstd::cin\fP and that appears at \fIstd::cout\fP should be identical\&. .PP .nf #include #include #include using namespace std; using namespace FBB; int main(int argc, char **argv) { if (argc == 1) { cout << \(dq\&Usage: \(dq\& << argv[0] << \(dq\& [edb] < infile > outfile\en\(dq\& \(dq\&to quoted printable \-e\-ncode, \-d\-ecode or \-b\-oth\en\(dq\&; return 0; } switch (argv[1][0]) { case \(cq\&e\(cq\&: { IQuotedPrintableStreambuf encode(cin); istream ein(&encode); cout << ein\&.rdbuf(); } break; case \(cq\&d\(cq\&: { IQuotedPrintableStreambuf decode(cin); istream din(&decode); cout << din\&.rdbuf(); } break; case \(cq\&b\(cq\&: { IQuotedPrintableStreambuf encode(cin); istream ein(&encode); IQuotedPrintableStreambuf decode(ein); istream din(&decode); cout << din\&.rdbuf(); } break; } } .fi .PP .SH "FILES" \fIbobcat/iquotedprintablestreambuf\fP \- defines the class interface .PP .SH "SEE ALSO" \fBbobcat\fP(7), \fBisymcryptstreambuf\fP(3bobcat), \fBiquotedprintablestream\fP(3bobcat), \fBifilterstreambuf\fP(3bobcat), \fBofilterstreambuf\fP(3bobcat), \fBstd::streambuf\fP\&. .PP .SH "BUGS" None reported\&. .PP .SH "DISTRIBUTION FILES" .IP o \fIbobcat_4\&.08\&.06\-x\&.dsc\fP: detached signature; .IP o \fIbobcat_4\&.08\&.06\-x\&.tar\&.gz\fP: source archive; .IP o \fIbobcat_4\&.08\&.06\-x_i386\&.changes\fP: change log; .IP o \fIlibbobcat1_4\&.08\&.06\-x_*\&.deb\fP: debian package holding the libraries; .IP o \fIlibbobcat1\-dev_4\&.08\&.06\-x_*\&.deb\fP: debian package holding the libraries, headers and manual pages; .IP o \fIhttp://sourceforge\&.net/projects/bobcat\fP: public archive location; .PP .SH "BOBCAT" Bobcat is an acronym of `Brokken\(cq\&s Own Base Classes And Templates\(cq\&\&. .PP .SH "COPYRIGHT" This is free software, distributed under the terms of the GNU General Public License (GPL)\&. .PP .SH "AUTHOR" Frank B\&. Brokken (\fBf\&.b\&.brokken@rug\&.nl\fP)\&. .PP