This file is indexed.

/usr/share/doc/qmf/html/qmailmessagebody.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
104
105
106
107
108
109
110
111
112
113
114
<?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">
<!-- qmailmessage.cpp -->
<head>
  <title>QMailMessageBody 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">QMailMessageBody Class Reference</h1>
<p>The QMailMessageBody class contains the body element of a message or message part. <a href="#details">More...</a></p>
<pre>    #include &lt;QMailMessageBody&gt;</pre><p><b>This class is under development and is subject to change.</b></p>
<p>Inherits <a href="qmailmessagebodyfwd.html">QMailMessageBodyFwd</a>.</p>
<ul>
<li><a href="qmailmessagebody-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">QMailMessageContentType </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagebody.html#contentType">contentType</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagebody.html#data">data</a></b> ( EncodingFormat <i>format</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagebody.html#data-2">data</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagebody.html#isEmpty">isEmpty</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagebody.html#length">length</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagebody.html#toFile">toFile</a></b> ( const QString &amp; <i>filename</i>, EncodingFormat <i>format</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagebody.html#toStream">toStream</a></b> ( QDataStream &amp; <i>out</i>, EncodingFormat <i>format</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagebody.html#toStream-2">toStream</a></b> ( QTextStream &amp; <i>out</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">TransferEncoding </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagebody.html#transferEncoding">transferEncoding</a></b> () const</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">QMailMessageBody </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagebody.html#fromData">fromData</a></b> ( const QByteArray &amp; <i>input</i>, const QMailMessageContentType &amp; <i>type</i>, TransferEncoding <i>encoding</i>, EncodingStatus <i>status</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QMailMessageBody </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagebody.html#fromData-2">fromData</a></b> ( const QString &amp; <i>input</i>, const QMailMessageContentType &amp; <i>type</i>, TransferEncoding <i>encoding</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QMailMessageBody </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagebody.html#fromFile">fromFile</a></b> ( const QString &amp; <i>filename</i>, const QMailMessageContentType &amp; <i>type</i>, TransferEncoding <i>encoding</i>, EncodingStatus <i>status</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QMailMessageBody </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagebody.html#fromStream">fromStream</a></b> ( QDataStream &amp; <i>in</i>, const QMailMessageContentType &amp; <i>type</i>, TransferEncoding <i>encoding</i>, EncodingStatus <i>status</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QMailMessageBody </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagebody.html#fromStream-2">fromStream</a></b> ( QTextStream &amp; <i>in</i>, const QMailMessageContentType &amp; <i>type</i>, TransferEncoding <i>encoding</i> )</td></tr>
</table>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QMailMessageBody class contains the body element of a message or message part.</p>
<p>The body of a message or message part is treated as an atomic unit by the Qt Extended messaging library. It can only be inserted into a message part container or extracted from one. It can be inserted or extracted using either a <a href="http://doc.trolltech.com/4.5/qbytearray.html">QByteArray</a>, a <a href="http://doc.trolltech.com/4.5/qdatastream.html">QDataStream</a> or to/from a file. In the case of unicode text data, the insertion and extraction can operate on either a <a href="http://doc.trolltech.com/4.5/qstring.html">QString</a>, a <a href="http://doc.trolltech.com/4.5/qtextstream.html">QTextStream</a> or to/from a file.</p>
<p>The body data must be associated with a <a href="qmailmessagecontenttype.html">QMailMessageContentType</a> describing that data. When extracting body data from a message or part to unicode text, the content type description must include a parameter named 'charset'; this parameter is used to locate a <a href="http://doc.trolltech.com/4.5/qtextcodec.html">QTextCodec</a> to be used to extract unicode data from the body data octet stream.</p>
<p>If the Content-Type of the data is a subtype of &quot;text&quot;, then line-ending translation will be used to ensure that the text is transmitted with CR/LF line endings. The text data supplied to QMailMessageBody must conform to the RFC 2822 restrictions on maximum line lengths: &quot;Each line of characters MUST be no more than 998 characters, and SHOULD be no more than 78 characters, excluding the CRLF.&quot; Textual message body data decoded from a QMailMessageBody object will have transmitted CR/LF line endings converted to <tt>\n</tt> on extraction.</p>
<p>The body data can also be encoded from 8-bit octets to 7-bit ASCII characters for safe transmission through obsolete email systems. When creating an instance of the QMailMessageBody class, the encoding to be used must be specified using the <a href="qmailmessagebodyfwd.html#TransferEncoding-enum">QMailMessageBody::TransferEncoding</a> enum.</p>
<p>See also <a href="qmailmessagepart.html">QMailMessagePart</a>, <a href="qmailmessage.html">QMailMessage</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="contentType"></a><a href="qmailmessagecontenttype.html">QMailMessageContentType</a> QMailMessageBody::contentType () const</h3>
<p>Returns the content type that the body was created with.</p>
<h3 class="fn"><a name="data"></a><a href="http://doc.trolltech.com/4.5/qbytearray.html">QByteArray</a> QMailMessageBody::data ( <a href="qmailmessagebodyfwd.html#EncodingFormat-enum">EncodingFormat</a> <i>format</i> ) const</h3>
<p>Returns the data of the message body as a <a href="http://doc.trolltech.com/4.5/qbytearray.html">QByteArray</a>. If <i>format</i> is <a href="qmailmessagebodyfwd.html#EncodingFormat-enum">QMailMessageBody::Encoded</a>, then the data is written in the transfer encoding it was created with; otherwise, it is written in unencoded form.</p>
<p>See also <a href="qmailcodec.html">QMailCodec</a>.</p>
<h3 class="fn"><a name="data-2"></a><a href="http://doc.trolltech.com/4.5/qstring.html">QString</a> QMailMessageBody::data () const</h3>
<p>Returns the data of the message body as a <a href="http://doc.trolltech.com/4.5/qstring.html">QString</a>, in unencoded form. Line-endings transmitted as CR/LF pairs are converted to <tt>\n</tt> on extraction.</p>
<p>The 'charset' parameter of the body's content type is used to locate the appropriate <a href="http://doc.trolltech.com/4.5/qtextcodec.html">QTextCodec</a> to convert the data from an octet stream to unicode, if necessary.</p>
<p>See also <a href="qmailcodec.html">QMailCodec</a>, <a href="qmailmessagecontenttype.html">QMailMessageContentType</a>, and <a href="http://doc.trolltech.com/4.5/qtextcodec.html">QTextCodec</a>.</p>
<h3 class="fn"><a name="fromData"></a>QMailMessageBody QMailMessageBody::fromData ( const <a href="http://doc.trolltech.com/4.5/qbytearray.html">QByteArray</a> &amp; <i>input</i>, const <a href="qmailmessagecontenttype.html">QMailMessageContentType</a> &amp; <i>type</i>, <a href="qmailmessagebodyfwd.html#TransferEncoding-enum">TransferEncoding</a> <i>encoding</i>, <a href="qmailmessagebodyfwd.html#EncodingStatus-enum">EncodingStatus</a> <i>status</i> )&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Creates a message body from the data contained in <i>input</i>, having the content type <i>type</i>. If <i>status</i> is <a href="qmailmessagebodyfwd.html#EncodingStatus-enum">QMailMessageBody::RequiresEncoding</a>, the data from the file will be encoded to <i>encoding</i> for transmission; otherwise it must already be in that encoding, which will be reported to recipients of the data.</p>
<p>If <i>type</i> is a subtype of &quot;text&quot;, the data will be treated as text, and line-ending translation will be employed. Otherwise, the file will be treated as containing binary data.</p>
<p>If <i>encoding</i> is <a href="qmailmessagebodyfwd.html#TransferEncoding-enum">QMailMessageBody::QuotedPrintable</a>, encoding will be performed assuming conformance to RFC 2045.</p>
<p>See also <a href="qmailcodec.html">QMailCodec</a> and <a href="qmailquotedprintablecodec.html">QMailQuotedPrintableCodec</a>.</p>
<h3 class="fn"><a name="fromData-2"></a>QMailMessageBody QMailMessageBody::fromData ( const <a href="http://doc.trolltech.com/4.5/qstring.html">QString</a> &amp; <i>input</i>, const <a href="qmailmessagecontenttype.html">QMailMessageContentType</a> &amp; <i>type</i>, <a href="qmailmessagebodyfwd.html#TransferEncoding-enum">TransferEncoding</a> <i>encoding</i> )&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Creates a message body from the data contained in <i>input</i>, having the content type <i>type</i>. The data from <i>input</i> will be encoded to <i>encoding</i> for transmission, and line-ending translation will be employed. The unicode text data will be converted to an octet stream using a <a href="http://doc.trolltech.com/4.5/qtextcodec.html">QTextCodec</a> object identified by the 'charset' parameter of <i>type</i>.</p>
<p>If <i>encoding</i> is <a href="qmailmessagebodyfwd.html#TransferEncoding-enum">QMailMessageBody::QuotedPrintable</a>, encoding will be performed assuming conformance to RFC 2045.</p>
<p>See also <a href="qmailcodec.html">QMailCodec</a>, <a href="qmailmessagecontenttype.html">QMailMessageContentType</a>, and <a href="http://doc.trolltech.com/4.5/qtextcodec.html">QTextCodec</a>.</p>
<h3 class="fn"><a name="fromFile"></a>QMailMessageBody QMailMessageBody::fromFile ( const <a href="http://doc.trolltech.com/4.5/qstring.html">QString</a> &amp; <i>filename</i>, const <a href="qmailmessagecontenttype.html">QMailMessageContentType</a> &amp; <i>type</i>, <a href="qmailmessagebodyfwd.html#TransferEncoding-enum">TransferEncoding</a> <i>encoding</i>, <a href="qmailmessagebodyfwd.html#EncodingStatus-enum">EncodingStatus</a> <i>status</i> )&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Creates a message body from the data contained in the file <i>filename</i>, having the content type <i>type</i>. If <i>status</i> is <a href="qmailmessagebodyfwd.html#EncodingStatus-enum">QMailMessageBody::RequiresEncoding</a>, the data from the file will be encoded to <i>encoding</i> for transmission; otherwise it must already be in that encoding, which will be reported to recipients of the data.</p>
<p>If <i>type</i> is a subtype of &quot;text&quot;, the data will be treated as text, and line-ending translation will be employed. Otherwise, the file will be treated as containing binary data. If the file contains unicode text data, it will be converted to an octet stream using a <a href="http://doc.trolltech.com/4.5/qtextcodec.html">QTextCodec</a> object identified by the 'charset' parameter of <i>type</i>.</p>
<p>If <i>encoding</i> is <a href="qmailmessagebodyfwd.html#TransferEncoding-enum">QMailMessageBody::QuotedPrintable</a>, encoding will be performed assuming conformance to RFC 2045.</p>
<p>Note that the data is not actually read from the file until it is requested by another function.</p>
<p>See also <a href="qmailcodec.html">QMailCodec</a>, <a href="qmailquotedprintablecodec.html">QMailQuotedPrintableCodec</a>, <a href="qmailmessagecontenttype.html">QMailMessageContentType</a>, and <a href="http://doc.trolltech.com/4.5/qtextcodec.html">QTextCodec</a>.</p>
<h3 class="fn"><a name="fromStream"></a>QMailMessageBody QMailMessageBody::fromStream ( <a href="http://doc.trolltech.com/4.5/qdatastream.html">QDataStream</a> &amp; <i>in</i>, const <a href="qmailmessagecontenttype.html">QMailMessageContentType</a> &amp; <i>type</i>, <a href="qmailmessagebodyfwd.html#TransferEncoding-enum">TransferEncoding</a> <i>encoding</i>, <a href="qmailmessagebodyfwd.html#EncodingStatus-enum">EncodingStatus</a> <i>status</i> )&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Creates a message body from the data read from <i>in</i>, having the content type <i>type</i>. If <i>status</i> is <a href="qmailmessagebodyfwd.html#EncodingStatus-enum">QMailMessageBody::RequiresEncoding</a>, the data from the file will be encoded to <i>encoding</i> for transmission; otherwise it must already be in that encoding, which will be reported to recipients of the data.</p>
<p>If <i>type</i> is a subtype of &quot;text&quot;, the data will be treated as text, and line-ending translation will be employed. Otherwise, the file will be treated as containing binary data.</p>
<p>If <i>encoding</i> is <a href="qmailmessagebodyfwd.html#TransferEncoding-enum">QMailMessageBody::QuotedPrintable</a>, encoding will be performed assuming conformance to RFC 2045.</p>
<p>See also <a href="qmailcodec.html">QMailCodec</a> and <a href="qmailquotedprintablecodec.html">QMailQuotedPrintableCodec</a>.</p>
<h3 class="fn"><a name="fromStream-2"></a>QMailMessageBody QMailMessageBody::fromStream ( <a href="http://doc.trolltech.com/4.5/qtextstream.html">QTextStream</a> &amp; <i>in</i>, const <a href="qmailmessagecontenttype.html">QMailMessageContentType</a> &amp; <i>type</i>, <a href="qmailmessagebodyfwd.html#TransferEncoding-enum">TransferEncoding</a> <i>encoding</i> )&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Creates a message body from the data read from <i>in</i>, having the content type <i>type</i>. The data read from <i>in</i> will be encoded to <i>encoding</i> for transmission, and line-ending translation will be employed. The unicode text data will be converted to an octet stream using a <a href="http://doc.trolltech.com/4.5/qtextcodec.html">QTextCodec</a> object identified by the 'charset' parameter of <i>type</i>.</p>
<p>If <i>encoding</i> is <a href="qmailmessagebodyfwd.html#TransferEncoding-enum">QMailMessageBody::QuotedPrintable</a>, encoding will be performed assuming conformance to RFC 2045.</p>
<p>See also <a href="qmailcodec.html">QMailCodec</a>, <a href="qmailquotedprintablecodec.html">QMailQuotedPrintableCodec</a>, <a href="qmailmessagecontenttype.html">QMailMessageContentType</a>, and <a href="http://doc.trolltech.com/4.5/qtextcodec.html">QTextCodec</a>.</p>
<h3 class="fn"><a name="isEmpty"></a>bool QMailMessageBody::isEmpty () const</h3>
<p>Returns true if the body does not contain any data.</p>
<h3 class="fn"><a name="length"></a>int QMailMessageBody::length () const</h3>
<p>Returns the length of the body data in bytes.</p>
<h3 class="fn"><a name="toFile"></a>bool QMailMessageBody::toFile ( const <a href="http://doc.trolltech.com/4.5/qstring.html">QString</a> &amp; <i>filename</i>, <a href="qmailmessagebodyfwd.html#EncodingFormat-enum">EncodingFormat</a> <i>format</i> ) const</h3>
<p>Writes the data of the message body to the file named <i>filename</i>. If <i>format</i> is <a href="qmailmessagebodyfwd.html#EncodingFormat-enum">QMailMessageBody::Encoded</a>, then the data is written in the transfer encoding it was created with; otherwise, it is written in unencoded form.</p>
<p>If the body has a content type with a <a href="qmailmessagecontenttype.html#type">QMailMessageContentType::type</a>() of &quot;text&quot;, and the content type parameter 'charset' is not empty, then the unencoded data will be written as unicode text data, using the charset parameter to locate the appropriate <a href="http://doc.trolltech.com/4.5/qtextcodec.html">QTextCodec</a>.</p>
<p>Returns false if the operation causes an error; otherwise returns true.</p>
<p>See also <a href="qmailcodec.html">QMailCodec</a>, <a href="qmailmessagecontenttype.html">QMailMessageContentType</a>, and <a href="http://doc.trolltech.com/4.5/qtextcodec.html">QTextCodec</a>.</p>
<h3 class="fn"><a name="toStream"></a>bool QMailMessageBody::toStream ( <a href="http://doc.trolltech.com/4.5/qdatastream.html">QDataStream</a> &amp; <i>out</i>, <a href="qmailmessagebodyfwd.html#EncodingFormat-enum">EncodingFormat</a> <i>format</i> ) const</h3>
<p>Writes the data of the message body to the stream <i>out</i>. If <i>format</i> is <a href="qmailmessagebodyfwd.html#EncodingFormat-enum">QMailMessageBody::Encoded</a>, then the data is written in the transfer encoding it was created with; otherwise, it is written in unencoded form.</p>
<p>Returns false if the operation causes an error; otherwise returns true.</p>
<p>See also <a href="qmailcodec.html">QMailCodec</a>.</p>
<h3 class="fn"><a name="toStream-2"></a>bool QMailMessageBody::toStream ( <a href="http://doc.trolltech.com/4.5/qtextstream.html">QTextStream</a> &amp; <i>out</i> ) const</h3>
<p>Writes the data of the message body to the stream <i>out</i>, in unencoded form. Line-endings transmitted as CR/LF pairs are converted to <tt>\n</tt> on extraction. Returns false if the operation causes an error; otherwise returns true.</p>
<p>The 'charset' parameter of the body's content type is used to locate the appropriate <a href="http://doc.trolltech.com/4.5/qtextcodec.html">QTextCodec</a> to convert the data from an octet stream to unicode, if necessary.</p>
<p>See also <a href="qmailcodec.html">QMailCodec</a>, <a href="qmailmessagecontenttype.html">QMailMessageContentType</a>, and <a href="http://doc.trolltech.com/4.5/qtextcodec.html">QTextCodec</a>.</p>
<h3 class="fn"><a name="transferEncoding"></a><a href="qmailmessagebodyfwd.html#TransferEncoding-enum">TransferEncoding</a> QMailMessageBody::transferEncoding () const</h3>
<p>Returns the transfer encoding type that the body was created with.</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>