This file is indexed.

/usr/share/doc/qmf/html/qmailcodec.html is in qmf-doc-html 1.0.7~2011w23.2-2.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- qmailcodec.cpp -->
<head>
  <title>QMailCodec Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><img src="images/qtlogo.png" align="left" border="0" /></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a></td>
<td align="right" valign="top" width="230"><img src="images/codeless.png"  border="0" /></td></tr></table><h1 class="title">QMailCodec Class Reference</h1>
<p>The QMailCodec class provides mechanisms for encoding and decoding between 7-bit ASCII strings and arbitrary octet sequences. <a href="#details">More...</a></p>
<pre>    #include &lt;QMailCodec&gt;</pre><p><b>This class is under development and is subject to change.</b></p>
<p>Inherited by <a href="qmailbase64codec.html">QMailBase64Codec</a>, <a href="qmaillineendingcodec.html">QMailLineEndingCodec</a>, <a href="qmailpassthroughcodec.html">QMailPassThroughCodec</a>, and <a href="qmailquotedprintablecodec.html">QMailQuotedPrintableCodec</a>.</p>
<ul>
<li><a href="qmailcodec-members.html">List of all members, including inherited members</a></li>
</ul>
<hr />
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><b><a href="qmailcodec.html#dtor.QMailCodec">~QMailCodec</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qmailcodec.html#decode">decode</a></b> ( QTextStream &amp; <i>out</i>, QDataStream &amp; <i>in</i>, const QString &amp; <i>charset</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qmailcodec.html#decode-2">decode</a></b> ( QDataStream &amp; <i>out</i>, QDataStream &amp; <i>in</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qmailcodec.html#decode-3">decode</a></b> ( const QByteArray &amp; <i>input</i>, const QString &amp; <i>charset</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qmailcodec.html#decode-4">decode</a></b> ( const QByteArray &amp; <i>input</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qmailcodec.html#encode">encode</a></b> ( QDataStream &amp; <i>out</i>, QTextStream &amp; <i>in</i>, const QString &amp; <i>charset</i> = &quot;UTF-8&quot; )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qmailcodec.html#encode-2">encode</a></b> ( QDataStream &amp; <i>out</i>, QDataStream &amp; <i>in</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qmailcodec.html#encode-3">encode</a></b> ( const QString &amp; <i>input</i>, const QString &amp; <i>charset</i> = &quot;UTF-8&quot; )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qmailcodec.html#encode-4">encode</a></b> ( const QByteArray &amp; <i>input</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QString </td><td class="memItemRight" valign="bottom"><b><a href="qmailcodec.html#name">name</a></b> () const = 0</td></tr>
</table>
<hr />
<a name="static-public-members"></a>
<h2>Static Public Members</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QTextCodec * </td><td class="memItemRight" valign="bottom"><b><a href="qmailcodec.html#codecForName">codecForName</a></b> ( const QByteArray &amp; <i>charset</i>, bool <i>translateAscii</i> = true )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qmailcodec.html#copy">copy</a></b> ( QDataStream &amp; <i>out</i>, QDataStream &amp; <i>in</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qmailcodec.html#copy-2">copy</a></b> ( QTextStream &amp; <i>out</i>, QTextStream &amp; <i>in</i> )</td></tr>
</table>
<hr />
<a name="protected-functions"></a>
<h2>Protected Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qmailcodec.html#decodeChunk">decodeChunk</a></b> ( QDataStream &amp; <i>out</i>, const char * <i>input</i>, int <i>length</i>, bool <i>finalChunk</i> ) = 0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qmailcodec.html#encodeChunk">encodeChunk</a></b> ( QDataStream &amp; <i>out</i>, const unsigned char * <i>input</i>, int <i>length</i>, bool <i>finalChunk</i> ) = 0</td></tr>
</table>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QMailCodec class provides mechanisms for encoding and decoding between 7-bit ASCII strings and arbitrary octet sequences.</p>
<p>Messages transferred via the SMTP protocol must be encoded in 7-bit ASCII characters, even though their contents are typically composed in sequences of 8-bit octets. The QMailCodec class provides an interface through which data can be easily converted between an 8-bit octet sequence and a 7-bit ASCII character sequence.</p>
<p>QMailCodec is an abstract class; in order to perform a coding operation, a derived class must be used that provides a policy for mapping 8-bit data to and from 7-bit ASCII characters. This policy is implemented by overriding the <a href="qmailcodec.html#encodeChunk">encodeChunk</a>() and <a href="qmailcodec.html#decodeChunk">decodeChunk</a>() virtual functions.</p>
<p>Using the QMailCodec interface, data can be encoded or decoded from an input <a href="http://doc.trolltech.com/4.5/qdatastream.html">QDataStream</a> to an output <a href="http://doc.trolltech.com/4.5/qdatastream.html">QDataStream</a>, or for convenience, from an input <a href="http://doc.trolltech.com/4.5/qbytearray.html">QByteArray</a> to an output <a href="http://doc.trolltech.com/4.5/qbytearray.html">QByteArray</a>.</p>
<p>If the data to be encoded is in unicode form, then the QMailCodec interface can be used to convert the data to ASCII via an intermediate <a href="http://doc.trolltech.com/4.5/qtextcodec.html">QTextCodec</a>, which converts the incoming text to a sequence of octets. The <a href="http://doc.trolltech.com/4.5/qtextcodec.html">QTextCodec</a> used is specified by the name of the encoding produced, or that decoded when decoding an ASCII input sequence. QMailCodec provides functions to encode from a <a href="http://doc.trolltech.com/4.5/qtextstream.html">QTextStream</a> to a <a href="http://doc.trolltech.com/4.5/qdatastream.html">QDataStream</a>, and to decode from a <a href="http://doc.trolltech.com/4.5/qdatastream.html">QDataStream</a> to a <a href="http://doc.trolltech.com/4.5/qtextstream.html">QTextStream</a>. For convenience, it is also possible to encode a <a href="http://doc.trolltech.com/4.5/qstring.html">QString</a> to a <a href="http://doc.trolltech.com/4.5/qbytearray.html">QByteArray</a>, and to decode a <a href="http://doc.trolltech.com/4.5/qbytearray.html">QByteArray</a> to a <a href="http://doc.trolltech.com/4.5/qstring.html">QString</a>.</p>
<p>See also <a href="http://doc.trolltech.com/4.5/qdatastream.html">QDataStream</a>, <a href="http://doc.trolltech.com/4.5/qtextstream.html">QTextStream</a>, and <a href="http://doc.trolltech.com/4.5/qtextcodec.html">QTextCodec</a>.</p>
<hr />
<h2>Member Function Documentation</h2>
<h3 class="fn"><a name="dtor.QMailCodec"></a>QMailCodec::~QMailCodec ()&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Destroys a <a href="qmailcodec.html">QMailCodec</a> instance.</p>
<h3 class="fn"><a name="codecForName"></a><a href="http://doc.trolltech.com/4.5/qtextcodec.html">QTextCodec</a> * QMailCodec::codecForName ( const <a href="http://doc.trolltech.com/4.5/qbytearray.html">QByteArray</a> &amp; <i>charset</i>, bool <i>translateAscii</i> = true )&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Returns a pointer to an appropriate <a href="http://doc.trolltech.com/4.5/qtextcodec.html">QTextCodec</a> based on <i>charset</i>. If charset is ascii and <i>translateAscii</i> is true, it will use the Latin-1 codec.</p>
<p>Returns 0 if could not locate a codec.</p>
<h3 class="fn"><a name="copy"></a>void QMailCodec::copy ( <a href="http://doc.trolltech.com/4.5/qdatastream.html">QDataStream</a> &amp; <i>out</i>, <a href="http://doc.trolltech.com/4.5/qdatastream.html">QDataStream</a> &amp; <i>in</i> )&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Writes the data read from the stream <i>in</i> to the stream <i>out</i>, without conversion.</p>
<h3 class="fn"><a name="copy-2"></a>void QMailCodec::copy ( <a href="http://doc.trolltech.com/4.5/qtextstream.html">QTextStream</a> &amp; <i>out</i>, <a href="http://doc.trolltech.com/4.5/qtextstream.html">QTextStream</a> &amp; <i>in</i> )&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Writes the data read from the stream <i>in</i> to the stream <i>out</i>, without conversion.</p>
<h3 class="fn"><a name="decode"></a>void QMailCodec::decode ( <a href="http://doc.trolltech.com/4.5/qtextstream.html">QTextStream</a> &amp; <i>out</i>, <a href="http://doc.trolltech.com/4.5/qdatastream.html">QDataStream</a> &amp; <i>in</i>, const <a href="http://doc.trolltech.com/4.5/qstring.html">QString</a> &amp; <i>charset</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Writes the data read from the stream <i>in</i> to the stream <i>out</i>, converting from a sequence of 7-bit ASCII characters. The characters read from <i>in</i> are decoded from the text encoding <i>charset</i> to unicode.</p>
<p>See also <a href="http://doc.trolltech.com/4.5/qtextcodec.html#codecForName">QTextCodec::codecForName</a>().</p>
<h3 class="fn"><a name="decode-2"></a>void QMailCodec::decode ( <a href="http://doc.trolltech.com/4.5/qdatastream.html">QDataStream</a> &amp; <i>out</i>, <a href="http://doc.trolltech.com/4.5/qdatastream.html">QDataStream</a> &amp; <i>in</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Writes the data read from the stream <i>in</i> to the stream <i>out</i>, converting from a sequence of 7-bit ASCII characters.</p>
<h3 class="fn"><a name="decode-3"></a><a href="http://doc.trolltech.com/4.5/qstring.html">QString</a> QMailCodec::decode ( const <a href="http://doc.trolltech.com/4.5/qbytearray.html">QByteArray</a> &amp; <i>input</i>, const <a href="http://doc.trolltech.com/4.5/qstring.html">QString</a> &amp; <i>charset</i> )</h3>
<p>Returns a <a href="http://doc.trolltech.com/4.5/qstring.html">QString</a> containing characters decoded from the text encoding <i>charset</i>, which are decoded from the sequence of 7-bit ASCII characters read from <i>input</i>.</p>
<p>See also <a href="http://doc.trolltech.com/4.5/qtextcodec.html#codecForName">QTextCodec::codecForName</a>().</p>
<h3 class="fn"><a name="decode-4"></a><a href="http://doc.trolltech.com/4.5/qbytearray.html">QByteArray</a> QMailCodec::decode ( const <a href="http://doc.trolltech.com/4.5/qbytearray.html">QByteArray</a> &amp; <i>input</i> )</h3>
<p>Returns a <a href="http://doc.trolltech.com/4.5/qbytearray.html">QByteArray</a> containing the octets decoded from the sequence of 7-bit ASCII characters in <i>input</i>.</p>
<h3 class="fn"><a name="decodeChunk"></a>void QMailCodec::decodeChunk ( <a href="http://doc.trolltech.com/4.5/qdatastream.html">QDataStream</a> &amp; <i>out</i>, const char * <i>input</i>, int <i>length</i>, bool <i>finalChunk</i> )&nbsp;&nbsp;<tt> [pure virtual protected]</tt></h3>
<p>Overridden by derived classes to perform a decoding operation. The implementation function must decode <i>length</i> ASCII characters at the location <i>input</i>, writing the resulting octets to the stream <i>out</i>. If <i>finalChunk</i> is false, further calls will be made to decodeChunk() with continued input data. Otherwise, the decoding operation is complete.</p>
<h3 class="fn"><a name="encode"></a>void QMailCodec::encode ( <a href="http://doc.trolltech.com/4.5/qdatastream.html">QDataStream</a> &amp; <i>out</i>, <a href="http://doc.trolltech.com/4.5/qtextstream.html">QTextStream</a> &amp; <i>in</i>, const <a href="http://doc.trolltech.com/4.5/qstring.html">QString</a> &amp; <i>charset</i> = &quot;UTF-8&quot; )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Writes the data read from the stream <i>in</i> to the stream <i>out</i>, as a sequence of 7-bit ASCII characters. The unicode characters read from <i>in</i> are first encoded to the text encoding <i>charset</i>.</p>
<p>See also <a href="http://doc.trolltech.com/4.5/qtextcodec.html#codecForName">QTextCodec::codecForName</a>().</p>
<h3 class="fn"><a name="encode-2"></a>void QMailCodec::encode ( <a href="http://doc.trolltech.com/4.5/qdatastream.html">QDataStream</a> &amp; <i>out</i>, <a href="http://doc.trolltech.com/4.5/qdatastream.html">QDataStream</a> &amp; <i>in</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Writes the data read from the stream <i>in</i> to the stream <i>out</i>, as a sequence of 7-bit ASCII characters.</p>
<h3 class="fn"><a name="encode-3"></a><a href="http://doc.trolltech.com/4.5/qbytearray.html">QByteArray</a> QMailCodec::encode ( const <a href="http://doc.trolltech.com/4.5/qstring.html">QString</a> &amp; <i>input</i>, const <a href="http://doc.trolltech.com/4.5/qstring.html">QString</a> &amp; <i>charset</i> = &quot;UTF-8&quot; )</h3>
<p>Returns a <a href="http://doc.trolltech.com/4.5/qbytearray.html">QByteArray</a> containing the string <i>input</i>, encoded to the text encoding <i>charset</i> and then to a sequence of 7-bit ASCII characters.</p>
<p>See also <a href="http://doc.trolltech.com/4.5/qtextcodec.html#codecForName">QTextCodec::codecForName</a>().</p>
<h3 class="fn"><a name="encode-4"></a><a href="http://doc.trolltech.com/4.5/qbytearray.html">QByteArray</a> QMailCodec::encode ( const <a href="http://doc.trolltech.com/4.5/qbytearray.html">QByteArray</a> &amp; <i>input</i> )</h3>
<p>Returns a <a href="http://doc.trolltech.com/4.5/qbytearray.html">QByteArray</a> containing the octets from <i>input</i>, encoded to a sequence of 7-bit ASCII characters.</p>
<h3 class="fn"><a name="encodeChunk"></a>void QMailCodec::encodeChunk ( <a href="http://doc.trolltech.com/4.5/qdatastream.html">QDataStream</a> &amp; <i>out</i>, const unsigned char * <i>input</i>, int <i>length</i>, bool <i>finalChunk</i> )&nbsp;&nbsp;<tt> [pure virtual protected]</tt></h3>
<p>Overridden by derived classes to perform an encoding operation. The implementation function must encode <i>length</i> 8-bit octets at the location <i>input</i>, writing the resulting ASCII characters to the stream <i>out</i>. If <i>finalChunk</i> is false, further calls will be made to encodeChunk() with continued input data. Otherwise, the encoding operation is complete.</p>
<h3 class="fn"><a name="name"></a><a href="http://doc.trolltech.com/4.5/qstring.html">QString</a> QMailCodec::name () const&nbsp;&nbsp;<tt> [pure virtual]</tt></h3>
<p>Returns a string that identifies the subclass of <a href="qmailcodec.html">QMailCodec</a> that this instance belongs to.</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td align="left">Copyright &copy; 2010 QtSoftware</td>
<td align="right"><div align="right">Messaging Framework</div></td>
</tr></table></div></address></body>
</html>