1 /* |
|
2 * Copyright (c) 2003-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: This file contains the header file of the CPELogInfo class. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CPELOGINFO_H |
|
19 #define CPELOGINFO_H |
|
20 |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <LogsApiConsts.h> |
|
24 |
|
25 #include "mpedatastore.h" |
|
26 |
|
27 _LIT( KPELogUnknownText, "Unknown" ); |
|
28 |
|
29 |
|
30 /** |
|
31 * Log info data. |
|
32 * |
|
33 * @lib loghandling.dll |
|
34 * @since S60 v5.0 |
|
35 */ |
|
36 class CPELogInfo : public CBase |
|
37 { |
|
38 public: |
|
39 //Log Event Type |
|
40 enum TPELogEventType |
|
41 { |
|
42 EPEUnknownEvent = 0, |
|
43 EPEVoiceEvent, |
|
44 EPEVideoCallEvent, |
|
45 EPEEmergecyEvent, |
|
46 EPEVoIPEvent |
|
47 }; |
|
48 |
|
49 static CPELogInfo* NewL(); |
|
50 |
|
51 /** |
|
52 * Destructor. |
|
53 */ |
|
54 virtual ~CPELogInfo(); |
|
55 |
|
56 /** |
|
57 * Save event data. Basic log data existence guaranteed for class. |
|
58 * |
|
59 * @since S60 v5.0 |
|
60 * @param aCallId Identification for call |
|
61 * @param aDataStore Logs datastore |
|
62 */ |
|
63 void SetEventData( TInt aCallId, const MPEDataStore& aDataStore ); |
|
64 |
|
65 /** |
|
66 * Copy event data. |
|
67 * |
|
68 * @since S60 v5.0 |
|
69 * @param aLogInfo Log info to be copied |
|
70 */ |
|
71 void CopyL( const CPELogInfo& aLogInfo ); |
|
72 |
|
73 /** |
|
74 * Restore default values. |
|
75 * |
|
76 * @since S60 v5.0 |
|
77 */ |
|
78 void Reset(); |
|
79 |
|
80 /** |
|
81 * Set the logged event type data,voice. |
|
82 * |
|
83 * @since S60 v5.0 |
|
84 * @param aEventType LogEventType |
|
85 */ |
|
86 void SetEventType( TPELogEventType aEventType ); |
|
87 |
|
88 /** |
|
89 * The logged event type data,voice. |
|
90 * |
|
91 * @since S60 v5.0 |
|
92 */ |
|
93 CPELogInfo::TPELogEventType EventType() const; |
|
94 |
|
95 /** |
|
96 * Set call direction (0=MO/1=MT). |
|
97 * |
|
98 * @since S60 v5.0 |
|
99 * @param aCallDirection Call direction |
|
100 */ |
|
101 void SetCallDirection( RMobileCall::TMobileCallDirection aCallDirection ); |
|
102 |
|
103 /** |
|
104 * Call direction (0=MO/1=MT). |
|
105 * |
|
106 * @since S60 v5.0 |
|
107 */ |
|
108 RMobileCall::TMobileCallDirection CallDirection() const; |
|
109 |
|
110 /** |
|
111 * Set call id. |
|
112 * |
|
113 * @since S60 v5.0 |
|
114 * @param aCallId Call Id |
|
115 */ |
|
116 void SetCallId( TInt aCallId ); |
|
117 |
|
118 /** |
|
119 * Call id. |
|
120 * |
|
121 * @since S60 v5.0 |
|
122 */ |
|
123 TInt CallId() const; |
|
124 |
|
125 /** |
|
126 * Set phone number. |
|
127 * |
|
128 * @since S60 v5.0 |
|
129 * @param aPhoneNumber Phone number |
|
130 */ |
|
131 void SetPhoneNumber( const TPEPhoneNumber& aPhoneNumber ); |
|
132 |
|
133 /** |
|
134 * Phone number. |
|
135 * |
|
136 * @since S60 v5.0 |
|
137 */ |
|
138 const TPEPhoneNumber& PhoneNumber() const; |
|
139 |
|
140 /** |
|
141 * Set firstname + lastname. |
|
142 * |
|
143 * @since S60 v5.0 |
|
144 * @param aName Name |
|
145 */ |
|
146 void SetName( const TPEContactName& aName ); |
|
147 |
|
148 /** |
|
149 * Firstname + lastname. |
|
150 * |
|
151 * @since S60 v5.0 |
|
152 */ |
|
153 const TPEContactName& Name() const; |
|
154 |
|
155 /** |
|
156 * Set call state. |
|
157 * |
|
158 * @since S60 v5.0 |
|
159 * @param aCallState Call state |
|
160 */ |
|
161 void SetCallState( TPEState aCallState ); |
|
162 |
|
163 /** |
|
164 * Call state. |
|
165 * |
|
166 * @since S60 v5.0 |
|
167 */ |
|
168 TPEState CallState() const; |
|
169 |
|
170 /** |
|
171 * Set call duration (seconds). |
|
172 * |
|
173 * @since S60 v5.0 |
|
174 * @param aDuration Call duration |
|
175 */ |
|
176 void SetDuration( TTimeIntervalSeconds aDuration ); |
|
177 |
|
178 /** |
|
179 * Call duration (seconds). |
|
180 * |
|
181 * @since S60 v5.0 |
|
182 */ |
|
183 TTimeIntervalSeconds Duration() const; |
|
184 |
|
185 /** |
|
186 * Set call line. |
|
187 * |
|
188 * @since S60 v5.0 |
|
189 * @param aCurrentLine Current line type |
|
190 */ |
|
191 void SetCurrentLine( CCCECallParameters::TCCELineType aCurrentLine ); |
|
192 |
|
193 /** |
|
194 * Call line. |
|
195 * |
|
196 * @since S60 v5.0 |
|
197 */ |
|
198 CCCECallParameters::TCCELineType CurrentLine() const; |
|
199 |
|
200 /** |
|
201 * Set phone number id. |
|
202 * |
|
203 * @since S60 v5.0 |
|
204 * @param aPhoneNumberId Phone number id type |
|
205 */ |
|
206 void SetPhoneNumberId( TPEPhoneNumberIdType aPhoneNumberId ); |
|
207 |
|
208 /** |
|
209 * Phone number id. |
|
210 * |
|
211 * @since S60 v5.0 |
|
212 */ |
|
213 TPEPhoneNumberIdType PhoneNumberId() const; |
|
214 |
|
215 /** |
|
216 * Set logging indicator. |
|
217 * |
|
218 * @since S60 v5.0 |
|
219 * @param aLoggingEnabled Logging state |
|
220 */ |
|
221 void SetLoggingEnabled( TBool aLoggingEnabled ); |
|
222 |
|
223 /** |
|
224 * Logging indicator. |
|
225 * |
|
226 * @since S60 v5.0 |
|
227 */ |
|
228 TBool LoggingEnabled() const; |
|
229 |
|
230 /** |
|
231 * Set start time. |
|
232 * |
|
233 * @since S60 v5.0 |
|
234 * @param aCallStartTime Call start time |
|
235 */ |
|
236 void SetCallStartTime( TTime aCallStartTime ); |
|
237 |
|
238 /** |
|
239 * Start time. |
|
240 * |
|
241 * @since S60 v5.0 |
|
242 */ |
|
243 TTime CallStartTime() const; |
|
244 |
|
245 /** |
|
246 * Set missed call indicator. |
|
247 * |
|
248 * @since S60 v5.0 |
|
249 * @param aMissedCall Call missed status |
|
250 */ |
|
251 void SetMissedCall( TBool aMissedCall ); |
|
252 |
|
253 /** |
|
254 * Missed call indicator. |
|
255 * |
|
256 * @since S60 v5.0 |
|
257 */ |
|
258 TBool MissedCall() const; |
|
259 |
|
260 /** |
|
261 * Set indication if entry should be completed. |
|
262 * |
|
263 * @since S60 v5.0 |
|
264 * @param aForcedCompletion Force completion state |
|
265 */ |
|
266 void SetForcedCompletion( TBool aForcedCompletion ); |
|
267 |
|
268 /** |
|
269 * Indication for entry if it should be completed. |
|
270 * |
|
271 * @since S60 v5.0 |
|
272 */ |
|
273 TBool ForcedCompletion() const; |
|
274 |
|
275 /** |
|
276 * Set service id for the call. |
|
277 * |
|
278 * @since S60 v5.0 |
|
279 * @param aServiceId Service id |
|
280 */ |
|
281 void SetServiceId( TUint32 aServiceId ); |
|
282 |
|
283 /** |
|
284 * Service id of the call. |
|
285 * |
|
286 * @since S60 v5.0 |
|
287 */ |
|
288 TUint32 ServiceId() const; |
|
289 |
|
290 /** |
|
291 * Set VoIP address. |
|
292 * |
|
293 * @since S60 v5.0 |
|
294 * @param aVoipAddress VoIP address |
|
295 */ |
|
296 void SetVoipAddress( const TPEPhoneNumber& aVoipAddress ); |
|
297 |
|
298 /** |
|
299 * VoIP address. |
|
300 * |
|
301 * @since S60 v5.0 |
|
302 */ |
|
303 const TPEPhoneNumber& VoipAddress() const; |
|
304 |
|
305 /** |
|
306 * Set my address. |
|
307 * |
|
308 * @since S60 v5.0 |
|
309 * @param aMyAddress My address |
|
310 */ |
|
311 void SetMyAddress( const TPEPhoneNumber& aMyAddress ); |
|
312 |
|
313 /** |
|
314 * My address. |
|
315 * |
|
316 * @since S60 v5.0 |
|
317 */ |
|
318 const TPEPhoneNumber& MyAddress() const; |
|
319 |
|
320 /** |
|
321 * Save contact link. Ownership is transferred. |
|
322 * |
|
323 * @since S60 v5.0 |
|
324 * @param aCallId Identification for call |
|
325 * @param aDataStore Logs datastore |
|
326 */ |
|
327 void SetContactLink( const HBufC8* aContactLink ); |
|
328 |
|
329 /** |
|
330 * Contact link to phonebook. |
|
331 * |
|
332 * @since S60 v5.0 |
|
333 */ |
|
334 const HBufC8& ContactLink() const; |
|
335 |
|
336 |
|
337 private: |
|
338 CPELogInfo(); |
|
339 |
|
340 |
|
341 private: // data, public because no processing done in this class |
|
342 TPELogEventType iEventType; // The logged event type data,voice. |
|
343 RMobileCall::TMobileCallDirection iCallDirection;// Call direction (0=MO/1=MT) |
|
344 TInt iCallId; |
|
345 TPEPhoneNumber iPhoneNumber; |
|
346 TPEContactName iName; // Firstname + Lastname |
|
347 TPEState iCallState; |
|
348 TTimeIntervalSeconds iDuration; // Call duration (seconds) |
|
349 CCCECallParameters::TCCELineType iCurrentLine; // Call line. |
|
350 TPEPhoneNumberIdType iPhoneNumberId; |
|
351 TBool iLoggingEnabled; // Logging indicator |
|
352 TTime iCallStartTime; // Start time |
|
353 TBool iMissedCall; // Missed call indicator |
|
354 TBool iForcedCompletion; // indicates that entry should be completed |
|
355 TUint32 iServiceId; // Service Id for the call |
|
356 /** voip address of remote party */ |
|
357 TPEPhoneNumber iVoipAddress; |
|
358 /** own address during the logged call */ |
|
359 TPEPhoneNumber iMyAddress; |
|
360 |
|
361 /** |
|
362 * Contact id/link |
|
363 * Own. |
|
364 */ |
|
365 const HBufC8* iContactLink; |
|
366 |
|
367 }; |
|
368 |
|
369 #endif // CPELOGINFO_H |
|