summaryrefslogtreecommitdiffstats
path: root/mimelib/doc/uuencode.html
blob: b7ba1fd2f895cd9ae44adccd0889f9bc2cd021d6 (plain)
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
<HTML>
<HEAD>
  <TITLE> DwUuencode Man Page </TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<H2>
  <FONT COLOR="navy"> NAME </FONT>
</H2>
<P>
DwUuencode -- Class for performing uuencode or uudecode operations
<H2>
  <FONT COLOR="navy"> SYNOPSIS </FONT>
</H2>
<PRE>class DW_EXPORT DwUuencode {

public:

    DwUuencode();
    virtual ~DwUuencode();
    void <A HREF="uuencode.html#SetFileName">SetFileName</A>(const char* aName);
    const char* <A HREF="uuencode.html#FileName">FileName</A>() const;
    void <A HREF="uuencode.html#SetFileMode">SetFileMode</A>(DwUint16 aMode);
    DwUint16 <A HREF="uuencode.html#FileMode">FileMode</A>() const;
    void <A HREF="uuencode.html#SetBinaryChars">SetBinaryChars</A>(const DwString&amp; aStr);
    const DwString&amp; <A HREF="uuencode.html#BinaryChars">BinaryChars</A>() const;
    void <A HREF="uuencode.html#SetAsciiChars">SetAsciiChars</A>(const DwString&amp; aStr);
    const DwString&amp; <A HREF="uuencode.html#AsciiChars">AsciiChars</A>() const;
    DwBool <A HREF="uuencode.html#Encode">Encode</A>();
    DwBool <A HREF="uuencode.html#Decode">Decode</A>();
};
</PRE>
<H2>
  <FONT COLOR="navy"> DESCRIPTION </FONT>
</H2>
<P>
<B><TT>DwUuencode</TT></B> performs uuencode or uudecode operations. Uuencode
is a format for encoding binary data into text characters for transmission
through the mail system. The format also includes the file name and the file
mode. (Note: The file mode is significant only in UNIX.) In MIME, the use
of uuencode is deprecated; base64 is the preferred encoding for sending binary
data.
<P>
To use <B><TT>DwUuencode</TT></B> for encoding binary data into uuencode
format, set the file name, file mode, and binary data string using the member
functions <B><TT>SetFileName()</TT></B>, <B><TT>SetFileMode()</TT></B>, and
<B><TT>SetBinaryChars()</TT></B>. Then call the member function
<B><TT>Encode()</TT></B>. Finally, retrieve the uuencoded text characters
by calling <B><TT>AsciiChars()</TT></B>.
<P>
To use <B><TT>DwUuencode</TT></B> to decode uuencoded data, set the ASCII
characters using the member function <B><TT>SetAsciiChars()</TT></B>, then
call <B><TT>Decode()</TT></B>. Finally, retrieve the file name, file mode,
and binary characters by calling <B><TT>FileName()</TT></B>,
<B><TT>FileMode()</TT></B>, and <B><TT>BinaryChars()</TT></B>.
<H2>
  <FONT COLOR="navy"> Public Member Functions </FONT>
</H2>
<P>
<FONT COLOR="teal"><B> void <A NAME="SetFileName">SetFileName</A>(const char*
aName) </B></FONT>
<P>
Sets the file name to be included in the uuencoded output.
<P>
<FONT COLOR="teal"><B> const char* <A NAME="FileName">FileName</A>() const
</B></FONT>
<P>
Returns the file name extracted while uudecoding.
<P>
<FONT COLOR="teal"><B> void <A NAME="SetFileMode">SetFileMode</A>(DwUint16
aMode) </B></FONT>
<P>
Sets the file mode to be included in the uuencoded output. If the file mode
is not explicitly set using this member function, a default value of 0644
(octal) is assumed.
<P>
<FONT COLOR="teal"><B> DwUint16 <A NAME="FileMode">FileMode</A>() const
</B></FONT>
<P>
Returns the file mode extracted while uudecoding.
<P>
<FONT COLOR="teal"><B> void <A NAME="SetBinaryChars">SetBinaryChars</A>(const
DwString&amp; aStr) </B></FONT>
<P>
Sets the string of binary data to be used in the uuencode operation.
<P>
<FONT COLOR="teal"><B> const DwString&amp;
<A NAME="BinaryChars">BinaryChars</A>() const </B></FONT>
<P>
Returns the string of binary data extracted during a uudecode operation.
<P>
<FONT COLOR="teal"><B> void <A NAME="SetAsciiChars">SetAsciiChars</A>(const
DwString&amp; aStr) </B></FONT>
<P>
Sets the string of ASCII characters to used in the decode operation.
<P>
<FONT COLOR="teal"><B> const DwString&amp;
<A NAME="AsciiChars">AsciiChars</A>() const </B></FONT>
<P>
Returns the string of ASCII characters created during a uuencode operation.
<P>
<FONT COLOR="teal"><B> DwBool <A NAME="Encode">Encode</A>() </B></FONT>
<P>
Creates an ASCII string of characters by uuencoding the file name, file mode,
and binary data.
<P>
<FONT COLOR="teal"><B> DwBool <A NAME="Decode">Decode</A>() </B></FONT>
<P>
Extracts the file name, file mode, and binary data from the ASCII characters
via a uudecode operation.
</BODY></HTML>