|
1 /* |
|
2 * Copyright (c) 2007-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: Interface definition for ESMR calendar entry |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MESMRCALENTRY_H |
|
20 #define MESMRCALENTRY_H |
|
21 |
|
22 //<cmail> |
|
23 #include "esmrdef.h" |
|
24 //</cmail> |
|
25 |
|
26 class CCalEntry; |
|
27 class CCalInstance; |
|
28 |
|
29 /** |
|
30 * MESMRMeetingRequestEntry provides utility functions for handling MR Entry. |
|
31 * |
|
32 * @lib esmrservices.lib |
|
33 */ |
|
34 class MESMRCalEntry |
|
35 { |
|
36 public: // Definitions |
|
37 /** |
|
38 * Enumeration for cal entry type |
|
39 */ |
|
40 enum TESMRCalEntryType |
|
41 { |
|
42 EESMRCalEntryNotSupported = -1, // Entry type not supported |
|
43 EESMRCalEntryMeetingRequest, // Meeting request entry |
|
44 EESMRCalEntryMeeting, // Meeting entry |
|
45 EESMRCalEntryTodo, // TO-DO entry |
|
46 EESMRCalEntryMemo, // Memo entry |
|
47 EESMRCalEntryReminder, // Reminder entry |
|
48 EESMRCalEntryAnniversary // Anniversary entry |
|
49 }; |
|
50 |
|
51 /** |
|
52 * Enumeration for recurrence modifying rule |
|
53 */ |
|
54 enum TESMRRecurrenceModifyingRule |
|
55 { |
|
56 // Modify only this entry |
|
57 EESMRThisOnly, |
|
58 // Modification applies to all entries in the series |
|
59 EESMRAllInSeries |
|
60 }; |
|
61 |
|
62 /** |
|
63 * Enumeration for alarm type |
|
64 */ |
|
65 enum TESMRAlarmType |
|
66 { |
|
67 /** |
|
68 * Entry does not contain alarm |
|
69 */ |
|
70 EESMRAlarmNotFound, |
|
71 /** |
|
72 * Alarm is absolute |
|
73 */ |
|
74 EESMRAlarmAbsolute, |
|
75 /** |
|
76 * Alarm is relative to meeting start time |
|
77 */ |
|
78 EESMRAlarmRelative |
|
79 }; |
|
80 |
|
81 public: // Destruction |
|
82 /** |
|
83 * Virtual destructor. |
|
84 */ |
|
85 virtual ~MESMRCalEntry() { } |
|
86 |
|
87 public: // Interface |
|
88 /** |
|
89 * Fetches calendar entry type. |
|
90 * @return calendar entry type. |
|
91 */ |
|
92 virtual TESMRCalEntryType Type() const = 0; |
|
93 |
|
94 /** |
|
95 * Fetches reference to this calendar entry. |
|
96 * @return Reference to this entry. |
|
97 */ |
|
98 virtual MESMRCalEntry& MESMRCalEntryRef() = 0; |
|
99 |
|
100 /** |
|
101 * Fetches const reference to this calendar entry. |
|
102 * @return const reference to this calendar entry. |
|
103 */ |
|
104 virtual const MESMRCalEntry& MESMRCalEntryRef() const = 0; |
|
105 |
|
106 /** |
|
107 * Fetches constant reference to CCalEntry. |
|
108 * @return const reference to CCalEntry. |
|
109 */ |
|
110 virtual const CCalEntry& Entry() const = 0; |
|
111 |
|
112 /** |
|
113 * Fetches reference to CCalEntry. |
|
114 * @return reference to CCalEntry. |
|
115 */ |
|
116 virtual CCalEntry& Entry() = 0; |
|
117 |
|
118 /** |
|
119 * Fetches calendar entry's instance. Ownership is transferred to caller. |
|
120 * @return Reference to calendar entry's instance. |
|
121 */ |
|
122 virtual CCalInstance* InstanceL() const = 0; |
|
123 |
|
124 /** |
|
125 * Tests, if recurrence can be set. |
|
126 * @return ETrue, if recurrence can be set. EFalse otherwise. |
|
127 */ |
|
128 virtual TBool CanSetRecurrenceL() const = 0; |
|
129 |
|
130 /** |
|
131 * Tests, if this is recurrent meeting request. |
|
132 * @return ETrue, if this is recurrent meeting request. |
|
133 */ |
|
134 virtual TBool IsRecurrentEventL() const = 0; |
|
135 |
|
136 /** |
|
137 * Fetches entry's recurrence value. |
|
138 * @param aRecurrence On return contains entry's recurrence information |
|
139 * @param aUntil On return contains time in UTC until recurrence is valid. |
|
140 */ |
|
141 virtual void GetRecurrenceL( |
|
142 TESMRRecurrenceValue& aRecurrence, |
|
143 TTime& aUntil ) const = 0; |
|
144 |
|
145 /** |
|
146 * Sets recurrence to ES MR entry. If until time is not set |
|
147 * (i.e, it is null time), then until time is implementation |
|
148 * dependent. |
|
149 * When recurrence is set to ERecurrenceNot, then aUntil parameter |
|
150 * is ignored. |
|
151 * @param aRecurrece Recurrece value. |
|
152 * @param aUntil Recurrence valid until in UTC format. |
|
153 * @error KErrNotSupported Entry cannot be recurrenced. |
|
154 */ |
|
155 virtual void SetRecurrenceL( |
|
156 TESMRRecurrenceValue aRecurrence, |
|
157 TTime aUntil = Time::NullTTime() ) = 0; |
|
158 |
|
159 /** |
|
160 * Fetches recurrence modification rule. |
|
161 * @return Modification rule. |
|
162 */ |
|
163 virtual TESMRRecurrenceModifyingRule RecurrenceModRule() const = 0; |
|
164 |
|
165 /** |
|
166 * Sets modifying rule role to meeting request. |
|
167 * @param aRule Recurrence modification rule. |
|
168 */ |
|
169 virtual void SetModifyingRuleL( |
|
170 TESMRRecurrenceModifyingRule aRule ) = 0; |
|
171 |
|
172 /** |
|
173 * Sets the entry priority. |
|
174 * @param aPriority entry priority. |
|
175 */ |
|
176 virtual void SetPriorityL( |
|
177 TUint aPriority ) = 0; |
|
178 |
|
179 /** |
|
180 * Fetches the entry priority. |
|
181 * @return entry priority. |
|
182 */ |
|
183 virtual TUint GetPriorityL() const = 0; |
|
184 |
|
185 /** |
|
186 * Sets meeting to be all day event. |
|
187 * @param aStartDate Start date information |
|
188 * @param aEndDate End date information |
|
189 */ |
|
190 virtual void SetAllDayEventL( |
|
191 TTime aStartDate, |
|
192 TTime aEndDate ) = 0; |
|
193 |
|
194 /** |
|
195 * Tests, if entry is all day event. |
|
196 * @return ETrue, if entry is all day event |
|
197 */ |
|
198 virtual TBool IsAllDayEventL() const = 0; |
|
199 |
|
200 /** |
|
201 * Tests whether this entry has been stored to db or not. |
|
202 * @return ETrue, if entry is stored to calendar DB. |
|
203 */ |
|
204 virtual TBool IsStoredL() const = 0; |
|
205 |
|
206 /** |
|
207 * Tests if this entry has been sent to attendees. |
|
208 * @return ETrue, if entry is sent to attendees |
|
209 */ |
|
210 virtual TBool IsSentL() const = 0; |
|
211 |
|
212 /** |
|
213 * Tests, whether entry is edited. |
|
214 * @return ETrue, if entry is edited. |
|
215 */ |
|
216 virtual TBool IsEntryEditedL() const = 0; |
|
217 |
|
218 /** |
|
219 * Fetches alarm information from entry. |
|
220 * @param aAlarmType On return contains alarm type. |
|
221 * @param aAlarmTime On return contains time when alarm occurs. |
|
222 */ |
|
223 virtual void GetAlarmL( |
|
224 TESMRAlarmType& aAlarmType, |
|
225 TTime &aAlarmTime ) = 0; |
|
226 |
|
227 /** |
|
228 * Fetches unmodified entry instance. |
|
229 * @return CCalEntry original entry |
|
230 */ |
|
231 virtual const CCalEntry& OriginalEntry() = 0; |
|
232 }; |
|
233 |
|
234 |
|
235 #endif // MESMRCALENTRY_H |
|
236 |
|
237 // EOF |