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: |
|
15 * |
|
16 */ |
|
17 |
|
18 //SYSTEM INCLUDES |
|
19 #include <mtclreg.h> |
|
20 #include <mtclbase.h> |
|
21 #include <s60qconversions.h> |
|
22 |
|
23 //USER INCLUDES |
|
24 #include "univcaldataplugin.h" |
|
25 #include "univcaldataplugin_p.h" |
|
26 |
|
27 // UniVCalDataPlugin::UniVCalDataPlugin() |
|
28 // @see header |
|
29 //--------------------------------------------------------------- |
|
30 UniVCalDataPlugin::UniVCalDataPlugin(QObject* parent) : |
|
31 QObject(parent) |
|
32 { |
|
33 d_ptr = new UniVCalDataPluginPrivate(this); |
|
34 } |
|
35 |
|
36 // UniVCalDataPlugin::~UniVCalDataPlugin() |
|
37 // @see header |
|
38 //--------------------------------------------------------------- |
|
39 UniVCalDataPlugin::~UniVCalDataPlugin() |
|
40 { |
|
41 delete d_ptr; |
|
42 } |
|
43 |
|
44 // UniVCalDataPlugin::createInstance() |
|
45 // @see header |
|
46 //--------------------------------------------------------------- |
|
47 QObject* UniVCalDataPlugin::createInstance() |
|
48 { |
|
49 return new UniVCalDataPlugin(); |
|
50 } |
|
51 |
|
52 // UniVCalDataPlugin::reset() |
|
53 // @see header |
|
54 //--------------------------------------------------------------- |
|
55 void UniVCalDataPlugin::reset() |
|
56 { |
|
57 d_ptr->reset(); |
|
58 } |
|
59 |
|
60 // UniVCalDataPlugin::setMessageId() |
|
61 // @see header |
|
62 //--------------------------------------------------------------- |
|
63 int UniVCalDataPlugin::setMessageId(int mId) |
|
64 { |
|
65 return d_ptr->setMessageId(mId); |
|
66 } |
|
67 |
|
68 // UniVCalDataPlugin::body() |
|
69 // @see header |
|
70 //--------------------------------------------------------------- |
|
71 void UniVCalDataPlugin::body(QString& aBodyText) |
|
72 { |
|
73 d_ptr->body(aBodyText); |
|
74 } |
|
75 |
|
76 // UniVCalDataPlugin::messageSize() |
|
77 // @see header |
|
78 //--------------------------------------------------------------- |
|
79 qint32 UniVCalDataPlugin::messageSize() |
|
80 { |
|
81 return d_ptr->messageSize(); |
|
82 } |
|
83 |
|
84 // UniVCalDataPlugin::toRecipientList() |
|
85 // @see header |
|
86 //--------------------------------------------------------------- |
|
87 void UniVCalDataPlugin::toRecipientList( |
|
88 ConvergedMessageAddressList& mAddressList) |
|
89 { |
|
90 d_ptr->toRecipientList(mAddressList); |
|
91 } |
|
92 |
|
93 // UniVCalDataPlugin::ccRecipientList() |
|
94 // @see header |
|
95 //--------------------------------------------------------------- |
|
96 void UniVCalDataPlugin::ccRecipientList(ConvergedMessageAddressList& /*mAddressList*/) |
|
97 { |
|
98 |
|
99 } |
|
100 |
|
101 // UniVCalDataPlugin::bccRecipientList() |
|
102 // @see header |
|
103 //--------------------------------------------------------------- |
|
104 |
|
105 void UniVCalDataPlugin::bccRecipientList(ConvergedMessageAddressList& /*mAddressList*/) |
|
106 { |
|
107 |
|
108 } |
|
109 |
|
110 // UniVCalDataPlugin::fromAddress() |
|
111 // @see header |
|
112 //--------------------------------------------------------------- |
|
113 void UniVCalDataPlugin::fromAddress(QString& messageAddress) |
|
114 { |
|
115 d_ptr->fromAddress(messageAddress); |
|
116 } |
|
117 |
|
118 // UniVCalDataPlugin::attachmentList() |
|
119 // @see header |
|
120 //--------------------------------------------------------------- |
|
121 UniMessageInfoList UniVCalDataPlugin::attachmentList() |
|
122 { |
|
123 RFile file = d_ptr->attachmentL(); |
|
124 |
|
125 UniMessageInfoList attlist; |
|
126 |
|
127 QString path; |
|
128 QString mimetype; |
|
129 int size; |
|
130 |
|
131 TFileName fullName; |
|
132 User::LeaveIfError(file.FullName(fullName)); |
|
133 User::LeaveIfError(file.Size(size)); |
|
134 |
|
135 path = S60QConversions::s60DescToQString(*fullName.AllocL()); |
|
136 |
|
137 UniMessageInfo *msgobj = new UniMessageInfo(path, size, mimetype); |
|
138 attlist << msgobj; |
|
139 file.Close(); |
|
140 return attlist; |
|
141 } |
|
142 |
|
143 // UniVCalDataPlugin::messageType() |
|
144 // @see header |
|
145 //--------------------------------------------------------------- |
|
146 QString UniVCalDataPlugin::messageType() |
|
147 { |
|
148 QString str("bio:vcal"); |
|
149 return str; |
|
150 } |
|
151 |
|
152 // UniVCalDataPlugin::messagePriority() |
|
153 // @see header |
|
154 //--------------------------------------------------------------- |
|
155 MsgPriority UniVCalDataPlugin::messagePriority() |
|
156 { |
|
157 return d_ptr->messagePriority(); |
|
158 } |
|
159 |
|
160 // UniVCalDataPlugin::attachmentCount() |
|
161 // @see header |
|
162 //--------------------------------------------------------------- |
|
163 int UniVCalDataPlugin::attachmentCount() |
|
164 { |
|
165 return d_ptr->attachmentCount(); |
|
166 } |
|
167 |
|
168 // UniVCalDataPlugin::hasAttachment() |
|
169 // @see header |
|
170 //--------------------------------------------------------------- |
|
171 bool UniVCalDataPlugin::hasAttachment() |
|
172 { |
|
173 return true; |
|
174 } |
|
175 |
|
176 // UniVCalDataPlugin::objectCount() |
|
177 // @see header |
|
178 //--------------------------------------------------------------- |
|
179 int UniVCalDataPlugin::objectCount() |
|
180 { |
|
181 return 0; |
|
182 } |
|
183 |
|
184 // UniVCalDataPlugin::objectList() |
|
185 // @see header |
|
186 //--------------------------------------------------------------- |
|
187 UniMessageInfoList UniVCalDataPlugin::objectList() |
|
188 { |
|
189 return QList<UniMessageInfo*> (); |
|
190 } |
|
191 |
|
192 // UniVCalDataPlugin::slideCount() |
|
193 // @see header |
|
194 //--------------------------------------------------------------- |
|
195 int UniVCalDataPlugin::slideCount() |
|
196 { |
|
197 return 0; |
|
198 } |
|
199 |
|
200 // UniVCalDataPlugin::slideContent() |
|
201 // @see header |
|
202 //--------------------------------------------------------------- |
|
203 UniMessageInfoList UniVCalDataPlugin::slideContent(int /*slidenum*/) |
|
204 { |
|
205 return QList<UniMessageInfo*> (); |
|
206 } |
|
207 |
|
208 // UniVCalDataPlugin::timeStamp() |
|
209 // @see header |
|
210 //--------------------------------------------------------------- |
|
211 QDateTime UniVCalDataPlugin::timeStamp() |
|
212 { |
|
213 QDateTime retTimeStamp; |
|
214 int tStamp = d_ptr->timeStamp(); |
|
215 retTimeStamp.setTime_t(tStamp); |
|
216 return retTimeStamp; |
|
217 } |
|
218 |
|
219 //--------------------------------------------------------------- |
|
220 // UniVCalDataPlugin::addObject() |
|
221 // @see header |
|
222 //--------------------------------------------------------------- |
|
223 void UniVCalDataPlugin::addObject( int /*aslideNum*/, |
|
224 UniMessageInfo* /*aInfo*/ ) |
|
225 { |
|
226 |
|
227 } |
|
228 |
|
229 //--------------------------------------------------------------- |
|
230 // UniVCalDataPlugin::addTextObject() |
|
231 // @see header |
|
232 //--------------------------------------------------------------- |
|
233 void UniVCalDataPlugin::addTextObject(int /*aSlideNum*/, |
|
234 QString /*aText*/ ) |
|
235 { |
|
236 |
|
237 } |
|
238 |
|
239 //--------------------------------------------------------------- |
|
240 // UniVCalDataPlugin::addSlide() |
|
241 // @see header |
|
242 //--------------------------------------------------------------- |
|
243 void UniVCalDataPlugin::addSlide( int /*aSlideNum*/ ) |
|
244 { |
|
245 |
|
246 } |
|
247 |
|
248 //--------------------------------------------------------------- |
|
249 // UniVCalDataPlugin::composeSmil() |
|
250 // @see header |
|
251 //--------------------------------------------------------------- |
|
252 void UniVCalDataPlugin::composeSmil(CMsvStore& /*aEditStore*/) |
|
253 { |
|
254 |
|
255 } |
|
256 |
|
257 //--------------------------------------------------------------- |
|
258 // UniVCalDataPlugin::saveObjects() |
|
259 // @see header |
|
260 //--------------------------------------------------------------- |
|
261 void UniVCalDataPlugin::saveObjects() |
|
262 { |
|
263 |
|
264 } |
|
265 |
|
266 //--------------------------------------------------------------- |
|
267 // UniVCalDataPlugin::getSmilAttachmentByIndex() |
|
268 // @see header |
|
269 //--------------------------------------------------------------- |
|
270 TMsvAttachmentId UniVCalDataPlugin::getSmilAttachmentByIndex() |
|
271 { |
|
272 return NULL; |
|
273 } |
|
274 |
|
275 //--------------------------------------------------------------- |
|
276 // UniVCalDataPlugin::restore() |
|
277 // @see header |
|
278 //--------------------------------------------------------------- |
|
279 void UniVCalDataPlugin::restore(CBaseMtm& /*mtm*/) |
|
280 { |
|
281 |
|
282 } |
|
283 |
|
284 //--------------------------------------------------------------- |
|
285 // UniVCalDataPlugin::addAttachment() |
|
286 // @see header |
|
287 //--------------------------------------------------------------- |
|
288 void UniVCalDataPlugin::addAttachment( UniMessageInfo* /*aInfo*/ ) |
|
289 { |
|
290 |
|
291 } |
|
292 |
|
293 //--------------------------------------------------------------- |
|
294 // UniVCalDataPlugin::removeSlide() |
|
295 // @see header |
|
296 //--------------------------------------------------------------- |
|
297 void UniVCalDataPlugin::removeSlide(int /*aSlideNumber*/) |
|
298 { |
|
299 |
|
300 } |
|
301 |
|
302 //--------------------------------------------------------------- |
|
303 // UniVCalDataPlugin::subject() |
|
304 // @see header |
|
305 //--------------------------------------------------------------- |
|
306 QString UniVCalDataPlugin::subject() |
|
307 { |
|
308 return QString(); |
|
309 } |
|
310 |
|
311 |
|
312 //--------------------------------------------------------------- |
|
313 // UniVCalDataPlugin::session() |
|
314 // @see header |
|
315 //--------------------------------------------------------------- |
|
316 CMsvSession* UniVCalDataPlugin::session() |
|
317 { |
|
318 return d_ptr->session(); |
|
319 } |
|
320 |
|
321 |
|
322 |
|
323 Q_EXPORT_PLUGIN2(UniVCalDataPlugin, UniVCalDataPlugin) |
|
324 |
|