.TH "FBB::IQuotedPrintableBuf" "3bobcat" "2005\-2020" "libbobcat\-dev_5\&.07\&.00" "QuotedPrintable converting Stream Buffer" .PP .SH "NAME" FBB::IQuotedPrintableBuf \- 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 \fBIQuotedPrintableBuf\fP objects is either quoted\-printable encoded or decoded\&. The information to convert is read by \fBIQuotedPrintableBuf\fP objects via \fIstd::istream\fP objects\&. .PP The class \fBIQuotedPrintableBuf\fP is a class template, using a \fIFBB::CryptType\fP template non\-type parameter\&. Objects of the class \fBFBB::IQuotedPrintableBuf\fP encode the information they receive, objects of the class \fBFBB::IQuotedPrintableBuf\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::IFilterBuf\fP .PP .SH "MEMBER FUNCTIONS" All members of \fBFBB::IFilterBuf\fP are available, as \fBIQuotedPrintableBuf\fP inherits from this class\&. .PP Overloaded move and/or copy assignment operators are not available\&. .PP .SH "ENUMERATION" .PP \fBIQuotedPrintableBuf\fP objects either encode or decode quoted\-printable information\&. \fBIQuotedPrintableBuf\fP objects of the class \fBFBB::IQuotedPrintableBuf\fP encode the data they receive, \fBIQuotedPrintableBuf\fP objects of the class \fBFBB::IQuotedPrintableBuf\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 \fBIQuotedPrintableBuf(std::istream &in, size_t bufSize = 1000)\fP: .br This constructor initializes the streambuf\&. .IP \- \fIIQuotedPrintableBuf\fP objects perform quoted\-printable encoding; .br \- \fIIQuotedPrintableBuf\fP objects perform quoted\-printable decoding; .br \- \fIIQuotedPrintableBuf\fP objects obtain the bytes to encode or decode from \fIstd::istream &in\fP; .br \- The \fIIFilterBuf\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 (and assignment operators) are not available\&. .PP .SH "EXAMPLE" .PP The example shows the construction of \fIIQuotedPrintableBuf\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 \fIIQuotedPrintableBuf\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 \fIIQuotedPrintableBuf\fP object, and its content 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\&: { IQuotedPrintableBuf encode(cin); istream ein(&encode); cout << ein\&.rdbuf(); } break; case \(cq\&d\(cq\&: { IQuotedPrintableBuf decode(cin); istream din(&decode); cout << din\&.rdbuf(); } break; case \(cq\&b\(cq\&: { IQuotedPrintableBuf encode(cin); istream ein(&encode); IQuotedPrintableBuf decode(ein); istream din(&decode); cout << din\&.rdbuf(); } break; } } .fi .PP .SH "FILES" \fIbobcat/iquotedprintablebuf\fP \- defines the class interface .PP .SH "SEE ALSO" \fBbobcat\fP(7), \fBisymcryptstreambuf\fP(3bobcat), \fBiquotedprintablestream\fP(3bobcat), \fBifilterbuf\fP(3bobcat), \fBofilterbuf\fP(3bobcat), \fBstd::streambuf\fP\&. .PP .SH "BUGS" None reported\&. .PP .SH "BOBCAT PROJECT FILES" .PP .IP o \fIhttps://fbb\-git\&.gitlab\&.io/bobcat/\fP: gitlab project page; .IP o \fIbobcat_5\&.07\&.00\-x\&.dsc\fP: detached signature; .IP o \fIbobcat_5\&.07\&.00\-x\&.tar\&.gz\fP: source archive; .IP o \fIbobcat_5\&.07\&.00\-x_i386\&.changes\fP: change log; .IP o \fIlibbobcat1_5\&.07\&.00\-x_*\&.deb\fP: debian package containing the libraries; .IP o \fIlibbobcat1\-dev_5\&.07\&.00\-x_*\&.deb\fP: debian package containing the libraries, headers and manual pages; .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