author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 18 Aug 2010 09:45:25 +0300 | |
changeset 52 | 12db4185673b |
parent 34 | 84197e66a4bd |
child 47 | 5b14749788d7 |
child 70 | a15d9966050f |
permissions | -rw-r--r-- |
31 | 1 |
/* |
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 |
* All rights reserved. |
|
4 |
* This component and the accompanying materials are made available |
|
5 |
* under the terms of "Eclipse Public License v1.0" |
|
6 |
* which accompanies this distribution, and is available |
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 |
* |
|
9 |
* Initial Contributors: |
|
10 |
* Nokia Corporation - initial contribution. |
|
11 |
* |
|
12 |
* Contributors: |
|
13 |
* |
|
14 |
* Description: Feeder class for unified viewer. Fetches data from the |
|
15 |
* message store for the given message store id. |
|
16 |
* |
|
17 |
*/ |
|
18 |
||
19 |
#include "univiewerfeeder.h" |
|
20 |
#include "univiewerfeeder_p.h" |
|
21 |
||
22 |
//--------------------------------------------------------------------------- |
|
23 |
// UniViewerFeeder::UniViewerFeeder |
|
24 |
// Default Constructor. |
|
25 |
//--------------------------------------------------------------------------- |
|
26 |
UniViewerFeeder::UniViewerFeeder(qint32 msgId, |
|
27 |
QObject *parent) : |
|
28 |
QObject(parent) |
|
29 |
{ |
|
30 |
d_ptr = new UniViewerFeederPrivate(msgId, this); |
|
31 |
} |
|
32 |
||
33 |
//--------------------------------------------------------------------------- |
|
34 |
// UniViewerFeeder::~UniViewerFeeder() |
|
35 |
// Desctuctor |
|
36 |
//--------------------------------------------------------------------------- |
|
37 |
UniViewerFeeder::~UniViewerFeeder() |
|
38 |
{ |
|
39 |
if (d_ptr) |
|
40 |
{ |
|
41 |
delete d_ptr; |
|
42 |
d_ptr = NULL; |
|
43 |
} |
|
44 |
} |
|
45 |
||
46 |
//--------------------------------------------------------------------------- |
|
47 |
// UniViewerFeeder::updateContent() |
|
48 |
// |
|
49 |
//--------------------------------------------------------------------------- |
|
50 |
void UniViewerFeeder::updateContent(qint32 msgId) |
|
51 |
{ |
|
52 |
d_ptr->updateContent(msgId); |
|
53 |
} |
|
54 |
||
55 |
// --------------------------------------------------------------------------- |
|
56 |
// UniViewerFeeder::emitMsgBody |
|
57 |
// Emits msgBody signal with msgBody as argument |
|
58 |
// --------------------------------------------------------------------------- |
|
59 |
void UniViewerFeeder::emitMsgBody(QString body) |
|
60 |
{ |
|
61 |
emit msgBody(body); |
|
62 |
} |
|
63 |
||
64 |
// --------------------------------------------------------------------------- |
|
65 |
// UniViewerFeeder::fetchDetails |
|
66 |
// Fetches message details from the store. |
|
67 |
// --------------------------------------------------------------------------- |
|
68 |
void UniViewerFeeder::fetchDetails() |
|
69 |
{ |
|
70 |
d_ptr->fetchDetails(); |
|
71 |
} |
|
72 |
||
73 |
// --------------------------------------------------------------------------- |
|
74 |
// UniViewerFeeder::msgType |
|
75 |
// Returns the message type. |
|
76 |
// --------------------------------------------------------------------------- |
|
77 |
qint32 UniViewerFeeder::msgType() |
|
78 |
{ |
|
79 |
return d_ptr->msgType(); |
|
80 |
} |
|
81 |
||
82 |
// --------------------------------------------------------------------------- |
|
83 |
// UniViewerFeeder::timeStamp |
|
84 |
// Returns the time stamp. |
|
85 |
// --------------------------------------------------------------------------- |
|
86 |
QDateTime UniViewerFeeder::timeStamp() |
|
87 |
{ |
|
88 |
return d_ptr->timeStamp(); |
|
89 |
} |
|
90 |
||
91 |
// --------------------------------------------------------------------------- |
|
92 |
// UniViewerFeeder::hasAttachments |
|
93 |
// @see header file |
|
94 |
// --------------------------------------------------------------------------- |
|
95 |
bool UniViewerFeeder::hasAttachments() |
|
96 |
{ |
|
97 |
return d_ptr->hasAttachments(); |
|
98 |
} |
|
99 |
||
100 |
// --------------------------------------------------------------------------- |
|
101 |
// UniViewerFeeder::attachmentsList |
|
102 |
// @see header file |
|
103 |
// --------------------------------------------------------------------------- |
|
104 |
UniMessageInfoList UniViewerFeeder::attachmentsList() |
|
105 |
{ |
|
106 |
return d_ptr->attachmentsList(); |
|
107 |
} |
|
108 |
||
109 |
// --------------------------------------------------------------------------- |
|
110 |
// UniViewerFeeder::attachmentCount |
|
111 |
// @see header file |
|
112 |
// --------------------------------------------------------------------------- |
|
113 |
int UniViewerFeeder::attachmentCount() |
|
114 |
{ |
|
115 |
return d_ptr->attachmentCount(); |
|
116 |
} |
|
117 |
||
118 |
// --------------------------------------------------------------------------- |
|
119 |
// UniViewerFeeder::objectsList |
|
120 |
// @see header file |
|
121 |
// --------------------------------------------------------------------------- |
|
122 |
||
123 |
UniMessageInfoList UniViewerFeeder::objectsList() |
|
124 |
{ |
|
125 |
return d_ptr->objectsList(); |
|
126 |
} |
|
127 |
||
128 |
// --------------------------------------------------------------------------- |
|
129 |
// UniViewerFeeder::objectCount |
|
130 |
// @see header file |
|
131 |
// --------------------------------------------------------------------------- |
|
132 |
int UniViewerFeeder::objectCount() |
|
133 |
{ |
|
134 |
return d_ptr->objectCount(); |
|
135 |
} |
|
136 |
||
137 |
// --------------------------------------------------------------------------- |
|
138 |
// UniViewerFeeder::slideCount |
|
139 |
// @see header file |
|
140 |
// --------------------------------------------------------------------------- |
|
141 |
int UniViewerFeeder::slideCount() |
|
142 |
{ |
|
143 |
return d_ptr->slideCount(); |
|
144 |
} |
|
145 |
||
146 |
// --------------------------------------------------------------------------- |
|
147 |
// UniViewerFeeder::slideContent |
|
148 |
// @see header file |
|
149 |
// --------------------------------------------------------------------------- |
|
150 |
UniMessageInfoList UniViewerFeeder::slideContent(int slidenum) |
|
151 |
{ |
|
152 |
return d_ptr->slideContent(slidenum); |
|
153 |
} |
|
154 |
||
155 |
ConvergedMessageAddressList UniViewerFeeder::toAddressList() |
|
156 |
{ |
|
157 |
return d_ptr->toAddressList(); |
|
158 |
} |
|
159 |
||
160 |
// --------------------------------------------------------------------------- |
|
161 |
// UniViewerFeeder::ccAddressList |
|
162 |
// @see header file |
|
163 |
// --------------------------------------------------------------------------- |
|
164 |
ConvergedMessageAddressList UniViewerFeeder::ccAddressList() |
|
165 |
{ |
|
166 |
return d_ptr->ccAddressList(); |
|
167 |
} |
|
168 |
||
169 |
// --------------------------------------------------------------------------- |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
170 |
// UniViewerFeeder::bccAddressList |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
171 |
// @see header file |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
172 |
// --------------------------------------------------------------------------- |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
173 |
ConvergedMessageAddressList UniViewerFeeder::bccAddressList() |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
174 |
{ |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
175 |
return d_ptr->bccAddressList(); |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
176 |
} |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
177 |
|
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
178 |
// --------------------------------------------------------------------------- |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
179 |
// UniViewerFeeder::recipientCount |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
180 |
// @see header file |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
181 |
// --------------------------------------------------------------------------- |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
182 |
int UniViewerFeeder::recipientCount() |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
183 |
{ |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
184 |
return d_ptr->recipientCount(); |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
185 |
} |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
186 |
|
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
187 |
// --------------------------------------------------------------------------- |
31 | 188 |
// UniViewerFeeder::messageSize |
189 |
// @see header file |
|
190 |
// --------------------------------------------------------------------------- |
|
191 |
int UniViewerFeeder::messageSize() |
|
192 |
{ |
|
193 |
return d_ptr->messageSize(); |
|
194 |
} |
|
195 |
||
196 |
// --------------------------------------------------------------------------- |
|
197 |
// UniViewerFeeder::clearContent |
|
198 |
// @see header file |
|
199 |
// |
|
200 |
void UniViewerFeeder::clearContent() |
|
201 |
{ |
|
202 |
return d_ptr->clearContent(); |
|
203 |
} |
|
204 |
||
205 |
// UniViewerFeeder::fromAddressAndAlias |
|
206 |
// @see header file |
|
207 |
// |
|
208 |
void UniViewerFeeder::fromAddressAndAlias(QString& from, QString& alias) |
|
209 |
{ |
|
210 |
return d_ptr->fromAddressAndAlias(from, alias); |
|
211 |
} |
|
212 |
||
213 |
// UniViewerFeeder::isIncoming |
|
214 |
// @see header file |
|
215 |
// |
|
216 |
bool UniViewerFeeder::isIncoming() |
|
217 |
{ |
|
218 |
return d_ptr->isIncoming(); |
|
219 |
} |
|
220 |
||
221 |
// UniViewerFeeder::priority |
|
222 |
// @see header file |
|
223 |
// |
|
224 |
int UniViewerFeeder::priority() |
|
225 |
{ |
|
226 |
return d_ptr->priority(); |
|
227 |
} |
|
228 |
||
229 |
// UniViewerFeeder::subject |
|
230 |
// @see header file |
|
231 |
// |
|
232 |
QString UniViewerFeeder::subject() |
|
233 |
{ |
|
234 |
return d_ptr->subject(); |
|
235 |
} |
|
236 |
||
237 |
int UniViewerFeeder::sendingState() |
|
238 |
{ |
|
239 |
||
240 |
return d_ptr->sendingState(); |
|
241 |
} |
|
242 |
// EOF |