summaryrefslogtreecommitdiffstats
path: root/doc/html/qmailmessagepart.html
blob: e01dad1927a190ca14cf1c8203fabbd500530bfa (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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
<?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>QMailMessagePart 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">QMailMessagePart Class Reference</h1>
<p>The QMailMessagePart class provides a convenient interface for working with message attachments. <a href="#details">More...</a></p>
<pre>    #include &lt;QMailMessagePart&gt;</pre><p><b>This class is under development and is subject to change.</b></p>
<p>Inherits <a href="qmailmessagepartcontainer.html">QMailMessagePartContainer</a> and <a href="qmailmessagepartfwd.html">QMailMessagePartFwd</a>.</p>
<ul>
<li><a href="qmailmessagepart-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"></td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagepart.html#QMailMessagePart">QMailMessagePart</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagepart.html#contentDescription">contentDescription</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QMailMessageContentDisposition </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagepart.html#contentDisposition">contentDisposition</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagepart.html#contentID">contentID</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagepart.html#contentLanguage">contentLanguage</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagepart.html#contentLocation">contentLocation</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagepart.html#displayName">displayName</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagepart.html#identifier">identifier</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual uint </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagepart.html#indicativeSize">indicativeSize</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Location </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagepart.html#locationx">location</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QMailMessageId </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagepart.html#messageReference">messageReference</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagepart.html#partNumber">partNumber</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QMailMessagePart::Location </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagepart.html#partReference">partReference</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagepart.html#referenceResolution">referenceResolution</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ReferenceType </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagepart.html#referenceType">referenceType</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagepart.html#setContentDescription">setContentDescription</a></b> ( const QString &amp; <i>description</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagepart.html#setContentDisposition">setContentDisposition</a></b> ( const QMailMessageContentDisposition &amp; <i>disposition</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagepart.html#setContentID">setContentID</a></b> ( const QString &amp; <i>id</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagepart.html#setContentLanguage">setContentLanguage</a></b> ( const QString &amp; <i>language</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagepart.html#setContentLocation">setContentLocation</a></b> ( const QString &amp; <i>location</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagepart.html#setReference">setReference</a></b> ( const QMailMessageId &amp; <i>id</i>, const QMailMessageContentType &amp; <i>type</i>, QMailMessageBody::TransferEncoding <i>encoding</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagepart.html#setReference-2">setReference</a></b> ( const QMailMessagePart::Location &amp; <i>location</i>, const QMailMessageContentType &amp; <i>type</i>, QMailMessageBody::TransferEncoding <i>encoding</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagepart.html#setReferenceResolution">setReferenceResolution</a></b> ( const QString &amp; <i>uri</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagepart.html#writeBodyTo">writeBodyTo</a></b> ( const QString &amp; <i>path</i> ) const</td></tr>
</table>
<hr />
<a name="reimplemented-public-functions"></a>
<h2>Reimplemented Public Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagepart.html#contentAvailable">contentAvailable</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagepart.html#partialContentAvailable">partialContentAvailable</a></b> () const</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>44 public functions inherited from <a href="qmailmessagepartcontainer.html#public-functions">QMailMessagePartContainer</a></li>
</ul>
<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">QMailMessagePart </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagepart.html#fromData">fromData</a></b> ( const QByteArray &amp; <i>input</i>, const QMailMessageContentDisposition &amp; <i>disposition</i>, const QMailMessageContentType &amp; <i>type</i>, QMailMessageBody::TransferEncoding <i>encoding</i>, QMailMessageBody::EncodingStatus <i>status</i> = QMailMessageBody::RequiresEncoding )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QMailMessagePart </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagepart.html#fromData-2">fromData</a></b> ( const QString &amp; <i>input</i>, const QMailMessageContentDisposition &amp; <i>disposition</i>, const QMailMessageContentType &amp; <i>type</i>, QMailMessageBody::TransferEncoding <i>encoding</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QMailMessagePart </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagepart.html#fromFile">fromFile</a></b> ( const QString &amp; <i>filename</i>, const QMailMessageContentDisposition &amp; <i>disposition</i>, const QMailMessageContentType &amp; <i>type</i>, QMailMessageBody::TransferEncoding <i>encoding</i>, QMailMessageBody::EncodingStatus <i>status</i> = QMailMessageBody::RequiresEncoding )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QMailMessagePart </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagepart.html#fromMessageReference">fromMessageReference</a></b> ( const QMailMessageId &amp; <i>messageId</i>, const QMailMessageContentDisposition &amp; <i>disposition</i>, const QMailMessageContentType &amp; <i>type</i>, QMailMessageBody::TransferEncoding <i>encoding</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QMailMessagePart </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagepart.html#fromPartReference">fromPartReference</a></b> ( const QMailMessagePart::Location &amp; <i>partLocation</i>, const QMailMessageContentDisposition &amp; <i>disposition</i>, const QMailMessageContentType &amp; <i>type</i>, QMailMessageBody::TransferEncoding <i>encoding</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QMailMessagePart </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagepart.html#fromStream">fromStream</a></b> ( QDataStream &amp; <i>in</i>, const QMailMessageContentDisposition &amp; <i>disposition</i>, const QMailMessageContentType &amp; <i>type</i>, QMailMessageBody::TransferEncoding <i>encoding</i>, QMailMessageBody::EncodingStatus <i>status</i> = QMailMessageBody::RequiresEncoding )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QMailMessagePart </td><td class="memItemRight" valign="bottom"><b><a href="qmailmessagepart.html#fromStream-2">fromStream</a></b> ( QTextStream &amp; <i>in</i>, const QMailMessageContentDisposition &amp; <i>disposition</i>, const QMailMessageContentType &amp; <i>type</i>, QMailMessageBody::TransferEncoding <i>encoding</i> )</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>2 static public members inherited from <a href="qmailmessagepartcontainer.html#static-public-members">QMailMessagePartContainer</a></li>
</ul>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QMailMessagePart class provides a convenient interface for working with message attachments.</p>
<p>A message part inherits the properties of <a href="qmailmessagepartcontainer.html">QMailMessagePartContainer</a>, and can therefore contain a message body or a collection of sub-parts.</p>
<p>A message part differs from a message proper in that a part will often have properties specified by the MIME multipart specification, not relevant to messages. These include the 'name' and 'filename' parameters of the Content-Type and Content-Disposition fields, and the Content-Id and Content-Location fields.</p>
<p>A message part may consist entirely of a reference to an external message, or a part within an external message. Parts that consists of references may be used with some protocols that permit data to be transmitted by reference, such as IMAP with the URLAUTH extension. Not all messaging protocols support the use of content references. The <a href="qmailmessagepart.html#partReference">partReference</a>() and <a href="qmailmessagepart.html#messageReference">messageReference</a>() functions enable the creation of reference parts.</p>
<p>See also <a href="qmailmessagepartcontainer.html">QMailMessagePartContainer</a>.</p>
<hr />
<h2>Member Function Documentation</h2>
<h3 class="fn"><a name="QMailMessagePart"></a>QMailMessagePart::QMailMessagePart ()</h3>
<p>Constructs an empty message part object.</p>
<h3 class="fn"><a name="contentAvailable"></a>bool QMailMessagePart::contentAvailable () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qmailmessagepartcontainer.html#contentAvailable">QMailMessagePartContainer::contentAvailable</a>().</p>
<p>Returns true if the entire content of this part is available; otherwise returns false.</p>
<h3 class="fn"><a name="contentDescription"></a><a href="http://doc.trolltech.com/4.5/qstring.html">QString</a> QMailMessagePart::contentDescription () const</h3>
<p>Returns the Content-Description header field for the part, if present; otherwise returns an empty string.</p>
<p>See also <a href="qmailmessagepart.html#setContentDescription">setContentDescription</a>().</p>
<h3 class="fn"><a name="contentDisposition"></a><a href="qmailmessagecontentdisposition.html">QMailMessageContentDisposition</a> QMailMessagePart::contentDisposition () const</h3>
<p>Returns the Content-Disposition header field for the part.</p>
<p>See also <a href="qmailmessagepart.html#setContentDisposition">setContentDisposition</a>().</p>
<h3 class="fn"><a name="contentID"></a><a href="http://doc.trolltech.com/4.5/qstring.html">QString</a> QMailMessagePart::contentID () const</h3>
<p>Returns the Content-Id header field for the part, if present; otherwise returns an empty string.</p>
<p>If the header field content is surrounded by angle brackets, these are removed.</p>
<p>See also <a href="qmailmessagepart.html#setContentID">setContentID</a>().</p>
<h3 class="fn"><a name="contentLanguage"></a><a href="http://doc.trolltech.com/4.5/qstring.html">QString</a> QMailMessagePart::contentLanguage () const</h3>
<p>Returns the Content-Language header field for the part, if present; otherwise returns an empty string.</p>
<p>See also <a href="qmailmessagepart.html#setContentLanguage">setContentLanguage</a>().</p>
<h3 class="fn"><a name="contentLocation"></a><a href="http://doc.trolltech.com/4.5/qstring.html">QString</a> QMailMessagePart::contentLocation () const</h3>
<p>Returns the Content-Location header field for the part, if present; otherwise returns an empty string.</p>
<p>See also <a href="qmailmessagepart.html#setContentLocation">setContentLocation</a>().</p>
<h3 class="fn"><a name="displayName"></a><a href="http://doc.trolltech.com/4.5/qstring.html">QString</a> QMailMessagePart::displayName () const</h3>
<p>Returns a non-empty string to identify the part, appropriate for display. If the part 'Content-Type' header field contains a 'name' parameter, that value is used. Otherwise, if the part has a 'Content-Disposition' header field containing a 'filename' parameter, that value is used. Otherwise, if the part has a 'Content-ID' header field, that value is used. Finally, a usable name will be created by combining the content type of the part with the part's number.</p>
<p>See also <a href="qmailmessagepart.html#identifier">identifier</a>().</p>
<h3 class="fn"><a name="fromData"></a>QMailMessagePart QMailMessagePart::fromData ( const <a href="http://doc.trolltech.com/4.5/qbytearray.html">QByteArray</a> &amp; <i>input</i>, const <a href="qmailmessagecontentdisposition.html">QMailMessageContentDisposition</a> &amp; <i>disposition</i>, const <a href="qmailmessagecontenttype.html">QMailMessageContentType</a> &amp; <i>type</i>, <a href="qmailmessagebodyfwd.html#TransferEncoding-enum">QMailMessageBody::TransferEncoding</a> <i>encoding</i>, <a href="qmailmessagebodyfwd.html#EncodingStatus-enum">QMailMessageBody::EncodingStatus</a> <i>status</i> = QMailMessageBody::RequiresEncoding )&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Creates a <a href="qmailmessagepart.html">QMailMessagePart</a> containing an attachment of type <i>disposition</i>, from the data contained in <i>input</i>, of content type <i>type</i> and using the transfer encoding <i>encoding</i>. The current status of the data is specified as <i>status</i>.</p>
<p>See also <a href="qmailmessagebody.html#fromData">QMailMessageBody::fromData</a>().</p>
<h3 class="fn"><a name="fromData-2"></a>QMailMessagePart QMailMessagePart::fromData ( const <a href="http://doc.trolltech.com/4.5/qstring.html">QString</a> &amp; <i>input</i>, const <a href="qmailmessagecontentdisposition.html">QMailMessageContentDisposition</a> &amp; <i>disposition</i>, const <a href="qmailmessagecontenttype.html">QMailMessageContentType</a> &amp; <i>type</i>, <a href="qmailmessagebodyfwd.html#TransferEncoding-enum">QMailMessageBody::TransferEncoding</a> <i>encoding</i> )&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Creates a <a href="qmailmessagepart.html">QMailMessagePart</a> containing an attachment of type <i>disposition</i>, from the data contained in <i>input</i>, of content type <i>type</i> and using the transfer encoding <i>encoding</i>.</p>
<p>See also <a href="qmailmessagebody.html#fromData">QMailMessageBody::fromData</a>().</p>
<h3 class="fn"><a name="fromFile"></a>QMailMessagePart QMailMessagePart::fromFile ( const <a href="http://doc.trolltech.com/4.5/qstring.html">QString</a> &amp; <i>filename</i>, const <a href="qmailmessagecontentdisposition.html">QMailMessageContentDisposition</a> &amp; <i>disposition</i>, const <a href="qmailmessagecontenttype.html">QMailMessageContentType</a> &amp; <i>type</i>, <a href="qmailmessagebodyfwd.html#TransferEncoding-enum">QMailMessageBody::TransferEncoding</a> <i>encoding</i>, <a href="qmailmessagebodyfwd.html#EncodingStatus-enum">QMailMessageBody::EncodingStatus</a> <i>status</i> = QMailMessageBody::RequiresEncoding )&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Creates a <a href="qmailmessagepart.html">QMailMessagePart</a> containing an attachment of type <i>disposition</i>, from the data contained in <i>filename</i>, of content type <i>type</i> and using the transfer encoding <i>encoding</i>. The current status of the data is specified as <i>status</i>.</p>
<p>See also <a href="qmailmessagebody.html#fromFile">QMailMessageBody::fromFile</a>().</p>
<h3 class="fn"><a name="fromMessageReference"></a>QMailMessagePart QMailMessagePart::fromMessageReference ( const <a href="qmailmessageid.html">QMailMessageId</a> &amp; <i>messageId</i>, const <a href="qmailmessagecontentdisposition.html">QMailMessageContentDisposition</a> &amp; <i>disposition</i>, const <a href="qmailmessagecontenttype.html">QMailMessageContentType</a> &amp; <i>type</i>, <a href="qmailmessagebodyfwd.html#TransferEncoding-enum">QMailMessageBody::TransferEncoding</a> <i>encoding</i> )&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Creates a <a href="qmailmessagepart.html">QMailMessagePart</a> containing an attachment of type <i>disposition</i>, whose content is a reference to the message identified by <i>messageId</i>. The resulting part has content type <i>type</i> and uses the transfer encoding <i>encoding</i>.</p>
<p>The message reference can only be resolved by transmitting the message to an external server, where both the originating server of the referenced message and the receiving server of the new message support resolution of the content reference.</p>
<h3 class="fn"><a name="fromPartReference"></a>QMailMessagePart QMailMessagePart::fromPartReference ( const <a href="qmailmessagepartcontainer-location.html">QMailMessagePart::Location</a> &amp; <i>partLocation</i>, const <a href="qmailmessagecontentdisposition.html">QMailMessageContentDisposition</a> &amp; <i>disposition</i>, const <a href="qmailmessagecontenttype.html">QMailMessageContentType</a> &amp; <i>type</i>, <a href="qmailmessagebodyfwd.html#TransferEncoding-enum">QMailMessageBody::TransferEncoding</a> <i>encoding</i> )&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Creates a <a href="qmailmessagepart.html">QMailMessagePart</a> containing an attachment of type <i>disposition</i>, whose content is a reference to the message part identified by <i>partLocation</i>. The resulting part has content type <i>type</i> and uses the transfer encoding <i>encoding</i>.</p>
<p>The part reference can only be resolved by transmitting the message to an external server, where both the originating server of the referenced part's message and the receiving server of the new message support resolution of the content reference.</p>
<h3 class="fn"><a name="fromStream"></a>QMailMessagePart QMailMessagePart::fromStream ( <a href="http://doc.trolltech.com/4.5/qdatastream.html">QDataStream</a> &amp; <i>in</i>, const <a href="qmailmessagecontentdisposition.html">QMailMessageContentDisposition</a> &amp; <i>disposition</i>, const <a href="qmailmessagecontenttype.html">QMailMessageContentType</a> &amp; <i>type</i>, <a href="qmailmessagebodyfwd.html#TransferEncoding-enum">QMailMessageBody::TransferEncoding</a> <i>encoding</i>, <a href="qmailmessagebodyfwd.html#EncodingStatus-enum">QMailMessageBody::EncodingStatus</a> <i>status</i> = QMailMessageBody::RequiresEncoding )&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Creates a <a href="qmailmessagepart.html">QMailMessagePart</a> containing an attachment of type <i>disposition</i>, from the data read from <i>in</i>, of content type <i>type</i> and using the transfer encoding <i>encoding</i>. The current status of the data is specified as <i>status</i>.</p>
<p>See also <a href="qmailmessagebody.html#fromStream">QMailMessageBody::fromStream</a>().</p>
<h3 class="fn"><a name="fromStream-2"></a>QMailMessagePart QMailMessagePart::fromStream ( <a href="http://doc.trolltech.com/4.5/qtextstream.html">QTextStream</a> &amp; <i>in</i>, const <a href="qmailmessagecontentdisposition.html">QMailMessageContentDisposition</a> &amp; <i>disposition</i>, const <a href="qmailmessagecontenttype.html">QMailMessageContentType</a> &amp; <i>type</i>, <a href="qmailmessagebodyfwd.html#TransferEncoding-enum">QMailMessageBody::TransferEncoding</a> <i>encoding</i> )&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Creates a <a href="qmailmessagepart.html">QMailMessagePart</a> containing an attachment of type <i>disposition</i>, from the data read from <i>in</i>, of content type <i>type</i> and using the transfer encoding <i>encoding</i>.</p>
<p>See also <a href="qmailmessagebody.html#fromStream">QMailMessageBody::fromStream</a>().</p>
<h3 class="fn"><a name="identifier"></a><a href="http://doc.trolltech.com/4.5/qstring.html">QString</a> QMailMessagePart::identifier () const</h3>
<p>Returns a non-empty string to identify the part, appropriate for storage. If the part has a 'Content-ID' header field, that value is used. Otherwise, if the part has a 'Content-Disposition' header field containing a 'filename' parameter, that value is used. Otherwise, if the part 'Content-Type' header field contains a 'name' parameter, that value is used. Finally, the part's number will be returned.</p>
<h3 class="fn"><a name="indicativeSize"></a><a href="http://doc.trolltech.com/4.5/qtglobal.html#uint-typedef">uint</a> QMailMessagePart::indicativeSize () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Returns an indication of the size of the part. This measure should be used only in comparing the relative size of parts with respect to transmission.</p>
<h3 class="fn"><a name="locationx"></a><a href="qmailmessagepartcontainer-location.html">Location</a> QMailMessagePart::location () const</h3>
<p>Returns the location of the part within the message.</p>
<h3 class="fn"><a name="messageReference"></a><a href="qmailmessageid.html">QMailMessageId</a> QMailMessagePart::messageReference () const</h3>
<p>Returns the identifier of the message that this part references.</p>
<p>The result will be meaningful only when <a href="qmailmessagepart.html#referenceType">referenceType</a>() yields <a href="qmailmessagepartfwd.html#ReferenceType-enum">QMailMessagePart::MessageReference</a>.</p>
<p>See also <a href="qmailmessagepart.html#referenceType">referenceType</a>(), <a href="qmailmessagepart.html#partReference">partReference</a>(), and <a href="qmailmessagepart.html#referenceResolution">referenceResolution</a>().</p>
<h3 class="fn"><a name="partNumber"></a>int QMailMessagePart::partNumber () const</h3>
<p>Returns the number of the part, if it has been set; otherwise returns -1.</p>
<h3 class="fn"><a name="partReference"></a><a href="qmailmessagepartcontainer-location.html">QMailMessagePart::Location</a> QMailMessagePart::partReference () const</h3>
<p>Returns the location of the message part that this part references.</p>
<p>The result will be meaningful only when <a href="qmailmessagepart.html#referenceType">referenceType</a>() yields <a href="qmailmessagepartfwd.html#ReferenceType-enum">QMailMessagePart::PartReference</a>.</p>
<p>See also <a href="qmailmessagepart.html#referenceType">referenceType</a>(), <a href="qmailmessagepart.html#messageReference">messageReference</a>(), and <a href="qmailmessagepart.html#referenceResolution">referenceResolution</a>().</p>
<h3 class="fn"><a name="partialContentAvailable"></a>bool QMailMessagePart::partialContentAvailable () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qmailmessagepartcontainer.html#partialContentAvailable">QMailMessagePartContainer::partialContentAvailable</a>().</p>
<p>Returns true if some portion of the content of this part is available; otherwise returns false.</p>
<h3 class="fn"><a name="referenceResolution"></a><a href="http://doc.trolltech.com/4.5/qstring.html">QString</a> QMailMessagePart::referenceResolution () const</h3>
<p>Returns the URI that resolves the reference encoded into this message part.</p>
<p>The result will be meaningful only when <a href="qmailmessagepart.html#referenceType">referenceType</a>() yields other than <a href="qmailmessagepartfwd.html#ReferenceType-enum">QMailMessagePart::None</a>.</p>
<p>See also <a href="qmailmessagepart.html#setReferenceResolution">setReferenceResolution</a>() and <a href="qmailmessagepart.html#referenceType">referenceType</a>().</p>
<h3 class="fn"><a name="referenceType"></a><a href="qmailmessagepartfwd.html#ReferenceType-enum">ReferenceType</a> QMailMessagePart::referenceType () const</h3>
<p>Returns the type of reference that this message part constitutes.</p>
<p>See also <a href="qmailmessagepart.html#setReference">setReference</a>().</p>
<h3 class="fn"><a name="setContentDescription"></a>void QMailMessagePart::setContentDescription ( const <a href="http://doc.trolltech.com/4.5/qstring.html">QString</a> &amp; <i>description</i> )</h3>
<p>Sets the Content-Description header field for the part to contain <i>description</i>.</p>
<p>See also <a href="qmailmessagepart.html#contentDescription">contentDescription</a>().</p>
<h3 class="fn"><a name="setContentDisposition"></a>void QMailMessagePart::setContentDisposition ( const <a href="qmailmessagecontentdisposition.html">QMailMessageContentDisposition</a> &amp; <i>disposition</i> )</h3>
<p>Sets the Content-Disposition header field for the part to contain <i>disposition</i>.</p>
<p>See also <a href="qmailmessagepart.html#contentDisposition">contentDisposition</a>().</p>
<h3 class="fn"><a name="setContentID"></a>void QMailMessagePart::setContentID ( const <a href="http://doc.trolltech.com/4.5/qstring.html">QString</a> &amp; <i>id</i> )</h3>
<p>Sets the Content-Id header field for the part to contain <i>id</i>.</p>
<p>If <i>id</i> is not surrounded by angle brackets, these are added.</p>
<p>See also <a href="qmailmessagepart.html#contentID">contentID</a>().</p>
<h3 class="fn"><a name="setContentLanguage"></a>void QMailMessagePart::setContentLanguage ( const <a href="http://doc.trolltech.com/4.5/qstring.html">QString</a> &amp; <i>language</i> )</h3>
<p>Sets the Content-Language header field for the part to contain <i>language</i>.</p>
<p>See also <a href="qmailmessagepart.html#contentLanguage">contentLanguage</a>().</p>
<h3 class="fn"><a name="setContentLocation"></a>void QMailMessagePart::setContentLocation ( const <a href="http://doc.trolltech.com/4.5/qstring.html">QString</a> &amp; <i>location</i> )</h3>
<p>Sets the Content-Location header field for the part to contain <i>location</i>.</p>
<p>See also <a href="qmailmessagepart.html#contentLocation">contentLocation</a>().</p>
<h3 class="fn"><a name="setReference"></a>void QMailMessagePart::setReference ( const <a href="qmailmessageid.html">QMailMessageId</a> &amp; <i>id</i>, const <a href="qmailmessagecontenttype.html">QMailMessageContentType</a> &amp; <i>type</i>, <a href="qmailmessagebodyfwd.html#TransferEncoding-enum">QMailMessageBody::TransferEncoding</a> <i>encoding</i> )</h3>
<p>Sets the part content to contain a reference to the message identified by <i>id</i>, having content type <i>type</i> and using the transfer encoding <i>encoding</i>.</p>
<p>The message reference can only be resolved by transmitting the message to an external server, where both the originating server of the referenced message and the receiving server of the new message support resolution of the content reference.</p>
<p>See also <a href="qmailmessagepart.html#referenceType">referenceType</a>() and <a href="qmailmessagepart.html#setReferenceResolution">setReferenceResolution</a>().</p>
<h3 class="fn"><a name="setReference-2"></a>void QMailMessagePart::setReference ( const <a href="qmailmessagepartcontainer-location.html">QMailMessagePart::Location</a> &amp; <i>location</i>, const <a href="qmailmessagecontenttype.html">QMailMessageContentType</a> &amp; <i>type</i>, <a href="qmailmessagebodyfwd.html#TransferEncoding-enum">QMailMessageBody::TransferEncoding</a> <i>encoding</i> )</h3>
<p>Sets the part content to contain a reference to the message part identified by <i>location</i>, having content type <i>type</i> and using the transfer encoding <i>encoding</i>.</p>
<p>The part reference can only be resolved by transmitting the message to an external server, where both the originating server of the referenced part's message and the receiving server of the new message support resolution of the content reference.</p>
<p>See also <a href="qmailmessagepart.html#referenceType">referenceType</a>() and <a href="qmailmessagepart.html#setReferenceResolution">setReferenceResolution</a>().</p>
<h3 class="fn"><a name="setReferenceResolution"></a>void QMailMessagePart::setReferenceResolution ( const <a href="http://doc.trolltech.com/4.5/qstring.html">QString</a> &amp; <i>uri</i> )</h3>
<p>Sets the URI that resolves the reference encoded into this message part to <i>uri</i>.</p>
<p>The reference URI is meaningful only when <a href="qmailmessagepart.html#referenceType">referenceType</a>() yields other than <a href="qmailmessagepartfwd.html#ReferenceType-enum">QMailMessagePart::None</a>.</p>
<p>See also <a href="qmailmessagepart.html#referenceResolution">referenceResolution</a>() and <a href="qmailmessagepart.html#referenceType">referenceType</a>().</p>
<h3 class="fn"><a name="writeBodyTo"></a><a href="http://doc.trolltech.com/4.5/qstring.html">QString</a> QMailMessagePart::writeBodyTo ( const <a href="http://doc.trolltech.com/4.5/qstring.html">QString</a> &amp; <i>path</i> ) const</h3>
<p>Writes the decoded body of the part to a file under the directory specified by <i>path</i>. The name of the resulting file is taken from the part. If that file name already exists in the path a new unique name of the format &lt;random chars&gt;.&lt;filename&gt; is saved.</p>
<p>Returns the path of the file written on success, or an empty string otherwise.</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>