|
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef __CALINSTANCEITERATORUID_H__ |
|
17 #define __CALINSTANCEITERATORUID_H__ |
|
18 |
|
19 #include "calinstanceiterator.h" |
|
20 #include "caltime.h" |
|
21 |
|
22 class CCalInstance; |
|
23 class CCalSessionImpl; |
|
24 class CAgnSimpleEntry; |
|
25 class CCalLiteEntry; |
|
26 |
|
27 /** Instance Iterator for iterating though all the instances that related to a UID. |
|
28 |
|
29 @internalComponent |
|
30 */ |
|
31 NONSHARABLE_CLASS(CCalInstanceIteratorUid) : public CCalInstanceIterator |
|
32 { |
|
33 public: |
|
34 static CCalInstanceIteratorUid* NewL(const CCalInstanceViewImpl& iInstanceViewImpl, const TDesC8& aUid, const TCalTime& aInstanceTime, TUint8 aShortFileId); |
|
35 ~CCalInstanceIteratorUid(); |
|
36 |
|
37 CCalInstance* NextL(); |
|
38 CCalInstance* PreviousL(); |
|
39 TBool HasMore() const; |
|
40 TInt Count() const; |
|
41 |
|
42 private: |
|
43 CCalInstanceIteratorUid(const CCalInstanceViewImpl& iInstanceViewImpl); |
|
44 void ConstructL(const TDesC8& aUid, const TCalTime& aInstanceTime, TUint8 aShortFileId); |
|
45 |
|
46 TCalTime NonRptEntryInstanceTimeL(const CAgnSimpleEntry& aEntry); |
|
47 TBool HasMoreL() const; |
|
48 |
|
49 protected: |
|
50 RPointerArray<CCalLiteEntry> iCalLiteEntries; |
|
51 TCalTime iCurrentIndexTime; |
|
52 TCalTime iUndatedTodoTime; |
|
53 mutable RArray <TInt> iEntryWithSameTime;//It stores the indexes of iCalLiteEntries. Those entries have the same instance time as the iCurrentIndexTime |
|
54 mutable TInt iCurrentIndex;//It stores the index of entry in iEntryWithSameTime which has been returned last time when the clinet calls NextL or PrevoiusL. It will be set to -1 if there is no entry in the array has been returned to the user. |
|
55 }; |
|
56 |
|
57 #endif // __CALINSTANCEITERATORUID_H__ |