File: iquotedprintablebuf.yo

package info (click to toggle)
bobcat 6.02.02-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 13,960 kB
  • sloc: cpp: 18,954; fortran: 5,617; makefile: 2,787; sh: 659; perl: 401; ansic: 26
file content (120 lines) | stat: -rw-r--r-- 4,946 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
includefile(include/header)

COMMENT(manpage, section, releasedate, archive, short name)
manpage(FBB::IQuotedPrintableBuf)(3bobcat)(_CurYrs_)
        (libbobcat-dev__CurVers_)
        (QuotedPrintable converting Stream Buffer)

manpagename(FBB::IQuotedPrintableBuf)
            (Input Filtering stream buffer doing quoted printable conversions)

manpagesynopsis()
    bf(#include <bobcat/iquotedprintablebuf>)nl()
    Linking option: tt(-lbobcat)

manpagedescription()

    The information made available by bf(IQuotedPrintableBuf) objects is
either quoted-printable encoded or decoded. The information to convert is read
by bf(IQuotedPrintableBuf) objects via tt(std::istream) objects.

    The class bf(IQuotedPrintableBuf) is a class template, using a
tt(FBB::CryptType) template non-type parameter. Objects of the class
bf(FBB::IQuotedPrintableBuf<FBB::ENCODE>) encode the information they
receive, objects of the class bf(FBB::IQuotedPrintableBuf<FBB::DECODE>)
decode the information they receive. See also section bf(ENUMERATION) below.

    Quoted-printable encoding is sometimes used in e-mail attachments (See
also lurl(https://en.wikipedia.org/wiki/Quoted-printable) and
lurl(https://www.ietf.org/rfc/rfc2045.txt) (section 6.7)). Its main
characteristics are:
    itemization(
    it() Lines are at most 76 characters long;
    it() Lines longer than 76 characters are split into sub-lines, using
        tt(=\n) combinations to indicate `soft line breaks'. Lines not ending
        in soft line breaks indicate true end of lines.
    it() All printable characters, except for the tt(=) character and (final)
        blank characters just before the end of lines, are copied as-is, all
        other characters are escaped by writing tt(=XX) sequences, with XX
        being the ascii-character representation of the hexadecimal value of
        the escaped character (e.g., the tt(=) character is encoded as
        tt(=3D), a final space before end-of-line is encoded as tt(=20), a
        final tab as tt(=09)). Only capital letters are used when escaping
        characters.
    )nl()


includefile(include/namespace)

manpagesection(INHERITS FROM)
    bf(FBB::IFilterBuf)

manpagesection(MEMBER FUNCTIONS)
     All members of bf(FBB::IFilterBuf) are available, as
bf(IQuotedPrintableBuf) inherits from this class.

    Overloaded move and/or copy assignment operators are not available.

manpagesection(ENUMERATION)

    bf(IQuotedPrintableBuf) objects either encode or decode
quoted-printable information. bf(IQuotedPrintableBuf) objects of the
class bf(FBB::IQuotedPrintableBuf<FBB::ENCODE>) encode the data they
receive, bf(IQuotedPrintableBuf) objects of the class
bf(FBB::IQuotedPrintableBuf<FBB::DECODE>) decode the data they receive.

The values tt(ENCODE) and tt(DECODE) are defined in the tt(enum CryptType),
defined in the tt(FBB) namespace.

manpagesection(CONSTRUCTOR)
    itemization(
    itb(IQuotedPrintableBuf<CryptType>(std::istream &in, size_t bufSize
        = 1000))
       This constructor initializes the streambuf.

    - tt(IQuotedPrintableBuf<ENCODE>) objects perform quoted-printable
        encoding;nl()
    - tt(IQuotedPrintableBuf<DECODE>) objects perform quoted-printable
        decoding;nl()
    - tt(IQuotedPrintableBuf<CryptType>) objects obtain the bytes to
        encode or decode from tt(std::istream &in);nl()
    - The tt(IFilterBuf) base class is initialized with a buffer of
        size tt(bufSize), using a lower bound of 100 characters.

    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.
    )

    Copy and move constructors (and assignment operators) are not available.

manpagesection(EXAMPLE)

    The example shows the construction of tt(IQuotedPrintableBuf<ENCODE>)
objects tt(encode) which are used to initialize a tt(std::istream) object. The
information read from this tt(istream) is quoted-printable encoded.

tt(IQuotedPrintableBuf<DECODE>) objects read quoted-printable encoded
information from tt(std::istream) objects, decoding the information.

The tt(std::istream din) object is initialized with the
tt(IQuotedPrintableBuf<DECODE>) object, and its content is sent to
tt(std::cout). The information that is presented at tt(std::cin) and that
appears at tt(std::cout) should be identical.

    verbinclude(../../iquotedprintablebuf/driver/driver.cc)

manpagefiles()
    em(bobcat/iquotedprintablebuf) - defines the class interface

manpageseealso()
    bf(bobcat)(7), bf(isymcryptstreambuf)(3bobcat),
bf(iquotedprintablestream)(3bobcat), bf(ifilterbuf)(3bobcat),
bf(ofilterbuf)(3bobcat), bf(std::streambuf).

manpagebugs()
    None reported.

includefile(include/trailer)