author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Thu, 17 Dec 2009 09:09:50 +0200 | |
changeset 26 | 5d0ec8b709be |
parent 10 | fc9cf246af83 |
permissions | -rw-r--r-- |
5 | 1 |
/* |
2 |
* Copyright (c) 2007 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 the License "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 |
#include <calentry.h> |
|
19 |
#include <calrrule.h> |
|
20 |
#include <caluser.h> |
|
21 |
||
22 |
#include "entryattributes.h" |
|
23 |
#include "calendarconstants.h" |
|
24 |
||
25 |
// --------------------------------------------------------------------------- |
|
26 |
// CAttendeeInfo::NewL |
|
27 |
// --------------------------------------------------------------------------- |
|
28 |
// |
|
29 |
EXPORT_C CAttendeeInfo* CAttendeeInfo::NewL( const TDesC& aAddress ) |
|
30 |
{ |
|
31 |
CAttendeeInfo* self = new (ELeave) CAttendeeInfo; |
|
32 |
CleanupStack::PushL( self ); |
|
33 |
self->ConstructL( aAddress ); |
|
34 |
CleanupStack::Pop( self ); |
|
35 |
return self; |
|
36 |
} |
|
37 |
||
38 |
// --------------------------------------------------------------------------- |
|
39 |
// Constructor |
|
40 |
// --------------------------------------------------------------------------- |
|
41 |
// |
|
42 |
CAttendeeInfo::CAttendeeInfo() |
|
43 |
{ |
|
44 |
iResponse = EFalse; |
|
45 |
} |
|
46 |
||
47 |
// --------------------------------------------------------------------------- |
|
48 |
// 2nd-phased constructor of two phase construction |
|
49 |
// --------------------------------------------------------------------------- |
|
50 |
// |
|
51 |
void CAttendeeInfo::ConstructL( const TDesC& aAddress ) |
|
52 |
{ |
|
53 |
if( aAddress.Length() ) |
|
54 |
{ |
|
55 |
iAddress = aAddress.AllocL(); |
|
56 |
} |
|
57 |
else |
|
58 |
User::Leave(KErrArgument); |
|
59 |
} |
|
60 |
||
61 |
// --------------------------------------------------------------------------- |
|
62 |
// Destructor |
|
63 |
// --------------------------------------------------------------------------- |
|
64 |
// |
|
65 |
CAttendeeInfo::~CAttendeeInfo() |
|
66 |
{ |
|
67 |
delete iAddress; |
|
68 |
delete iCommonName; |
|
69 |
delete iRole; |
|
70 |
delete iStatus; |
|
71 |
} |
|
72 |
||
73 |
// --------------------------------------------------------------------------- |
|
74 |
// CAttendeeInfo::SetCommonNameL |
|
75 |
// --------------------------------------------------------------------------- |
|
76 |
// |
|
77 |
EXPORT_C void CAttendeeInfo::SetCommonNameL( const TDesC& aName ) |
|
78 |
{ |
|
79 |
if( aName.Length() ) |
|
80 |
{ |
|
81 |
iCommonName = aName.AllocL(); |
|
82 |
} |
|
83 |
} |
|
84 |
||
85 |
// --------------------------------------------------------------------------- |
|
86 |
// CAttendeeInfo::SetRoleL |
|
87 |
// --------------------------------------------------------------------------- |
|
88 |
// |
|
89 |
EXPORT_C void CAttendeeInfo::SetRoleL( const TDesC& aRole ) |
|
90 |
{ |
|
91 |
if( aRole.Length() ) |
|
92 |
{ |
|
93 |
iRole = aRole.AllocL(); |
|
94 |
} |
|
95 |
} |
|
96 |
||
97 |
// --------------------------------------------------------------------------- |
|
98 |
// CAttendeeInfo::SetStatusL |
|
99 |
// --------------------------------------------------------------------------- |
|
100 |
// |
|
101 |
EXPORT_C void CAttendeeInfo::SetStatusL( const TDesC& aStatus ) |
|
102 |
{ |
|
103 |
if( aStatus.Length() ) |
|
104 |
{ |
|
105 |
iStatus = aStatus.AllocL(); |
|
106 |
} |
|
107 |
} |
|
108 |
||
109 |
// --------------------------------------------------------------------------- |
|
110 |
// CAttendeeInfo::SetRsvp |
|
111 |
// --------------------------------------------------------------------------- |
|
112 |
// |
|
113 |
EXPORT_C void CAttendeeInfo::SetRsvp( const TBool aResponse ) |
|
114 |
{ |
|
115 |
iResponse = aResponse; |
|
116 |
} |
|
117 |
||
118 |
// --------------------------------------------------------------------------- |
|
119 |
// CAttendeeInfo::Address |
|
120 |
// --------------------------------------------------------------------------- |
|
121 |
// |
|
122 |
EXPORT_C TPtrC CAttendeeInfo::Address() |
|
123 |
{ |
|
124 |
return iAddress ? TPtrC( *iAddress ) : TPtrC(); |
|
125 |
} |
|
126 |
||
127 |
// --------------------------------------------------------------------------- |
|
128 |
// CAttendeeInfo::CommonName |
|
129 |
// --------------------------------------------------------------------------- |
|
130 |
// |
|
131 |
EXPORT_C TPtrC CAttendeeInfo::CommonName() |
|
132 |
{ |
|
133 |
return iCommonName ? TPtrC( *iCommonName ) : TPtrC(); |
|
134 |
} |
|
135 |
||
136 |
// --------------------------------------------------------------------------- |
|
137 |
// CAttendeeInfo::Role |
|
138 |
// --------------------------------------------------------------------------- |
|
139 |
// |
|
140 |
EXPORT_C TPtrC CAttendeeInfo::Role() |
|
141 |
{ |
|
142 |
return iRole ? TPtrC( *iRole ) : TPtrC(); |
|
143 |
} |
|
144 |
||
145 |
||
146 |
// --------------------------------------------------------------------------- |
|
147 |
// CAttendeeInfo::Statuse |
|
148 |
// --------------------------------------------------------------------------- |
|
149 |
// |
|
150 |
EXPORT_C TPtrC CAttendeeInfo::Status() |
|
151 |
{ |
|
152 |
return iStatus ? TPtrC( *iStatus ) : TPtrC(); |
|
153 |
} |
|
154 |
||
155 |
// --------------------------------------------------------------------------- |
|
156 |
// CAttendeeInfo::ResponseRequested |
|
157 |
// --------------------------------------------------------------------------- |
|
158 |
// |
|
159 |
EXPORT_C TBool CAttendeeInfo::ResponseRequested() |
|
160 |
{ |
|
161 |
return iResponse; |
|
162 |
} |
|
163 |
||
164 |
// --------------------------------------------------------------------------- |
|
165 |
// CRepeatInfo::NewL |
|
166 |
// --------------------------------------------------------------------------- |
|
167 |
// |
|
168 |
EXPORT_C CRepeatInfo* CRepeatInfo::NewL( const TInt aType ) |
|
169 |
{ |
|
170 |
CRepeatInfo* self = new (ELeave) CRepeatInfo; |
|
171 |
CleanupStack::PushL( self ); |
|
172 |
self->ConstructL( aType ); |
|
173 |
CleanupStack::Pop( self ); |
|
174 |
return self; |
|
175 |
} |
|
176 |
||
177 |
// --------------------------------------------------------------------------- |
|
178 |
// Constructor |
|
179 |
// --------------------------------------------------------------------------- |
|
180 |
// |
|
181 |
CRepeatInfo::CRepeatInfo() |
|
182 |
{ |
|
183 |
iInterval = 1; |
|
184 |
iType = TCalRRule::EInvalid; |
|
185 |
} |
|
186 |
||
187 |
// --------------------------------------------------------------------------- |
|
188 |
// 2nd-phased constructor of two phase construction |
|
189 |
// --------------------------------------------------------------------------- |
|
190 |
// |
|
191 |
void CRepeatInfo::ConstructL( const TInt aType ) |
|
192 |
{ |
|
193 |
if ( aType == KRRTypeDaily ) |
|
194 |
iType = TCalRRule::EDaily; |
|
195 |
||
196 |
else if ( aType == KRRTypeWeekly ) |
|
197 |
iType = TCalRRule::EWeekly; |
|
198 |
||
199 |
else if ( aType == KRRTypeMonthly ) |
|
200 |
iType = TCalRRule::EMonthly; |
|
201 |
||
202 |
else if ( aType == KRRTypeYearly ) |
|
203 |
iType = TCalRRule::EYearly; |
|
204 |
||
205 |
else |
|
206 |
User::Leave(KErrArgument); |
|
207 |
||
208 |
iRule.SetType( iType ); |
|
209 |
} |
|
210 |
||
211 |
// --------------------------------------------------------------------------- |
|
212 |
// Destructor |
|
213 |
// --------------------------------------------------------------------------- |
|
214 |
// |
|
215 |
CRepeatInfo::~CRepeatInfo() |
|
216 |
{ |
|
217 |
iMonthDays.Close(); |
|
218 |
iMonthDates.Close(); |
|
219 |
iWeekDays.Close(); |
|
220 |
} |
|
221 |
||
222 |
// --------------------------------------------------------------------------- |
|
223 |
// CRepeatInfo::SetCount |
|
224 |
// --------------------------------------------------------------------------- |
|
225 |
// |
|
226 |
EXPORT_C void CRepeatInfo::SetCount( const TUint aCount ) |
|
227 |
{ |
|
228 |
iRule.SetCount( aCount ); |
|
229 |
} |
|
230 |
||
231 |
// --------------------------------------------------------------------------- |
|
232 |
// CRepeatInfo::SetUntilTimeL |
|
233 |
// --------------------------------------------------------------------------- |
|
234 |
// |
|
235 |
EXPORT_C void CRepeatInfo::SetUntilTimeL( const TTime& aUntilTime ) |
|
236 |
{ |
|
237 |
if( aUntilTime < TCalTime::MinTime() || aUntilTime > TCalTime::MaxTime() ) |
|
238 |
User::Leave( KErrArgument ); |
|
239 |
||
240 |
iUntilTime.SetTimeUtcL( aUntilTime ); |
|
241 |
iRule.SetUntil( iUntilTime ); |
|
242 |
} |
|
243 |
||
244 |
// --------------------------------------------------------------------------- |
|
245 |
// CRepeatInfo::SetStartTimeL |
|
246 |
// --------------------------------------------------------------------------- |
|
247 |
// |
|
248 |
EXPORT_C void CRepeatInfo::SetStartTimeL( const TTime& aStartTime ) |
|
249 |
{ |
|
250 |
if( aStartTime < TCalTime::MinTime() || aStartTime > TCalTime::MaxTime() ) |
|
251 |
User::Leave( KErrArgument ); |
|
252 |
||
253 |
iStartTime.SetTimeUtcL( aStartTime ); |
|
254 |
iRule.SetDtStart( iStartTime ); |
|
255 |
} |
|
256 |
||
257 |
// --------------------------------------------------------------------------- |
|
258 |
// CRepeatInfo::SetInterval |
|
259 |
// --------------------------------------------------------------------------- |
|
260 |
// |
|
261 |
EXPORT_C void CRepeatInfo::SetInterval( const TInt aInterval ) |
|
262 |
{ |
|
263 |
iInterval = aInterval; |
|
264 |
iRule.SetInterval( iInterval ); |
|
265 |
} |
|
266 |
||
267 |
// --------------------------------------------------------------------------- |
|
268 |
// CRepeatInfo::SetDaysInWeek |
|
269 |
// --------------------------------------------------------------------------- |
|
270 |
// |
|
271 |
EXPORT_C void CRepeatInfo::SetDaysInWeek( const RArray<TDay>& aDays ) |
|
272 |
{ |
|
273 |
if( iType == TCalRRule::EWeekly ) |
|
274 |
{ |
|
275 |
for( int i=0 ; i<aDays.Count() ; i++) |
|
276 |
iWeekDays.Append( aDays[i] ); |
|
277 |
iRule.SetByDay( iWeekDays ); |
|
278 |
} |
|
279 |
} |
|
280 |
||
281 |
// --------------------------------------------------------------------------- |
|
282 |
// CRepeatInfo::SetMonthDates |
|
283 |
// --------------------------------------------------------------------------- |
|
284 |
// |
|
285 |
EXPORT_C void CRepeatInfo::SetMonthDates( const RArray<TInt>& aMonthDates ) |
|
286 |
{ |
|
287 |
if( iType == TCalRRule::EMonthly ) |
|
288 |
{ |
|
289 |
// sets the month dates for the monthly repeat |
|
290 |
for( int i=0 ; i<aMonthDates.Count() ; i++) |
|
291 |
iMonthDates.Append( aMonthDates[i] ); |
|
292 |
iRule.SetByMonthDay( iMonthDates ); |
|
293 |
} |
|
294 |
||
295 |
} |
|
296 |
||
297 |
// --------------------------------------------------------------------------- |
|
298 |
// CRepeatInfo::SetMonthDays |
|
299 |
// --------------------------------------------------------------------------- |
|
300 |
// |
|
301 |
EXPORT_C void CRepeatInfo::SetMonthDays( const RArray<TCalRRule::TDayOfMonth>& aDays ) |
|
302 |
{ |
|
303 |
if( iType == TCalRRule::EMonthly || iType == TCalRRule::EYearly ) |
|
304 |
{ |
|
305 |
TInt count = aDays.Count(); |
|
306 |
// sets the days of the month for monthly and yearly repeats |
|
307 |
for( TInt i=0 ; i < count ; i++) |
|
308 |
{ |
|
309 |
iMonthDays.Append( aDays[i] ); |
|
310 |
} |
|
311 |
iRule.SetByDay( iMonthDays ); |
|
312 |
} |
|
313 |
||
314 |
} |
|
315 |
||
316 |
// --------------------------------------------------------------------------- |
|
317 |
// CRepeatInfo::SetMonth |
|
318 |
// --------------------------------------------------------------------------- |
|
319 |
// |
|
320 |
EXPORT_C void CRepeatInfo::SetMonth( const TInt aMonth) |
|
321 |
{ |
|
322 |
// sets the month for a yearly repeat |
|
323 |
if( iType == TCalRRule::EYearly ) |
|
324 |
{ |
|
325 |
iMonth = TMonth( aMonth ); |
|
326 |
RArray<TMonth> monthList; |
|
327 |
monthList.Append( iMonth ); |
|
328 |
iRule.SetByMonth( monthList ); |
|
329 |
} |
|
330 |
} |
|
331 |
||
332 |
// --------------------------------------------------------------------------- |
|
333 |
// CRepeatInfo::SetWeekStart |
|
334 |
// --------------------------------------------------------------------------- |
|
335 |
// |
|
336 |
EXPORT_C void CRepeatInfo::SetWeekStart( const TInt aDay ) |
|
337 |
{ |
|
338 |
iWkSt = TDay( aDay ); |
|
339 |
iRule.SetWkSt( iWkSt ); |
|
340 |
} |
|
341 |
||
342 |
// --------------------------------------------------------------------------- |
|
343 |
// CRepeatInfo::WeekStart |
|
344 |
// --------------------------------------------------------------------------- |
|
345 |
// |
|
346 |
EXPORT_C TDay CRepeatInfo::WeekStart() |
|
347 |
{ |
|
348 |
return iWkSt; |
|
349 |
} |
|
350 |
||
351 |
// --------------------------------------------------------------------------- |
|
352 |
// CRepeatInfo::Month |
|
353 |
// --------------------------------------------------------------------------- |
|
354 |
// |
|
355 |
EXPORT_C TMonth CRepeatInfo::Month() |
|
356 |
{ |
|
357 |
return iMonth; |
|
358 |
} |
|
359 |
||
360 |
// --------------------------------------------------------------------------- |
|
361 |
// CRepeatInfo::DaysInWeek |
|
362 |
// --------------------------------------------------------------------------- |
|
363 |
// |
|
364 |
EXPORT_C RArray<TDay>& CRepeatInfo::DaysInWeek() |
|
365 |
{ |
|
366 |
return iWeekDays; |
|
367 |
} |
|
368 |
||
369 |
// --------------------------------------------------------------------------- |
|
370 |
// CRepeatInfo::DaysInMonth |
|
371 |
// --------------------------------------------------------------------------- |
|
372 |
// |
|
373 |
EXPORT_C RArray<TCalRRule::TDayOfMonth>& CRepeatInfo::DaysInMonth() |
|
374 |
{ |
|
375 |
return iMonthDays; |
|
376 |
} |
|
377 |
||
378 |
// --------------------------------------------------------------------------- |
|
379 |
// CRepeatInfo::DatesInMonth |
|
380 |
// --------------------------------------------------------------------------- |
|
381 |
// |
|
382 |
EXPORT_C RArray<TInt>& CRepeatInfo::DatesInMonth() |
|
383 |
{ |
|
384 |
return iMonthDates; |
|
385 |
} |
|
386 |
||
387 |
// --------------------------------------------------------------------------- |
|
388 |
// CRepeatInfo::Interval |
|
389 |
// --------------------------------------------------------------------------- |
|
390 |
// |
|
391 |
EXPORT_C TInt CRepeatInfo::Interval() |
|
392 |
{ |
|
393 |
return iInterval; |
|
394 |
} |
|
395 |
||
396 |
// --------------------------------------------------------------------------- |
|
397 |
// CRepeatInfo::UntilDate |
|
398 |
// --------------------------------------------------------------------------- |
|
399 |
// |
|
400 |
EXPORT_C TCalTime& CRepeatInfo::UntilDate() |
|
401 |
{ |
|
402 |
return iUntilTime; |
|
403 |
} |
|
404 |
||
405 |
// --------------------------------------------------------------------------- |
|
406 |
// CRepeatInfo::Type |
|
407 |
// --------------------------------------------------------------------------- |
|
408 |
// |
|
409 |
EXPORT_C TCalRRule::TType CRepeatInfo::Type() |
|
410 |
{ |
|
411 |
return iType; |
|
412 |
} |
|
413 |
||
414 |
// --------------------------------------------------------------------------- |
|
415 |
// CRepeatInfo::GetRepeatRule |
|
416 |
// --------------------------------------------------------------------------- |
|
417 |
// |
|
418 |
EXPORT_C TCalRRule& CRepeatInfo::GetRepeatRule() |
|
419 |
{ |
|
420 |
return iRule; |
|
421 |
} |
|
422 |
||
423 |
// --------------------------------------------------------------------------- |
|
424 |
// CEntryAttributes::NewL |
|
425 |
// --------------------------------------------------------------------------- |
|
426 |
// |
|
427 |
EXPORT_C CEntryAttributes* CEntryAttributes::NewL( const TDesC& aType ) |
|
428 |
{ |
|
429 |
CEntryAttributes* self = new (ELeave) CEntryAttributes; |
|
430 |
CleanupStack::PushL( self ); |
|
431 |
self->ConstructL( aType ); |
|
432 |
CleanupStack::Pop( self ); |
|
433 |
return self; |
|
434 |
} |
|
435 |
||
436 |
// --------------------------------------------------------------------------- |
|
437 |
// CEntryAttributes::NewL |
|
438 |
// --------------------------------------------------------------------------- |
|
439 |
// |
|
440 |
EXPORT_C CEntryAttributes* CEntryAttributes::NewL() |
|
441 |
{ |
|
442 |
return new (ELeave) CEntryAttributes; |
|
443 |
} |
|
444 |
||
445 |
// --------------------------------------------------------------------------- |
|
446 |
// Destructor |
|
447 |
// --------------------------------------------------------------------------- |
|
448 |
// |
|
449 |
CEntryAttributes::~CEntryAttributes() |
|
450 |
{ |
|
451 |
delete iSummary; |
|
452 |
delete iDescription; |
|
453 |
delete iLocation; |
|
454 |
delete iPhoneOwner; |
|
455 |
delete iOrganizer; |
|
10
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
456 |
delete iUid; |
5 | 457 |
iRepeatDates.Close(); |
458 |
iExDates.Close(); |
|
459 |
||
460 |
iAttendees.ResetAndDestroy(); |
|
461 |
} |
|
462 |
||
463 |
// --------------------------------------------------------------------------- |
|
464 |
// CEntryAttributes::ConstructL |
|
465 |
// --------------------------------------------------------------------------- |
|
466 |
// |
|
467 |
void CEntryAttributes::ConstructL( const TDesC& aType ) |
|
468 |
{ |
|
469 |
SetTypeL( aType ); |
|
470 |
iStartTime.SetTimeUtcL( Time::NullTTime() ); |
|
471 |
iEndTime.SetTimeUtcL( Time::NullTTime() ); |
|
472 |
} |
|
473 |
||
474 |
// --------------------------------------------------------------------------- |
|
475 |
// CEntryAttributes::SetTypeL |
|
476 |
// --------------------------------------------------------------------------- |
|
477 |
// |
|
478 |
EXPORT_C void CEntryAttributes::SetTypeL( const TDesC& aType ) |
|
479 |
{ |
|
480 |
if ( aType.CompareF(KEntryAppt) == 0 ) |
|
481 |
iType = CCalEntry::EAppt; // apointment entry |
|
482 |
||
483 |
else if ( aType.CompareF(KEntryTodo) == 0 ) |
|
484 |
iType = CCalEntry::ETodo; // todo entry |
|
485 |
||
486 |
else if ( aType.CompareF(KEntryEvent) == 0 ) |
|
487 |
iType = CCalEntry::EEvent; // event entry |
|
488 |
||
489 |
else if ( aType.CompareF(KEntryReminder) == 0 ) |
|
490 |
iType = CCalEntry::EReminder; // reminder entry |
|
491 |
||
492 |
else if ( aType.CompareF(KEntryAnniv) == 0 ) |
|
493 |
iType = CCalEntry::EAnniv; // anniversary entry |
|
494 |
||
495 |
else |
|
496 |
User::Leave(KErrArgument); |
|
497 |
||
498 |
iSetAttributes |= EEntryType; |
|
499 |
} |
|
500 |
||
501 |
||
502 |
// --------------------------------------------------------------------------- |
|
503 |
// CEntryAttributes::SetStartTimeL |
|
504 |
// --------------------------------------------------------------------------- |
|
505 |
// |
|
506 |
EXPORT_C void CEntryAttributes::SetStartTimeL( const TTime& aStartTime ) |
|
507 |
{ |
|
508 |
if ( aStartTime != Time::NullTTime()) |
|
509 |
{ |
|
510 |
if( aStartTime < TCalTime::MinTime() || aStartTime > TCalTime::MaxTime() ) |
|
511 |
User::Leave( KErrArgument ); |
|
512 |
||
513 |
iSetAttributes |= EStartTime; |
|
514 |
iStartTime.SetTimeUtcL( aStartTime ); |
|
515 |
} |
|
516 |
} |
|
517 |
||
518 |
// --------------------------------------------------------------------------- |
|
519 |
// CEntryAttributes::SetEndTimeL |
|
520 |
// --------------------------------------------------------------------------- |
|
521 |
// |
|
522 |
EXPORT_C void CEntryAttributes::SetEndTimeL( const TTime& aEndTime ) |
|
523 |
{ |
|
524 |
if ( aEndTime != Time::NullTTime() ) |
|
525 |
{ |
|
526 |
if( aEndTime < TCalTime::MinTime() || aEndTime > TCalTime::MaxTime() ) |
|
527 |
User::Leave( KErrArgument ); |
|
528 |
||
529 |
iEndTime.SetTimeUtcL( aEndTime ); |
|
530 |
iSetAttributes |= EEndTime; |
|
531 |
} |
|
532 |
} |
|
533 |
||
534 |
// --------------------------------------------------------------------------- |
|
535 |
// CEntryAttributes::SetInstanceStartTimeL |
|
536 |
// --------------------------------------------------------------------------- |
|
537 |
// |
|
538 |
EXPORT_C void CEntryAttributes::SetInstanceStartTimeL( const TTime& aInsTime ) |
|
539 |
{ |
|
540 |
if ( aInsTime != Time::NullTTime() ) |
|
541 |
{ |
|
542 |
if( aInsTime < TCalTime::MinTime() || aInsTime > TCalTime::MaxTime() ) |
|
543 |
User::Leave( KErrArgument ); |
|
544 |
||
545 |
iInstanceStartTime.SetTimeUtcL( aInsTime ); |
|
546 |
iSetAttributes |= EInsStartTime; |
|
547 |
||
548 |
} |
|
549 |
} |
|
550 |
||
551 |
// --------------------------------------------------------------------------- |
|
552 |
// CEntryAttributes::SetAlarm |
|
553 |
// --------------------------------------------------------------------------- |
|
554 |
// |
|
555 |
EXPORT_C void CEntryAttributes::SetAlarm( const TTime& aAlarmTime) |
|
556 |
{ |
|
557 |
if( aAlarmTime < TCalTime::MinTime() || aAlarmTime > TCalTime::MaxTime() ) |
|
558 |
User::Leave( KErrArgument ); |
|
559 |
||
560 |
iAlarmTime = aAlarmTime; |
|
561 |
iSetAttributes |= EAlarmTime; |
|
562 |
} |
|
563 |
||
564 |
// --------------------------------------------------------------------------- |
|
565 |
// CEntryAttributes::SetSequenceNumber |
|
566 |
// --------------------------------------------------------------------------- |
|
567 |
// |
|
568 |
EXPORT_C void CEntryAttributes::SetSequenceNumber( TInt aSeqNum ) |
|
569 |
{ |
|
570 |
iSequenceNum = aSeqNum; |
|
571 |
iSetAttributes |= ESeqNum; |
|
572 |
} |
|
573 |
||
574 |
// --------------------------------------------------------------------------- |
|
575 |
// CEntryAttributes::SetEntryStatusL |
|
576 |
// --------------------------------------------------------------------------- |
|
577 |
// |
|
578 |
EXPORT_C void CEntryAttributes::SetEntryStatusL( const TDesC& aStatus ) |
|
579 |
{ |
|
580 |
if ( aStatus.CompareF(KNullStatus) == 0 ) |
|
581 |
iEntryStatus = CCalEntry::ENullStatus; // null status |
|
582 |
||
583 |
else if ( aStatus.CompareF(KStatusTentative) == 0 ) |
|
584 |
iEntryStatus = CCalEntry::ETentative; // status is tentative |
|
585 |
||
586 |
else if ( aStatus.CompareF(KStatusConfirmed) == 0 ) |
|
587 |
iEntryStatus = CCalEntry::EConfirmed; // status is confirmed |
|
588 |
||
589 |
else if ( aStatus.CompareF(KStatusCancelled) == 0 ) |
|
590 |
iEntryStatus = CCalEntry::ECancelled; // status is cancelled |
|
591 |
||
592 |
else if ( aStatus.CompareF(KStatusTodoNeedsAction) == 0 ) |
|
593 |
iEntryStatus = CCalEntry::ETodoNeedsAction; //status of todo is needs action |
|
594 |
||
595 |
else if ( aStatus.CompareF(KStatusTodoCompleted) == 0 ) |
|
596 |
iEntryStatus = CCalEntry::ETodoCompleted;//status of todo is completed |
|
597 |
||
598 |
else if ( aStatus.CompareF(KStatusTodoInProcess) == 0 ) |
|
599 |
iEntryStatus = CCalEntry::ETodoInProcess; // status of todo is in process |
|
600 |
||
601 |
else |
|
602 |
User::Leave(KErrArgument); |
|
603 |
||
604 |
iSetAttributes |= EStatus; |
|
605 |
} |
|
606 |
||
607 |
// --------------------------------------------------------------------------- |
|
608 |
// CEntryAttributes::SetPhoneOwnerDataL |
|
609 |
// --------------------------------------------------------------------------- |
|
610 |
// |
|
611 |
EXPORT_C void CEntryAttributes::SetPhoneOwnerDataL( const TDesC& aPhoneOwner ) |
|
612 |
{ |
|
613 |
if( aPhoneOwner.Length() ) |
|
614 |
{ |
|
615 |
iPhoneOwner = aPhoneOwner.AllocL(); |
|
616 |
iSetAttributes |= EPhoneOwner; |
|
617 |
} |
|
618 |
} |
|
619 |
||
620 |
// --------------------------------------------------------------------------- |
|
621 |
// CEntryAttributes::SetOrganizerDataL |
|
622 |
// --------------------------------------------------------------------------- |
|
623 |
// |
|
624 |
EXPORT_C void CEntryAttributes::SetOrganizerDataL( CAttendeeInfo* aOrganizer ) |
|
625 |
{ |
|
626 |
if( aOrganizer ) |
|
627 |
{ |
|
628 |
iOrganizer = CCalUser::NewL( aOrganizer->Address() ); |
|
629 |
||
630 |
if( aOrganizer->CommonName().Length() ) |
|
631 |
iOrganizer->SetCommonNameL( aOrganizer->CommonName() ); |
|
632 |
||
633 |
iSetAttributes |= EOrganizer; |
|
634 |
} |
|
635 |
} |
|
636 |
||
637 |
// --------------------------------------------------------------------------- |
|
638 |
// CEntryAttributes::AddAttendeeL |
|
639 |
// --------------------------------------------------------------------------- |
|
640 |
// |
|
641 |
EXPORT_C void CEntryAttributes::AddAttendeeL( CAttendeeInfo* aAttendee ) |
|
642 |
{ |
|
643 |
if( aAttendee ) |
|
644 |
{ |
|
645 |
CCalAttendee* attendee = CCalAttendee::NewL( aAttendee->Address() ); |
|
646 |
if( aAttendee->CommonName().Length() ) |
|
647 |
attendee->SetCommonNameL( aAttendee->CommonName() ); |
|
648 |
TPtrC role = aAttendee->Role(); |
|
649 |
if( role.Length() ) |
|
650 |
{ |
|
651 |
CCalAttendee::TCalRole attRole = CCalAttendee::EReqParticipant; |
|
652 |
||
653 |
if ( role.CompareF(KAttRoleReqParticipant) == 0 ) |
|
654 |
attRole = CCalAttendee::EReqParticipant; // required participant |
|
655 |
||
656 |
else if ( role.CompareF(KAttRoleOptParticipant) == 0 ) |
|
657 |
attRole = CCalAttendee::EOptParticipant; // optional participant |
|
658 |
||
659 |
else if ( role.CompareF(KAttRoleNonParticipant) == 0 ) |
|
660 |
attRole = CCalAttendee::ENonParticipant; // non - participant |
|
661 |
||
662 |
else if ( role.CompareF(KAttRoleChair) == 0 ) |
|
663 |
attRole = CCalAttendee::EChair; // chair |
|
664 |
||
665 |
else |
|
666 |
User::Leave(KErrArgument); |
|
667 |
||
668 |
attendee->SetRoleL( attRole ); |
|
669 |
} |
|
670 |
||
671 |
TPtrC status = aAttendee->Status(); |
|
672 |
if( status.Length() ) |
|
673 |
{ |
|
674 |
CCalAttendee::TCalStatus attStatus = CCalAttendee::ENeedsAction; |
|
675 |
||
676 |
if ( status.CompareF(KAttStatusTentative) == 0 ) |
|
677 |
attStatus = CCalAttendee::ETentative; // attendee's status is tentative |
|
678 |
||
679 |
else if ( status.CompareF(KAttStatusConfirmed) == 0 ) |
|
680 |
attStatus = CCalAttendee::EConfirmed; // attendee has confirmed participation |
|
681 |
||
682 |
else if ( status.CompareF(KAttStatusAccepted) == 0 ) |
|
683 |
attStatus = CCalAttendee::EAccepted; // attendee has accepted |
|
684 |
||
685 |
else if ( status.CompareF(KAttStatusNeedsAction) == 0 ) |
|
686 |
attStatus = CCalAttendee::ENeedsAction; // status needs action |
|
687 |
||
688 |
else if ( status.CompareF(KAttStatusDeclined) == 0 ) |
|
689 |
attStatus = CCalAttendee::EDeclined;// attendee has declined |
|
690 |
||
691 |
else if ( status.CompareF(KAttStatusInProcess) == 0 ) |
|
692 |
attStatus = CCalAttendee::EInProcess;// status in process |
|
693 |
||
694 |
else if ( status.CompareF(KAttStatusCompleted) == 0 ) |
|
695 |
attStatus = CCalAttendee::ECompleted; // status is completed |
|
696 |
||
697 |
else if ( status.CompareF(KAttStatusDelegated) == 0 ) |
|
698 |
attStatus = CCalAttendee::EDelegated;// attendee has delegated request |
|
699 |
||
700 |
else |
|
701 |
User::Leave(KErrArgument); |
|
702 |
||
703 |
attendee->SetStatusL( attStatus ); |
|
704 |
} |
|
705 |
attendee->SetResponseRequested( aAttendee->ResponseRequested() ); |
|
706 |
iAttendees.AppendL( attendee ); |
|
707 |
iSetAttributes |= EAttendees; |
|
708 |
} |
|
709 |
} |
|
710 |
||
711 |
// --------------------------------------------------------------------------- |
|
712 |
// CEntryAttributes::AddRepeatDateL |
|
713 |
// --------------------------------------------------------------------------- |
|
714 |
// |
|
715 |
EXPORT_C void CEntryAttributes::AddRepeatDateL( const TTime& aRepeatDate ) |
|
716 |
{ |
|
717 |
if ( aRepeatDate != Time::NullTTime()) |
|
718 |
{ |
|
719 |
TCalTime caltime; |
|
720 |
caltime.SetTimeUtcL( aRepeatDate ); |
|
721 |
iRepeatDates.Append( caltime ); |
|
722 |
iSetAttributes |= ERepeatDates; |
|
723 |
} |
|
724 |
} |
|
725 |
||
726 |
// --------------------------------------------------------------------------- |
|
727 |
// CEntryAttributes::AddExceptionDateL |
|
728 |
// --------------------------------------------------------------------------- |
|
729 |
// |
|
730 |
EXPORT_C void CEntryAttributes::AddExceptionDateL( const TTime& aExDate ) |
|
731 |
{ |
|
732 |
if ( aExDate != Time::NullTTime()) |
|
733 |
{ |
|
734 |
TCalTime caltime; |
|
735 |
caltime.SetTimeUtcL( aExDate ); |
|
736 |
iExDates.Append( caltime ); |
|
737 |
iSetAttributes |= EExDates; |
|
738 |
} |
|
739 |
} |
|
740 |
||
741 |
// --------------------------------------------------------------------------- |
|
742 |
// CEntryAttributes::SetReplicationL |
|
743 |
// --------------------------------------------------------------------------- |
|
744 |
// |
|
745 |
EXPORT_C void CEntryAttributes::SetReplicationL( const TDesC& aRepStatus ) |
|
746 |
{ |
|
747 |
if ( aRepStatus.CompareF( KReplOpen ) == 0 ) |
|
748 |
iRepStatus = CCalEntry::EOpen; // open |
|
749 |
else if ( aRepStatus.CompareF( KReplPrivate ) == 0 ) |
|
750 |
iRepStatus = CCalEntry::EPrivate; //private |
|
751 |
else if ( aRepStatus.CompareF( KReplRest ) == 0 ) |
|
752 |
iRepStatus = CCalEntry::ERestricted;//restricted |
|
753 |
else |
|
754 |
User::Leave(KErrArgument); |
|
755 |
||
756 |
iSetAttributes |= EReplication; |
|
757 |
} |
|
758 |
||
759 |
// --------------------------------------------------------------------------- |
|
760 |
// CEntryAttributes::SetSummaryL |
|
761 |
// --------------------------------------------------------------------------- |
|
762 |
// |
|
763 |
EXPORT_C void CEntryAttributes::SetSummaryL( const TDesC& aSummary ) |
|
764 |
{ |
|
765 |
if( aSummary.Length() ) |
|
766 |
{ |
|
767 |
iSummary = aSummary.AllocL(); |
|
768 |
iSetAttributes |= ESummary; |
|
769 |
} |
|
770 |
} |
|
771 |
||
772 |
// --------------------------------------------------------------------------- |
|
773 |
// CEntryAttributes::SetDescriptionL |
|
774 |
// --------------------------------------------------------------------------- |
|
775 |
// |
|
776 |
EXPORT_C void CEntryAttributes::SetDescriptionL( const TDesC& aDescription ) |
|
777 |
{ |
|
778 |
if( aDescription.Length() ) |
|
779 |
{ |
|
780 |
iDescription = aDescription.AllocL(); |
|
781 |
iSetAttributes |= EDescription; |
|
782 |
} |
|
783 |
} |
|
784 |
||
785 |
// --------------------------------------------------------------------------- |
|
786 |
// CEntryAttributes::SetLocationL |
|
787 |
// --------------------------------------------------------------------------- |
|
788 |
// |
|
789 |
EXPORT_C void CEntryAttributes::SetLocationL( const TDesC& aLocation ) |
|
790 |
{ |
|
791 |
if( aLocation.Length() ) |
|
792 |
{ |
|
793 |
iLocation = aLocation.AllocL(); |
|
794 |
iSetAttributes |= ELocation; |
|
795 |
} |
|
796 |
} |
|
797 |
||
798 |
// --------------------------------------------------------------------------- |
|
799 |
// CEntryAttributes::SetMethodL |
|
800 |
// --------------------------------------------------------------------------- |
|
801 |
// |
|
802 |
EXPORT_C void CEntryAttributes::SetMethodL( const TDesC& aMethod ) |
|
803 |
{ |
|
804 |
//Sets the entry's method property for group scheduling |
|
805 |
if ( aMethod.CompareF(KMethodNone) == 0 ) |
|
806 |
iMethod = CCalEntry::EMethodNone; |
|
807 |
||
808 |
else if ( aMethod.CompareF(KMethodPublish) == 0 ) |
|
809 |
iMethod = CCalEntry::EMethodPublish; |
|
810 |
||
811 |
else if ( aMethod.CompareF(KMethodRequest) == 0 ) |
|
812 |
iMethod = CCalEntry::EMethodRequest; |
|
813 |
||
814 |
else if ( aMethod.CompareF(KMethodReply) == 0 ) |
|
815 |
iMethod = CCalEntry::EMethodReply; |
|
816 |
||
817 |
else if ( aMethod.CompareF(KMethodAdd) == 0 ) |
|
818 |
iMethod = CCalEntry::EMethodAdd; |
|
819 |
||
820 |
else if ( aMethod.CompareF(KMethodCancel) == 0 ) |
|
821 |
iMethod = CCalEntry::EMethodCancel; |
|
822 |
||
823 |
else if ( aMethod.CompareF(KMethodRefresh) == 0 ) |
|
824 |
iMethod = CCalEntry::EMethodRefresh; |
|
825 |
||
826 |
else if ( aMethod.CompareF(KMethodCounter) == 0 ) |
|
827 |
iMethod = CCalEntry::EMethodCounter; |
|
828 |
||
829 |
else if ( aMethod.CompareF(KMethodDecCounter) == 0 ) |
|
830 |
iMethod = CCalEntry::EMethodDeclineCounter; |
|
831 |
||
832 |
else |
|
833 |
User::Leave(KErrArgument); |
|
834 |
||
835 |
iSetAttributes |= EMethod; |
|
836 |
} |
|
837 |
||
838 |
// --------------------------------------------------------------------------- |
|
839 |
// CEntryAttributes::SetPriority |
|
840 |
// --------------------------------------------------------------------------- |
|
841 |
// |
|
842 |
EXPORT_C int CEntryAttributes::SetPriority( TInt aPriority ) |
|
843 |
{ |
|
844 |
if( aPriority < 0 || aPriority > 255 ) |
|
845 |
return KErrArgument; |
|
846 |
iPriority = aPriority; |
|
847 |
iSetAttributes |= EPriority; |
|
848 |
return KErrNone; |
|
849 |
} |
|
850 |
||
851 |
// --------------------------------------------------------------------------- |
|
852 |
// CEntryAttributes::SetLocalUid |
|
853 |
// --------------------------------------------------------------------------- |
|
854 |
// |
|
855 |
EXPORT_C void CEntryAttributes::SetLocalUid( const TCalLocalUid aLUid) |
|
856 |
{ |
|
857 |
iLocal = aLUid; |
|
858 |
iSetAttributes |= ELocalUid; |
|
859 |
} |
|
10
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
860 |
// --------------------------------------------------------------------------- |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
861 |
// CEntryAttributes::SetUid |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
862 |
// --------------------------------------------------------------------------- |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
863 |
// |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
864 |
EXPORT_C void CEntryAttributes::SetUidL( const TDesC8& aUid ) |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
865 |
{ |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
866 |
if( aUid.Length() ) |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
867 |
{ |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
868 |
iUid = aUid.AllocL(); |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
869 |
iSetAttributes |= EGlobalUid; |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
870 |
} |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
871 |
} |
5 | 872 |
// --------------------------------------------------------------------------- |
873 |
// CEntryAttributes::SetRepeatRule |
|
874 |
// --------------------------------------------------------------------------- |
|
875 |
// |
|
876 |
EXPORT_C void CEntryAttributes::SetRepeatRule( CRepeatInfo* aRptInfo) |
|
877 |
{ |
|
878 |
if ( aRptInfo ) |
|
879 |
iRepeatRule = aRptInfo->GetRepeatRule(); |
|
880 |
} |
|
881 |
||
882 |
// --------------------------------------------------------------------------- |
|
883 |
// CEntryAttributes::StartTime |
|
884 |
// --------------------------------------------------------------------------- |
|
885 |
// |
|
886 |
EXPORT_C TCalTime& CEntryAttributes::StartTime() |
|
887 |
{ |
|
888 |
return iStartTime; |
|
889 |
} |
|
890 |
||
891 |
// --------------------------------------------------------------------------- |
|
892 |
// CEntryAttributes::EndTime |
|
893 |
// --------------------------------------------------------------------------- |
|
894 |
// |
|
895 |
EXPORT_C TCalTime& CEntryAttributes::EndTime() |
|
896 |
{ |
|
897 |
return iEndTime; |
|
898 |
} |
|
899 |
||
900 |
// --------------------------------------------------------------------------- |
|
901 |
// CEntryAttributes::InstanceStartTime |
|
902 |
// --------------------------------------------------------------------------- |
|
903 |
// |
|
904 |
EXPORT_C TCalTime& CEntryAttributes::InstanceStartTime() |
|
905 |
{ |
|
906 |
return iInstanceStartTime; |
|
907 |
} |
|
908 |
||
909 |
// --------------------------------------------------------------------------- |
|
910 |
// CEntryAttributes::ReplicationStatus |
|
911 |
// --------------------------------------------------------------------------- |
|
912 |
// |
|
913 |
EXPORT_C CCalEntry::TReplicationStatus CEntryAttributes::ReplicationStatus() |
|
914 |
{ |
|
915 |
return iRepStatus; |
|
916 |
} |
|
917 |
||
918 |
// --------------------------------------------------------------------------- |
|
919 |
// CEntryAttributes::Summary |
|
920 |
// --------------------------------------------------------------------------- |
|
921 |
// |
|
922 |
EXPORT_C TPtrC CEntryAttributes::Summary() |
|
923 |
{ |
|
924 |
return iSummary ? TPtrC( *iSummary ) : TPtrC(); |
|
925 |
} |
|
926 |
||
927 |
// --------------------------------------------------------------------------- |
|
928 |
// CEntryAttributes::Description |
|
929 |
// --------------------------------------------------------------------------- |
|
930 |
// |
|
931 |
EXPORT_C TPtrC CEntryAttributes::Description() |
|
932 |
{ |
|
933 |
return iDescription ? TPtrC( *iDescription ) : TPtrC(); |
|
934 |
} |
|
935 |
||
936 |
// --------------------------------------------------------------------------- |
|
937 |
// CEntryAttributes::Location |
|
938 |
// --------------------------------------------------------------------------- |
|
939 |
// |
|
940 |
EXPORT_C TPtrC CEntryAttributes::Location() |
|
941 |
{ |
|
942 |
return iLocation ? TPtrC( *iLocation ) : TPtrC(); |
|
943 |
} |
|
944 |
||
945 |
// --------------------------------------------------------------------------- |
|
946 |
// CEntryAttributes::EntryType |
|
947 |
// --------------------------------------------------------------------------- |
|
948 |
// |
|
949 |
EXPORT_C CCalEntry::TType CEntryAttributes::EntryType() |
|
950 |
{ |
|
951 |
return iType; |
|
952 |
} |
|
953 |
||
954 |
// --------------------------------------------------------------------------- |
|
955 |
// CEntryAttributes::SequenceNumber |
|
956 |
// --------------------------------------------------------------------------- |
|
957 |
// |
|
958 |
EXPORT_C TInt CEntryAttributes::SequenceNumber() |
|
959 |
{ |
|
960 |
return iSequenceNum; |
|
961 |
} |
|
962 |
||
963 |
// --------------------------------------------------------------------------- |
|
964 |
// CEntryAttributes::AlarmTime |
|
965 |
// --------------------------------------------------------------------------- |
|
966 |
// |
|
967 |
EXPORT_C TTime CEntryAttributes::AlarmTime() |
|
968 |
{ |
|
969 |
return iAlarmTime; |
|
970 |
} |
|
971 |
||
972 |
// --------------------------------------------------------------------------- |
|
973 |
// CEntryAttributes::EntryStatus |
|
974 |
// --------------------------------------------------------------------------- |
|
975 |
// |
|
976 |
EXPORT_C CCalEntry::TStatus CEntryAttributes::EntryStatus() |
|
977 |
{ |
|
978 |
return iEntryStatus; |
|
979 |
} |
|
980 |
||
981 |
// --------------------------------------------------------------------------- |
|
982 |
// CEntryAttributes::PhoneOwner |
|
983 |
// --------------------------------------------------------------------------- |
|
984 |
// |
|
985 |
EXPORT_C TPtrC CEntryAttributes::PhoneOwner() |
|
986 |
{ |
|
987 |
return iPhoneOwner ? *iPhoneOwner : TPtrC(); |
|
988 |
} |
|
989 |
||
990 |
// --------------------------------------------------------------------------- |
|
991 |
// CEntryAttributes::Organizer |
|
992 |
// --------------------------------------------------------------------------- |
|
993 |
// |
|
994 |
EXPORT_C CCalUser* CEntryAttributes::Organizer() |
|
995 |
{ |
|
996 |
return iOrganizer; |
|
997 |
} |
|
998 |
||
999 |
// --------------------------------------------------------------------------- |
|
1000 |
// CEntryAttributes::AttendeeList |
|
1001 |
// --------------------------------------------------------------------------- |
|
1002 |
// |
|
1003 |
EXPORT_C RPointerArray<CCalAttendee>& CEntryAttributes::AttendeeList() |
|
1004 |
{ |
|
1005 |
return iAttendees; |
|
1006 |
} |
|
1007 |
||
1008 |
// --------------------------------------------------------------------------- |
|
1009 |
// CEntryAttributes::RepeatDates |
|
1010 |
// --------------------------------------------------------------------------- |
|
1011 |
// |
|
1012 |
EXPORT_C RArray<TCalTime>& CEntryAttributes::RepeatDates() |
|
1013 |
{ |
|
1014 |
return iRepeatDates; |
|
1015 |
} |
|
1016 |
||
1017 |
// --------------------------------------------------------------------------- |
|
1018 |
// CEntryAttributes::ExceptionDates |
|
1019 |
// --------------------------------------------------------------------------- |
|
1020 |
// |
|
1021 |
EXPORT_C RArray<TCalTime>& CEntryAttributes::ExceptionDates() |
|
1022 |
{ |
|
1023 |
return iExDates; |
|
1024 |
} |
|
1025 |
||
1026 |
// --------------------------------------------------------------------------- |
|
1027 |
// CEntryAttributes::RepeatRuleL |
|
1028 |
// --------------------------------------------------------------------------- |
|
1029 |
// |
|
1030 |
EXPORT_C TCalRRule& CEntryAttributes::RepeatRuleL() |
|
1031 |
{ |
|
1032 |
if ( iType == CCalEntry::EAnniv ) |
|
1033 |
// explicitly set repeat rule for anniversary type entries |
|
1034 |
{ |
|
1035 |
TTime stTime = iStartTime.TimeLocalL(); |
|
1036 |
TTime zero(TInt64(0)); |
|
1037 |
stTime = zero + stTime.DaysFrom(zero); |
|
1038 |
iStartTime.SetTimeLocalFloatingL( stTime ); |
|
1039 |
TCalRRule rrule( TCalRRule::EYearly ); |
|
1040 |
rrule.SetDtStart( iStartTime ); |
|
1041 |
rrule.SetInterval( 1 ); // once a year |
|
1042 |
iRepeatRule = rrule ; |
|
1043 |
} |
|
1044 |
return iRepeatRule; |
|
1045 |
} |
|
1046 |
||
1047 |
// --------------------------------------------------------------------------- |
|
1048 |
// CEntryAttributes::Method |
|
1049 |
// --------------------------------------------------------------------------- |
|
1050 |
// |
|
1051 |
EXPORT_C CCalEntry::TMethod CEntryAttributes::Method() |
|
1052 |
{ |
|
1053 |
return iMethod; |
|
1054 |
} |
|
1055 |
||
1056 |
// --------------------------------------------------------------------------- |
|
1057 |
// CEntryAttributes::Priority |
|
1058 |
// --------------------------------------------------------------------------- |
|
1059 |
// |
|
1060 |
EXPORT_C TInt CEntryAttributes::Priority() |
|
1061 |
{ |
|
1062 |
return iPriority; |
|
1063 |
} |
|
1064 |
||
1065 |
// --------------------------------------------------------------------------- |
|
1066 |
// CEntryAttributes::LocalUid |
|
1067 |
// --------------------------------------------------------------------------- |
|
1068 |
// |
|
1069 |
EXPORT_C TCalLocalUid CEntryAttributes::LocalUid() |
|
1070 |
{ |
|
1071 |
return iLocal; |
|
1072 |
} |
|
10
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
1073 |
// --------------------------------------------------------------------------- |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
1074 |
// CEntryAttributes::GlobalUid |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
1075 |
// --------------------------------------------------------------------------- |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
1076 |
// |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
1077 |
EXPORT_C TPtrC8 CEntryAttributes::GlobalUid() |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
1078 |
{ |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
1079 |
return iUid ? TPtrC8( *iUid ) : TPtrC8(); |
fc9cf246af83
Revision: 200931
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
5
diff
changeset
|
1080 |
} |
5 | 1081 |
|
1082 |
// --------------------------------------------------------------------------- |
|
1083 |
// CEntryAttributes::ModifiedAttributes |
|
1084 |
// --------------------------------------------------------------------------- |
|
1085 |
// |
|
1086 |
EXPORT_C TInt32 CEntryAttributes::ModifiedAttributes() |
|
1087 |
{ |
|
1088 |
return iSetAttributes; |
|
1089 |
} |
|
1090 |
||
1091 |
// --------------------------------------------------------------------------- |
|
1092 |
// Constructor |
|
1093 |
// --------------------------------------------------------------------------- |
|
1094 |
// |
|
1095 |
CEntryAttributes::CEntryAttributes() |
|
1096 |
{ |
|
1097 |
iMethod = CCalEntry::EMethodNone; |
|
1098 |
iSequenceNum = 0; |
|
1099 |
iRepStatus = CCalEntry::EOpen; |
|
1100 |
iPriority = 0; |
|
1101 |
iPhoneOwner = NULL; |
|
1102 |
iOrganizer = NULL; |
|
1103 |
iLocation = NULL; |
|
1104 |
iAlarmTime = NULL; |
|
1105 |
iEntryStatus = CCalEntry::ENullStatus; |
|
1106 |
} |
|
1107 |