|
1 /* |
|
2 * Copyright (c) 2008 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: Basic Classes for the Location Events. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_EVTBASICEVENTINFO_H |
|
20 #define C_EVTBASICEVENTINFO_H |
|
21 |
|
22 // System Includes |
|
23 #include <e32base.h> |
|
24 |
|
25 // User Includes |
|
26 #include "evtdefs.h" |
|
27 |
|
28 // Forward Declarations |
|
29 |
|
30 // extern data types |
|
31 |
|
32 // global Functions |
|
33 |
|
34 // constants go here |
|
35 /** |
|
36 * @class CEvtBasicEventInfoInfo |
|
37 * Class for the basic Location Event information. |
|
38 * |
|
39 * This class is used to store the basic information for an event. |
|
40 * |
|
41 * @lib evtstorage.lib |
|
42 * @since S60 v9.1 |
|
43 */ |
|
44 class CEvtBasicEventInfo : public CBase |
|
45 { |
|
46 public: |
|
47 /** |
|
48 * Constructs a new instance of CEvtBasicEventInfo. |
|
49 * |
|
50 * @return The new instance of CEvtBasicEventInfo object. |
|
51 * @leave System wide error code if the object creation fails. |
|
52 */ |
|
53 IMPORT_C static CEvtBasicEventInfo* NewL(); |
|
54 |
|
55 /** |
|
56 * Constructs a new instance of CEvtBasicEventInfo Object. |
|
57 * Leaves the created instance on the cleanup stack. |
|
58 * |
|
59 * @return The new instance of CEvtBasicEventInfo object. |
|
60 * @leave System wide error code if the object creation fails. |
|
61 */ |
|
62 IMPORT_C static CEvtBasicEventInfo* NewLC(); |
|
63 |
|
64 /** |
|
65 * Destructor. |
|
66 */ |
|
67 virtual ~CEvtBasicEventInfo(); |
|
68 |
|
69 public: // Get and Set methods |
|
70 |
|
71 /** |
|
72 * Gets the Trigger id, identifying the Location Event. |
|
73 * This identifier is definded by Location Triggering Engine. |
|
74 * |
|
75 * @since S60 v9.1 |
|
76 * @return Event identifier identifying the Location Event. |
|
77 */ |
|
78 IMPORT_C TEvtEventId EventId() const; |
|
79 |
|
80 /** |
|
81 * Set the Trigger id, identifying the Location Event. The |
|
82 * identifer is definded by Location Triggering Engine. |
|
83 * |
|
84 * @since S60 v9.1 |
|
85 * @param[in] aId Event identifier identifying the Location Event. |
|
86 */ |
|
87 IMPORT_C void SetEventId( const TEvtEventId aId ); |
|
88 |
|
89 /** |
|
90 * Gets the Subject for the Location Events. |
|
91 * The Subject is defined by the Location EventsUi on Creation. |
|
92 * A reference to the object's internal string is returned. |
|
93 * |
|
94 * @since S60 v9.1 |
|
95 * @return Subject for the Location Event. If the Subject has not |
|
96 * been set for the Location Event, then a NULL |
|
97 * string is returned. |
|
98 */ |
|
99 IMPORT_C TPtrC Subject() const; |
|
100 |
|
101 /** |
|
102 * Set the Subject String for the Location Event. The Subject is |
|
103 * copied. |
|
104 * |
|
105 * @since S60 v9.1 |
|
106 * @param[in] aSubject Subject String for the Location Event. |
|
107 * The Subject string is copied. |
|
108 * @leave KErrNoMemory If there is not enough memory to copy the string. |
|
109 */ |
|
110 IMPORT_C void SetSubjectL( const TDesC& aSubject ); |
|
111 |
|
112 /** |
|
113 * Gets the Place for the Location Events. |
|
114 * The Place is defined by the Location EventsUi on Creation. |
|
115 * A reference to the object's internal string is returned. |
|
116 * |
|
117 * @since S60 v9.1 |
|
118 * @return Place String for the Location Event. If the Place has not |
|
119 * been set for the Location Event, then a NULL |
|
120 * string is returned. |
|
121 */ |
|
122 IMPORT_C TPtrC Place() const; |
|
123 |
|
124 /** |
|
125 * Set the Place String for the Location Event. The Place is |
|
126 * copied. |
|
127 * |
|
128 * @since S60 v9.1 |
|
129 * @param[in] aPlace Place String for the Location Event. |
|
130 * The Place string is copied. |
|
131 * @leave KErrNoMemory If there is not enough memory to copy the string. |
|
132 */ |
|
133 IMPORT_C void SetPlaceL( const TDesC& aPlace ); |
|
134 |
|
135 /** |
|
136 * Gets the Status of the Location Event. |
|
137 * The Status is defined by the Location EventsUi on Creation. |
|
138 * Status is updated as and when the Event moves to different state. |
|
139 * |
|
140 * @since S60 v9.1 |
|
141 * @return TEvtBasicEventStatus Status for the Location Event. |
|
142 */ |
|
143 IMPORT_C TEvtEventStatus EventStatus() const; |
|
144 |
|
145 /** |
|
146 * Set the Status for the Location Event. |
|
147 * |
|
148 * @since S60 v9.1 |
|
149 * @param[in] aEventStatus Status for the Location Event. |
|
150 */ |
|
151 IMPORT_C void SetEventStatus( |
|
152 const TEvtEventStatus aEventStatus ); |
|
153 |
|
154 /** |
|
155 * Gets the Repeast flag for the Location Event. |
|
156 * The Repeast is defined by the Location EventsUi on Creation. |
|
157 * |
|
158 * @since S60 v9.1 |
|
159 * @return TBool Repeat flag for the Location Event. |
|
160 */ |
|
161 IMPORT_C TBool Repeat() const; |
|
162 |
|
163 /** |
|
164 * Set the Repeat flag for the Location Event. |
|
165 * |
|
166 * @since S60 v9.1 |
|
167 * @param[in] TBool Repeat flag for the Location Event. |
|
168 */ |
|
169 IMPORT_C void SetRepeat( const TBool aRepeat ); |
|
170 |
|
171 private: // methods |
|
172 /** |
|
173 * Default C++ Constructor. |
|
174 */ |
|
175 CEvtBasicEventInfo(); |
|
176 |
|
177 /** |
|
178 * Default Copy Constructor. |
|
179 */ |
|
180 CEvtBasicEventInfo(CEvtBasicEventInfo& ); |
|
181 |
|
182 /** |
|
183 * Second phase of the two phase constructor. |
|
184 */ |
|
185 void ConstructL(); |
|
186 |
|
187 private: // data |
|
188 |
|
189 /** |
|
190 * System wide unique identifier identifying the Location Event. |
|
191 * This identifier is defined by the Location Triggering Engine. |
|
192 * |
|
193 * Owns |
|
194 */ |
|
195 TEvtEventId iEventId; |
|
196 |
|
197 /** |
|
198 * Event Subject. |
|
199 * Subject for the Location Event. The Subject is defined by the Location |
|
200 * Events Ui. |
|
201 * |
|
202 * Owns |
|
203 */ |
|
204 HBufC* iSubject; |
|
205 |
|
206 /** |
|
207 * Event Place. |
|
208 * Place for the Location Event. The String is defined by the Location |
|
209 * Events Ui. |
|
210 * |
|
211 * Owns |
|
212 */ |
|
213 HBufC* iPlace; |
|
214 |
|
215 /** |
|
216 * Repeat Event. |
|
217 */ |
|
218 TBool iRepeat; |
|
219 |
|
220 /** |
|
221 * Event Status. |
|
222 */ |
|
223 TEvtEventStatus iEventStatus; |
|
224 |
|
225 }; |
|
226 |
|
227 #endif // C_EVTBASICEVENTINFO_H |