1
<?xml version="1.0" encoding="iso-8859-1"?>
3
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
<title>message.h Source File</title>
7
<link href="doxygen.css" rel="stylesheet" type="text/css" />
10
<table border="0" cellpadding="0" cellspacing="0" width="100%">
12
<td width="1"> </td>
13
<td class="postheader" valign="center">
15
<font color="#004faf">Home</font></a> ·
16
<a href="classes.html">
17
<font color="#004faf">All Classes</font></a> ·
18
<a href="namespaces.html">
19
<font color="#004faf">All Namespaces</font></a> ·
20
<a href="modules.html">
21
<font color="#004faf">Modules</font></a> ·
22
<a href="functions.html">
23
<font color="#004faf">Functions</font></a> ·
25
<font color="#004faf">Files</font></a>
29
<!-- Generated by Doxygen 1.7.6.1 -->
32
<div class="headertitle">
33
<div class="title">message.h</div> </div>
35
<div class="contents">
36
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
37
<a name="l00023"></a>00023 <span class="preprocessor">#ifndef _TelepathyQt_message_h_HEADER_GUARD_</span>
38
<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define _TelepathyQt_message_h_HEADER_GUARD_</span>
39
<a name="l00025"></a>00025 <span class="preprocessor"></span>
40
<a name="l00026"></a>00026 <span class="preprocessor">#ifndef IN_TP_QT_HEADER</span>
41
<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#error IN_TP_QT_HEADER</span>
42
<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
43
<a name="l00029"></a>00029 <span class="preprocessor"></span>
44
<a name="l00030"></a>00030 <span class="preprocessor">#include <QSharedDataPointer></span>
45
<a name="l00031"></a>00031
46
<a name="l00032"></a>00032 <span class="preprocessor">#include <TelepathyQt/Constants></span>
47
<a name="l00033"></a>00033 <span class="preprocessor">#include <TelepathyQt/Contact></span>
48
<a name="l00034"></a>00034 <span class="preprocessor">#include <TelepathyQt/Types></span>
49
<a name="l00035"></a>00035
50
<a name="l00036"></a>00036 <span class="keyword">class </span>QDateTime;
51
<a name="l00037"></a>00037
52
<a name="l00038"></a>00038 <span class="keyword">namespace </span>Tp
53
<a name="l00039"></a>00039 {
54
<a name="l00040"></a>00040
55
<a name="l00041"></a>00041 <span class="keyword">class </span>Contact;
56
<a name="l00042"></a>00042 <span class="keyword">class </span>TextChannel;
57
<a name="l00043"></a>00043
58
<a name="l00044"></a><a class="code" href="a00281.html">00044</a> <span class="keyword">class </span>TP_QT_EXPORT <a class="code" href="a00281.html" title="The Message class represents a Telepathy message in a TextChannel.">Message</a>
59
<a name="l00045"></a>00045 {
60
<a name="l00046"></a>00046 <span class="keyword">public</span>:
61
<a name="l00047"></a>00047 <a class="code" href="a00281.html" title="The Message class represents a Telepathy message in a TextChannel.">Message</a>(<a class="code" href="a00757.html#ga7f1e23e32fa6218eebc7021d094a8f49">ChannelTextMessageType</a>, <span class="keyword">const</span> QString &);
62
<a name="l00048"></a>00048 <a class="code" href="a00281.html" title="The Message class represents a Telepathy message in a TextChannel.">Message</a>(<span class="keyword">const</span> <a class="code" href="a00281.html" title="The Message class represents a Telepathy message in a TextChannel.">Message</a> &other);
63
<a name="l00049"></a>00049 ~<a class="code" href="a00281.html" title="The Message class represents a Telepathy message in a TextChannel.">Message</a>();
64
<a name="l00050"></a>00050
65
<a name="l00051"></a>00051 <a class="code" href="a00281.html" title="The Message class represents a Telepathy message in a TextChannel.">Message</a> &operator=(<span class="keyword">const</span> <a class="code" href="a00281.html" title="The Message class represents a Telepathy message in a TextChannel.">Message</a> &other);
66
<a name="l00052"></a>00052 <span class="keywordtype">bool</span> <a class="code" href="a00724.html#a64124d3c464eb95a94a84787c44dc96d">operator==</a>(<span class="keyword">const</span> <a class="code" href="a00281.html" title="The Message class represents a Telepathy message in a TextChannel.">Message</a> &other) <span class="keyword">const</span>;
67
<a name="l00053"></a><a class="code" href="a00281.html#ab44f1b185f23f41795e7bfc29c6d4ac1">00053</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="a00724.html#a5e547b15fdf04ff0e5e479b94c012753">operator!=</a>(<span class="keyword">const</span> <a class="code" href="a00281.html" title="The Message class represents a Telepathy message in a TextChannel.">Message</a> &other)<span class="keyword"> const</span>
68
<a name="l00054"></a>00054 <span class="keyword"> </span>{
69
<a name="l00055"></a>00055 <span class="keywordflow">return</span> !(*<span class="keyword">this</span> == other);
70
<a name="l00056"></a>00056 }
71
<a name="l00057"></a>00057
72
<a name="l00058"></a>00058 <span class="comment">// Convenient access to headers</span>
73
<a name="l00059"></a>00059
74
<a name="l00060"></a>00060 QDateTime sent() <span class="keyword">const</span>;
75
<a name="l00061"></a>00061
76
<a name="l00062"></a>00062 <a class="code" href="a00757.html#ga7f1e23e32fa6218eebc7021d094a8f49">ChannelTextMessageType</a> messageType() <span class="keyword">const</span>;
77
<a name="l00063"></a>00063
78
<a name="l00064"></a>00064 <span class="keywordtype">bool</span> isTruncated() <span class="keyword">const</span>;
79
<a name="l00065"></a>00065
80
<a name="l00066"></a>00066 <span class="keywordtype">bool</span> hasNonTextContent() <span class="keyword">const</span>;
81
<a name="l00067"></a>00067
82
<a name="l00068"></a>00068 QString messageToken() <span class="keyword">const</span>;
83
<a name="l00069"></a>00069
84
<a name="l00070"></a>00070 <span class="keywordtype">bool</span> isSpecificToDBusInterface() <span class="keyword">const</span>;
85
<a name="l00071"></a>00071 QString dbusInterface() <span class="keyword">const</span>;
86
<a name="l00072"></a>00072
87
<a name="l00073"></a>00073 QString text() <span class="keyword">const</span>;
88
<a name="l00074"></a>00074
89
<a name="l00075"></a>00075 <span class="comment">// Direct access to the whole message (header and body)</span>
90
<a name="l00076"></a>00076
91
<a name="l00077"></a>00077 <a class="code" href="a00284.html">MessagePart</a> header() <span class="keyword">const</span>;
92
<a name="l00078"></a>00078
93
<a name="l00079"></a>00079 <span class="keywordtype">int</span> size() <span class="keyword">const</span>;
94
<a name="l00080"></a>00080 <a class="code" href="a00284.html">MessagePart</a> part(uint index) <span class="keyword">const</span>;
95
<a name="l00081"></a>00081 <a class="code" href="a00761.html#gad29671d375c7a5bf1e8228f609b0d828">MessagePartList</a> parts() <span class="keyword">const</span>;
96
<a name="l00082"></a>00082
97
<a name="l00083"></a>00083 <span class="keyword">private</span>:
98
<a name="l00084"></a><a class="code" href="a00281.html#aa2cb307ea6581bd7e0cd6161e02c837b">00084</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00203.html" title="The ContactMessenger class provides an easy way to send text messages to a contact and also track sen...">ContactMessenger</a>;
99
<a name="l00085"></a><a class="code" href="a00281.html#aad6d2fbe1655be2e7c6be24bef7db745">00085</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00361.html" title="The ReceivedMessage class is a subclass of Message, representing a received message only...">ReceivedMessage</a>;
100
<a name="l00086"></a><a class="code" href="a00281.html#a39526f26101e38663d41d61cbfbb8e83">00086</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00408.html" title="The TextChannel class represents a Telepathy channel of type Text.">TextChannel</a>;
101
<a name="l00087"></a>00087
102
<a name="l00088"></a>00088 TP_QT_NO_EXPORT <a class="code" href="a00281.html" title="The Message class represents a Telepathy message in a TextChannel.">Message</a>();
103
<a name="l00089"></a>00089 TP_QT_NO_EXPORT <a class="code" href="a00281.html" title="The Message class represents a Telepathy message in a TextChannel.">Message</a>(<span class="keyword">const</span> <a class="code" href="a00761.html#gad29671d375c7a5bf1e8228f609b0d828">MessagePartList</a> &parts);
104
<a name="l00090"></a>00090 TP_QT_NO_EXPORT <a class="code" href="a00281.html" title="The Message class represents a Telepathy message in a TextChannel.">Message</a>(uint, uint, <span class="keyword">const</span> QString &);
105
<a name="l00091"></a>00091
106
<a name="l00092"></a><a class="code" href="a00281.html#a15a94ff2bd578e608a94d0a1ba4bd3e0">00092</a> <span class="keyword">struct </span>Private;
107
<a name="l00093"></a>00093 <span class="keyword">friend</span> <span class="keyword">struct </span>Private;
108
<a name="l00094"></a>00094 QSharedDataPointer<Private> mPriv;
109
<a name="l00095"></a>00095 };
110
<a name="l00096"></a>00096
111
<a name="l00097"></a><a class="code" href="a00361.html">00097</a> <span class="keyword">class </span>TP_QT_EXPORT <a class="code" href="a00361.html" title="The ReceivedMessage class is a subclass of Message, representing a received message only...">ReceivedMessage</a> : <span class="keyword">public</span> <a class="code" href="a00281.html" title="The Message class represents a Telepathy message in a TextChannel.">Message</a>
112
<a name="l00098"></a>00098 {
113
<a name="l00099"></a>00099 <span class="keyword">public</span>:
114
<a name="l00100"></a><a class="code" href="a00225.html">00100</a> <span class="keyword">class </span><a class="code" href="a00225.html" title="The ReceivedMessage::DeliveryDetails class represents the details of a delivery report.">DeliveryDetails</a>
115
<a name="l00101"></a>00101 {
116
<a name="l00102"></a>00102 <span class="keyword">public</span>:
117
<a name="l00103"></a>00103 <a class="code" href="a00225.html" title="The ReceivedMessage::DeliveryDetails class represents the details of a delivery report.">DeliveryDetails</a>();
118
<a name="l00104"></a>00104 <a class="code" href="a00225.html" title="The ReceivedMessage::DeliveryDetails class represents the details of a delivery report.">DeliveryDetails</a>(<span class="keyword">const</span> <a class="code" href="a00225.html" title="The ReceivedMessage::DeliveryDetails class represents the details of a delivery report.">DeliveryDetails</a> &other);
119
<a name="l00105"></a>00105 ~<a class="code" href="a00225.html" title="The ReceivedMessage::DeliveryDetails class represents the details of a delivery report.">DeliveryDetails</a>();
120
<a name="l00106"></a>00106
121
<a name="l00107"></a>00107 <a class="code" href="a00225.html" title="The ReceivedMessage::DeliveryDetails class represents the details of a delivery report.">DeliveryDetails</a> &operator=(<span class="keyword">const</span> <a class="code" href="a00225.html" title="The ReceivedMessage::DeliveryDetails class represents the details of a delivery report.">DeliveryDetails</a> &other);
122
<a name="l00108"></a>00108
123
<a name="l00109"></a><a class="code" href="a00225.html#ac76a13b12fbabc831ffb8efffab8e4e4">00109</a> <span class="keywordtype">bool</span> <a class="code" href="a00225.html#ac76a13b12fbabc831ffb8efffab8e4e4">isValid</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mPriv.constData() != 0; }
124
<a name="l00110"></a>00110
125
<a name="l00111"></a>00111 <a class="code" href="a00757.html#ga604080e478c7ae07ec133324c3c844b1">DeliveryStatus</a> status() <span class="keyword">const</span>;
126
<a name="l00112"></a>00112
127
<a name="l00113"></a>00113 <span class="keywordtype">bool</span> hasOriginalToken() <span class="keyword">const</span>;
128
<a name="l00114"></a>00114 QString originalToken() <span class="keyword">const</span>;
129
<a name="l00115"></a>00115
130
<a name="l00116"></a>00116 <span class="keywordtype">bool</span> isError() <span class="keyword">const</span>;
131
<a name="l00117"></a>00117 <a class="code" href="a00757.html#ga5d62f6836d5167746124d53ba55e1dbd">ChannelTextSendError</a> error() <span class="keyword">const</span>;
132
<a name="l00118"></a>00118
133
<a name="l00119"></a>00119 <span class="keywordtype">bool</span> hasDebugMessage() <span class="keyword">const</span>;
134
<a name="l00120"></a>00120 QString debugMessage() <span class="keyword">const</span>;
135
<a name="l00121"></a>00121
136
<a name="l00122"></a>00122 QString dbusError() <span class="keyword">const</span>;
137
<a name="l00123"></a>00123
138
<a name="l00124"></a>00124 <span class="keywordtype">bool</span> hasEchoedMessage() <span class="keyword">const</span>;
139
<a name="l00125"></a>00125 <a class="code" href="a00281.html" title="The Message class represents a Telepathy message in a TextChannel.">Message</a> echoedMessage() <span class="keyword">const</span>;
140
<a name="l00126"></a>00126
141
<a name="l00127"></a>00127 <span class="keyword">private</span>:
142
<a name="l00128"></a><a class="code" href="a00225.html#aad6d2fbe1655be2e7c6be24bef7db745">00128</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00361.html" title="The ReceivedMessage class is a subclass of Message, representing a received message only...">ReceivedMessage</a>;
143
<a name="l00129"></a>00129
144
<a name="l00130"></a>00130 TP_QT_NO_EXPORT <a class="code" href="a00225.html" title="The ReceivedMessage::DeliveryDetails class represents the details of a delivery report.">DeliveryDetails</a>(<span class="keyword">const</span> <a class="code" href="a00761.html#gad29671d375c7a5bf1e8228f609b0d828">MessagePartList</a> &parts);
145
<a name="l00131"></a>00131
146
<a name="l00132"></a><a class="code" href="a00225.html#a15a94ff2bd578e608a94d0a1ba4bd3e0">00132</a> <span class="keyword">struct </span>Private;
147
<a name="l00133"></a>00133 <span class="keyword">friend</span> <span class="keyword">struct </span>Private;
148
<a name="l00134"></a>00134 QSharedDataPointer<Private> mPriv;
149
<a name="l00135"></a>00135 };
150
<a name="l00136"></a>00136
151
<a name="l00137"></a>00137 <a class="code" href="a00361.html" title="The ReceivedMessage class is a subclass of Message, representing a received message only...">ReceivedMessage</a>(<span class="keyword">const</span> <a class="code" href="a00361.html" title="The ReceivedMessage class is a subclass of Message, representing a received message only...">ReceivedMessage</a> &other);
152
<a name="l00138"></a>00138 <a class="code" href="a00361.html" title="The ReceivedMessage class is a subclass of Message, representing a received message only...">ReceivedMessage</a> &operator=(<span class="keyword">const</span> <a class="code" href="a00361.html" title="The ReceivedMessage class is a subclass of Message, representing a received message only...">ReceivedMessage</a> &other);
153
<a name="l00139"></a>00139 ~<a class="code" href="a00361.html" title="The ReceivedMessage class is a subclass of Message, representing a received message only...">ReceivedMessage</a>();
154
<a name="l00140"></a>00140
155
<a name="l00141"></a>00141 QDateTime received() <span class="keyword">const</span>;
156
<a name="l00142"></a>00142 ContactPtr sender() <span class="keyword">const</span>;
157
<a name="l00143"></a>00143 QString senderNickname() <span class="keyword">const</span>;
158
<a name="l00144"></a>00144
159
<a name="l00145"></a>00145 QString supersededToken() <span class="keyword">const</span>;
160
<a name="l00146"></a>00146
161
<a name="l00147"></a>00147 <span class="keywordtype">bool</span> isScrollback() <span class="keyword">const</span>;
162
<a name="l00148"></a>00148 <span class="keywordtype">bool</span> isRescued() <span class="keyword">const</span>;
163
<a name="l00149"></a>00149
164
<a name="l00150"></a>00150 <span class="keywordtype">bool</span> isDeliveryReport() <span class="keyword">const</span>;
165
<a name="l00151"></a>00151 <a class="code" href="a00225.html" title="The ReceivedMessage::DeliveryDetails class represents the details of a delivery report.">DeliveryDetails</a> deliveryDetails() <span class="keyword">const</span>;
166
<a name="l00152"></a>00152
167
<a name="l00153"></a>00153 <span class="keywordtype">bool</span> isFromChannel(<span class="keyword">const</span> TextChannelPtr &channel) <span class="keyword">const</span>;
168
<a name="l00154"></a>00154
169
<a name="l00155"></a>00155 <span class="keyword">private</span>:
170
<a name="l00156"></a><a class="code" href="a00361.html#a39526f26101e38663d41d61cbfbb8e83">00156</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00408.html" title="The TextChannel class represents a Telepathy channel of type Text.">TextChannel</a>;
171
<a name="l00157"></a>00157
172
<a name="l00158"></a>00158 TP_QT_NO_EXPORT <a class="code" href="a00361.html" title="The ReceivedMessage class is a subclass of Message, representing a received message only...">ReceivedMessage</a>(<span class="keyword">const</span> <a class="code" href="a00761.html#gad29671d375c7a5bf1e8228f609b0d828">MessagePartList</a> &parts,
173
<a name="l00159"></a>00159 <span class="keyword">const</span> TextChannelPtr &channel);
174
<a name="l00160"></a>00160 TP_QT_NO_EXPORT <a class="code" href="a00361.html" title="The ReceivedMessage class is a subclass of Message, representing a received message only...">ReceivedMessage</a>();
175
<a name="l00161"></a>00161
176
<a name="l00162"></a>00162 TP_QT_NO_EXPORT uint senderHandle() <span class="keyword">const</span>;
177
<a name="l00163"></a>00163 TP_QT_NO_EXPORT QString senderId() <span class="keyword">const</span>;
178
<a name="l00164"></a>00164 TP_QT_NO_EXPORT uint pendingId() <span class="keyword">const</span>;
179
<a name="l00165"></a>00165
180
<a name="l00166"></a>00166 TP_QT_NO_EXPORT <span class="keywordtype">void</span> setForceNonText();
181
<a name="l00167"></a>00167 TP_QT_NO_EXPORT <span class="keywordtype">void</span> clearSenderHandle();
182
<a name="l00168"></a>00168 TP_QT_NO_EXPORT <span class="keywordtype">void</span> setSender(<span class="keyword">const</span> ContactPtr &sender);
183
<a name="l00169"></a>00169 };
184
<a name="l00170"></a>00170
185
<a name="l00171"></a>00171 } <span class="comment">// Tp</span>
186
<a name="l00172"></a>00172
187
<a name="l00173"></a>00173 <span class="preprocessor">#endif</span>
188
</pre></div></div><!-- contents -->
189
<p /><address><hr /><div align="center">
190
<table width="100%" cellspacing="0" border="0"><tr class="address">
191
<td width="30%">Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation</td>
192
<td width="30%" align="right"><div align="right">Telepathy-Qt 0.9.3</div></td>
193
</tr></table></div></address>