|
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 Private class for unified viewer. Fetches data from the |
|
15 * message store for the given message id. |
|
16 * |
|
17 */ |
|
18 #ifndef UNIVIEWER_FEEDER_PRIVATE_H |
|
19 #define UNIVIEWER_FEEDER_PRIVATE_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32std.h> |
|
23 #include <e32base.h> |
|
24 #include <msvapi.h> |
|
25 |
|
26 #include "convergedmessage.h" |
|
27 #include "unidatamodelplugininterface.h" |
|
28 |
|
29 class QDateTime; |
|
30 class UniViewerFeeder; |
|
31 class CMsvSession; |
|
32 class UniDataModelPluginInterface; |
|
33 class UniDataModelLoader; |
|
34 |
|
35 /** |
|
36 * UniViewerFeederPrivate |
|
37 * Feeder Private class for unified viewer. Fetches data from the |
|
38 * message store for the given message id. |
|
39 */ |
|
40 class UniViewerFeederPrivate |
|
41 { |
|
42 public: |
|
43 /** |
|
44 * Destructor. |
|
45 */ |
|
46 ~UniViewerFeederPrivate(); |
|
47 |
|
48 /** |
|
49 * Constructor |
|
50 * @param msgId message id. |
|
51 * @param feeder feeder object. |
|
52 */ |
|
53 UniViewerFeederPrivate(qint32 msdId, |
|
54 UniViewerFeeder* feeder); |
|
55 |
|
56 /** |
|
57 * Fetches message details from the store. |
|
58 */ |
|
59 void fetchDetails(); |
|
60 |
|
61 /** |
|
62 * Returns the message type. |
|
63 * @return message type. |
|
64 */ |
|
65 qint32 msgType(); |
|
66 |
|
67 /** |
|
68 * Returns the time stamp. |
|
69 * @return time stamp of the message. |
|
70 */ |
|
71 QDateTime timeStamp(); |
|
72 |
|
73 /** |
|
74 * hasAttachments |
|
75 * @return true/false based on if message has attachments |
|
76 */ |
|
77 bool hasAttachments(); |
|
78 |
|
79 /** |
|
80 * attachmentList |
|
81 * @return list of current message's attachments, with size and mimetype info |
|
82 */ |
|
83 UniMessageInfoList attachmentsList(); |
|
84 |
|
85 /** |
|
86 * attachmentCount |
|
87 * @return number of attachments in the message |
|
88 */ |
|
89 int attachmentCount(); |
|
90 |
|
91 /** |
|
92 * objectsList |
|
93 * @return list of current message's objects, with size and mimetype info |
|
94 */ |
|
95 UniMessageInfoList objectsList(); |
|
96 |
|
97 /** |
|
98 * objectCount |
|
99 * @return count of media objects in SMIL presentation. |
|
100 * NOTE: Smil attachment is _not_ counted as object. |
|
101 */ |
|
102 int objectCount(); |
|
103 |
|
104 /** |
|
105 * slideCount |
|
106 * @return count of slides in SMIL presentation. |
|
107 */ |
|
108 int slideCount(); |
|
109 |
|
110 /** |
|
111 * slideContent |
|
112 * @return list of media objects in given slide |
|
113 */ |
|
114 UniMessageInfoList slideContent(int slidenum); |
|
115 |
|
116 /** |
|
117 * Updates the content by fetching new details |
|
118 * @param msgId message id |
|
119 * @param msgType message type |
|
120 */ |
|
121 void updateContent(qint32 msgId); |
|
122 |
|
123 /** |
|
124 * toAddressList |
|
125 * @return list of to address list |
|
126 */ |
|
127 ConvergedMessageAddressList toAddressList(); |
|
128 |
|
129 /** |
|
130 * ccAddressList |
|
131 * @return list of cc address list |
|
132 */ |
|
133 ConvergedMessageAddressList ccAddressList(); |
|
134 /** |
|
135 * messageSize |
|
136 * @return int |
|
137 */ |
|
138 |
|
139 int messageSize(); |
|
140 |
|
141 /** |
|
142 * clearContent |
|
143 * @void |
|
144 */ |
|
145 void clearContent(); |
|
146 |
|
147 /** |
|
148 * get the from address and alias of a message |
|
149 * @param from address |
|
150 * @param alias |
|
151 * @void |
|
152 */ |
|
153 void fromAddressAndAlias(QString& from, QString& alias); |
|
154 |
|
155 /** |
|
156 * whether the message is incoming Or outgoing. |
|
157 * @return bool |
|
158 */ |
|
159 bool isIncoming(); |
|
160 |
|
161 /** |
|
162 * returns the priority of the message. |
|
163 * @return int |
|
164 */ |
|
165 int priority(); |
|
166 |
|
167 /** |
|
168 * gets the subject of the message |
|
169 */ |
|
170 QString subject(); |
|
171 |
|
172 /** |
|
173 * Returns the sending state of the message. |
|
174 */ |
|
175 int sendingState(); |
|
176 |
|
177 private: |
|
178 /** |
|
179 * Fetches message details from the store. |
|
180 */ |
|
181 void fetchDetailsL(); |
|
182 |
|
183 /** |
|
184 * initialise the symbian constructions. |
|
185 */ |
|
186 void initL(qint32 msgId); |
|
187 |
|
188 private: |
|
189 /** |
|
190 * Ptr to QT class UniViewerFeeder. |
|
191 * Not Own. |
|
192 */ |
|
193 UniViewerFeeder* q_ptr; |
|
194 |
|
195 /** |
|
196 * MessageType |
|
197 */ |
|
198 int mMessageType; |
|
199 |
|
200 /** |
|
201 * Msv Entry |
|
202 */ |
|
203 TMsvEntry mEntry; |
|
204 |
|
205 /** |
|
206 * Message Id |
|
207 */ |
|
208 qint32 mMsgId; |
|
209 |
|
210 /** |
|
211 * Slide Count. |
|
212 */ |
|
213 int mSlideCount; |
|
214 |
|
215 /** |
|
216 * interface to fetch data |
|
217 */ |
|
218 UniDataModelPluginInterface* mPluginInterface; |
|
219 |
|
220 /** |
|
221 * plugin loader |
|
222 */ |
|
223 UniDataModelLoader* mPluginLoader; |
|
224 /** |
|
225 * To address list |
|
226 * owned. |
|
227 */ |
|
228 ConvergedMessageAddressList mToAddressList; |
|
229 |
|
230 /** |
|
231 * CC address list |
|
232 * owned. |
|
233 */ |
|
234 ConvergedMessageAddressList mCcAddressList; |
|
235 |
|
236 |
|
237 /** |
|
238 * Msv Session. |
|
239 * not Owned. |
|
240 */ |
|
241 CMsvSession* mSession; |
|
242 |
|
243 }; |
|
244 |
|
245 #endif // UNIVIEWER_FEEDER_PRIVATE_H |
|
246 // EOF |