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: SMS data model plugin. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef UNIVCALDATAPLUGIN_H_ |
|
19 #define UNIVCALDATAPLUGIN_H_ |
|
20 |
|
21 #include <QObject> |
|
22 #include "unidatamodelplugininterface.h" |
|
23 |
|
24 /** |
|
25 * SMS data model plugin. |
|
26 * Implements the processing of a SMS message in Message Store. |
|
27 */ |
|
28 |
|
29 class UniVCalDataPluginPrivate; |
|
30 |
|
31 class UniVCalDataPlugin : public QObject, public UniDataModelPluginInterface |
|
32 { |
|
33 Q_OBJECT |
|
34 Q_INTERFACES(UniDataModelPluginInterface) |
|
35 |
|
36 public: |
|
37 /** |
|
38 * constructor |
|
39 */ |
|
40 UniVCalDataPlugin(QObject* parent = 0); |
|
41 |
|
42 /** |
|
43 * Destructor |
|
44 */ |
|
45 ~UniVCalDataPlugin(); |
|
46 |
|
47 /** |
|
48 * Creates the new instance of the plugin |
|
49 * @return plugin instance |
|
50 */ |
|
51 QObject* createInstance(); |
|
52 |
|
53 /** |
|
54 * Reset the datamodel |
|
55 */ |
|
56 void reset(); |
|
57 |
|
58 /** |
|
59 * sets the message id for which details needs to be fetched |
|
60 * @param message id |
|
61 */ |
|
62 int setMessageId(int mId); |
|
63 |
|
64 /** |
|
65 * Get the body of the message |
|
66 * @param aBodyText, for message body |
|
67 */ |
|
68 void body(QString& aBodyText); |
|
69 |
|
70 /** |
|
71 * size of the message |
|
72 * @return size |
|
73 */ |
|
74 int messageSize(); |
|
75 |
|
76 /** |
|
77 * List of the message TO recipients |
|
78 * @param list of the recipients |
|
79 */ |
|
80 void toRecipientList(ConvergedMessageAddressList& mAddressList); |
|
81 /** |
|
82 * List of the message cc recipients |
|
83 * @param list of the recipients |
|
84 */ |
|
85 void ccRecipientList(ConvergedMessageAddressList& mAddressList); |
|
86 |
|
87 /** |
|
88 * List of the message bCC recipients |
|
89 * @param list of the recipients |
|
90 */ |
|
91 void bccRecipientList(ConvergedMessageAddressList& mAddressList); |
|
92 |
|
93 /** |
|
94 * Address from which the message was received |
|
95 * @param messageAddress |
|
96 */ |
|
97 void fromAddress(QString& messageAddress); |
|
98 |
|
99 /** |
|
100 * No. of attachments with the message |
|
101 * @return attachment count |
|
102 */ |
|
103 int attachmentCount(); |
|
104 |
|
105 /** |
|
106 * To check if the message has attachments |
|
107 * @return true if attachment is present |
|
108 */ |
|
109 bool hasAttachment(); |
|
110 |
|
111 /** |
|
112 * list of attachments for a message |
|
113 * @return attachemnt list |
|
114 */ |
|
115 UniMessageInfoList attachmentList(); |
|
116 |
|
117 /** |
|
118 * Message type (SMS/MMS etc..) |
|
119 * @return type of message |
|
120 */ |
|
121 QString messageType(); |
|
122 |
|
123 /** |
|
124 * Priority of the message (high/low/medium) |
|
125 */ |
|
126 MsgPriority messagePriority(); |
|
127 |
|
128 /** |
|
129 * Number of objects asociated with a MMS message |
|
130 * @return count of objects |
|
131 */ |
|
132 int objectCount(); |
|
133 |
|
134 /** |
|
135 * The MMS object list |
|
136 * @return object list |
|
137 */ |
|
138 UniMessageInfoList objectList(); |
|
139 |
|
140 /** |
|
141 * Number of slides associated with a MMS message |
|
142 * @return count of slides |
|
143 */ |
|
144 int slideCount(); |
|
145 |
|
146 /** |
|
147 * The MMS slide content |
|
148 * @return slide list |
|
149 */ |
|
150 UniMessageInfoList slideContent(int slidenum); |
|
151 |
|
152 /** |
|
153 * Time stamp of the message |
|
154 * @return time stamp of the created/received message |
|
155 */ |
|
156 QDateTime timeStamp(); |
|
157 |
|
158 /** |
|
159 * @see UniDataModelPluginInterface |
|
160 */ |
|
161 void addObject( int aslideNum,UniMessageInfo* aInfo ); |
|
162 |
|
163 /** |
|
164 * @see UniDataModelPluginInterface |
|
165 */ |
|
166 void addTextObject(int aSlideNum,QString aText ); |
|
167 |
|
168 /** |
|
169 * @see UniDataModelPluginInterface |
|
170 */ |
|
171 void addSlide( int aSlideNum ); |
|
172 |
|
173 /** |
|
174 * @see UniDataModelPluginInterface |
|
175 */ |
|
176 void composeSmil(CMsvStore& aEditStore); |
|
177 |
|
178 /** |
|
179 * @see UniDataModelPluginInterface |
|
180 */ |
|
181 void saveObjects(); |
|
182 |
|
183 /** |
|
184 * @see UniDataModelPluginInterface |
|
185 */ |
|
186 TMsvAttachmentId getSmilAttachmentByIndex(); |
|
187 |
|
188 /** |
|
189 * @see UniDataModelPluginInterface |
|
190 */ |
|
191 void restore(CBaseMtm& mtm); |
|
192 |
|
193 /** |
|
194 * @see UniDataModelPluginInterface |
|
195 */ |
|
196 void addAttachment( UniMessageInfo* aInfo ); |
|
197 |
|
198 /** |
|
199 * @see UniDataModelPluginInterface |
|
200 */ |
|
201 void removeSlide(int aSlideNumber); |
|
202 |
|
203 /** |
|
204 * @see UniDataModelPluginInterface |
|
205 */ |
|
206 QString subject(); |
|
207 |
|
208 /** |
|
209 * @see UniDataModelPluginInterface |
|
210 */ |
|
211 CMsvSession* session(); |
|
212 |
|
213 private: |
|
214 UniVCalDataPluginPrivate* d_ptr; |
|
215 }; |
|
216 |
|
217 #endif |
|