|
1 /* |
|
2 * Copyright (c) 2005-2006 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 |
|
19 #ifndef C_AICALENDARPLUGIN2DATA_H |
|
20 #define C_AICALENDARPLUGIN2DATA_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <aicontentobserver.h> |
|
25 #include "aicalendarplugin2eventitem.h" |
|
26 |
|
27 |
|
28 /** |
|
29 * Calendar plugin 2 event data container. |
|
30 * |
|
31 * @lib aicalendarplugin2 |
|
32 * @since S60 3.2 |
|
33 */ |
|
34 NONSHARABLE_CLASS( CAICalendarPlugin2Data ) : public CBase |
|
35 { |
|
36 public: |
|
37 |
|
38 // Construction |
|
39 |
|
40 static CAICalendarPlugin2Data* NewL(); |
|
41 |
|
42 virtual ~CAICalendarPlugin2Data(); |
|
43 |
|
44 // New methods |
|
45 |
|
46 void ClearDataArrays(); |
|
47 |
|
48 RPointerArray<CAiCalendarPlugin2EventItem>& Upcoming2HrsArray(); |
|
49 |
|
50 RPointerArray<CAiCalendarPlugin2EventItem>& UpcomingArray(); |
|
51 |
|
52 RPointerArray<CAiCalendarPlugin2EventItem>& Ongoing30MinArray(); |
|
53 |
|
54 RPointerArray<CAiCalendarPlugin2EventItem>& OngoingArray(); |
|
55 |
|
56 RPointerArray<CAiCalendarPlugin2EventItem>& LongOngoingArray(); |
|
57 |
|
58 RPointerArray<CAiCalendarPlugin2EventItem>& NonTimedEventArray(); |
|
59 |
|
60 RPointerArray<CAiCalendarPlugin2EventItem>& TomorrowEventArray(); |
|
61 |
|
62 RPointerArray<CAiCalendarPlugin2EventItem>& NotTodayItemArray(); |
|
63 |
|
64 RPointerArray<CAiCalendarPlugin2EventItem>& FutureItemArray(); |
|
65 |
|
66 TInt AppendItemToCorrectArray( CAiCalendarPlugin2EventItem& aItem, |
|
67 TInt& aDayNoteIndex ); |
|
68 |
|
69 TInt TotalTimedTodaySpaceReservation(); |
|
70 |
|
71 TInt TotalTodayItemCount(); |
|
72 |
|
73 TInt TotalTimedTodayItemCount(); |
|
74 |
|
75 RPointerArray<MAiContentObserver>& ObserverArray(); |
|
76 |
|
77 void AppendObserverL( MAiContentObserver& aObserver ); |
|
78 |
|
79 RArray<TAiCalendarFocusData>& FocusDataArray(); |
|
80 |
|
81 void SetSpaceTakenByTimedEvent( TInt aSpace ){iSpaceTakenByTimedEvent = aSpace;}; |
|
82 |
|
83 void SetSpaceTakenByNonTimedEvent( TInt aSpace ){iSpaceTakenByNonTimedEvent = aSpace;}; |
|
84 |
|
85 TInt SpaceTakenByTimedEvent(){return iSpaceTakenByTimedEvent;}; |
|
86 |
|
87 TInt SpaceTakenByNonTimedEvent(){return iSpaceTakenByNonTimedEvent;}; |
|
88 |
|
89 void LaunchCalendarApplication( TInt aIndex, TBool aLaunchFirstValid ); |
|
90 |
|
91 TBool HadExpiredEvents(); |
|
92 |
|
93 void SetHadExpiredEvents( TBool aHadExpired ); |
|
94 |
|
95 void SortArrayByTime( RPointerArray<CAiCalendarPlugin2EventItem>& aArray ); |
|
96 |
|
97 private: |
|
98 |
|
99 // Construction |
|
100 |
|
101 CAICalendarPlugin2Data(); |
|
102 |
|
103 void ConstructL(); |
|
104 |
|
105 private: // Data members |
|
106 |
|
107 /** |
|
108 * Item data array for normal upcoming timed today items (meeting/appointment). |
|
109 * Starting within 2 hrs. |
|
110 * Own. |
|
111 */ |
|
112 RPointerArray<CAiCalendarPlugin2EventItem> iUpcoming2HrsItemData; |
|
113 |
|
114 /** |
|
115 * Item data array for normal upcoming timed today items (meeting/appointment). |
|
116 * Own. |
|
117 */ |
|
118 RPointerArray<CAiCalendarPlugin2EventItem> iUpcomingItemData; |
|
119 |
|
120 /** |
|
121 * Item data array for normal ongoing timed today items (meeting/appointment) |
|
122 * that have started within 30 mins. |
|
123 * Own. |
|
124 */ |
|
125 RPointerArray<CAiCalendarPlugin2EventItem> iOngoing30MinItemData; |
|
126 |
|
127 /** |
|
128 * Item data array for normal ongoing timed today items (meeting/appointment). |
|
129 * Own. |
|
130 */ |
|
131 RPointerArray<CAiCalendarPlugin2EventItem> iOngoingItemData; |
|
132 |
|
133 /** |
|
134 * Item data array for non timed today items (Anniversary/ToDo/Day note). |
|
135 * Own. |
|
136 */ |
|
137 RPointerArray<CAiCalendarPlugin2EventItem> iNonTimedItemData; |
|
138 |
|
139 /** |
|
140 * Item data array for all tomorrow items (meeting/appointment/Anniversary/ToDo/Day Note, not today). |
|
141 * Own. |
|
142 */ |
|
143 RPointerArray<CAiCalendarPlugin2EventItem> iTomorrowItemData; |
|
144 |
|
145 /** |
|
146 * Item data array for all not today items that are within the specified day range |
|
147 * EPluginDaysToHandleAsNotToday. (meeting/appointment/Anniversary/ToDo/Day Note, not today). |
|
148 * Own. |
|
149 */ |
|
150 RPointerArray<CAiCalendarPlugin2EventItem> iNotTodayItemData; |
|
151 |
|
152 /** |
|
153 * Item data array for all not today items that have begun before to day, and are still ongoing. |
|
154 * EPluginDaysToHandleAsNotToday. (meeting/appointment/Anniversary/ToDo/Day Note, not today). |
|
155 * Own. |
|
156 */ |
|
157 RPointerArray<CAiCalendarPlugin2EventItem> iLongOngoingItemData; |
|
158 |
|
159 /** |
|
160 * Item data array for all rest not today items (meeting/appointment/Anniversary/ToDo/Day Note, not today). |
|
161 * Own. |
|
162 */ |
|
163 RPointerArray<CAiCalendarPlugin2EventItem> iFutureItemData; |
|
164 |
|
165 /** |
|
166 * Publishing observers. |
|
167 * Own. |
|
168 */ |
|
169 RPointerArray<MAiContentObserver> iObservers; |
|
170 |
|
171 /** |
|
172 * Data array for event focusing data in calendar app. |
|
173 */ |
|
174 RArray<TAiCalendarFocusData> iEventFocusData; |
|
175 |
|
176 /** |
|
177 * Number of space (lines or othervise) one timed event line reserves. |
|
178 * Depends on the layout of the theme. |
|
179 */ |
|
180 TInt iSpaceTakenByTimedEvent; |
|
181 |
|
182 /** |
|
183 * Number of space (lines or othervise) one non timed event line reserves. |
|
184 * Depends on the layout of the theme. |
|
185 */ |
|
186 TInt iSpaceTakenByNonTimedEvent; |
|
187 |
|
188 /** |
|
189 * Had expired events? |
|
190 */ |
|
191 TBool iHadExpiredEvents; |
|
192 |
|
193 }; |
|
194 |
|
195 #endif // C_AICALENDARPLUGIN2DATA_H |
|
196 |
|
197 |
|
198 // End of File |