|
1 /** |
|
2 * Copyright (c) 1997-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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 /** |
|
21 @file EVENTLOGGER.H |
|
22 */ |
|
23 |
|
24 #ifndef __EVENTLOGGER_H__ |
|
25 #define __EVENTLOGGER_H__ |
|
26 #include <logcli.h> |
|
27 #include <logwraplimits.h> |
|
28 |
|
29 /** |
|
30 Event Logging facility |
|
31 @internalComponent |
|
32 */ |
|
33 const TLogId KGenconnLogWaitingForLogId = KLogNullId -1; |
|
34 |
|
35 /** |
|
36 Event Logging facility |
|
37 @internalComponent |
|
38 */ |
|
39 const TInt KBytesInfoNotAvailable = -1; |
|
40 |
|
41 class CEventLogger : public CActive |
|
42 /** |
|
43 @internalTechnology |
|
44 */ |
|
45 { |
|
46 public: |
|
47 enum { KConnectionStatusIdNotAvailable = -1, |
|
48 KEventStateMaxCount = 10, |
|
49 KDatabufferSize = 64}; |
|
50 IMPORT_C static CEventLogger* NewL(); |
|
51 IMPORT_C virtual ~CEventLogger(); |
|
52 IMPORT_C void Cancel(); |
|
53 IMPORT_C void LogCallStart(const TDesC& aRemote,TInt aLogDir, const TDesC& aTelNum, TUid aDataEventType, TRequestStatus& aStatus); |
|
54 IMPORT_C void LogCallEnd(TRequestStatus& aStatus); |
|
55 IMPORT_C void LogDataTransferred(TInt64 aBytesSent, TInt64 aBytesReceived, TUid aDataEventType, TRequestStatus& aStatus); |
|
56 IMPORT_C void LogDataAddEvent(TInt aRConnectionStatusId, const TDesC& aRemote, TInt aLogDir, const TDesC& aTelNum, TUid aDataEventType); |
|
57 TInt UpdateLogEventParam(CLogEvent & aLogEvent, TInt aRConnectionStatusId, const TUid& aDataEventType, const TInt64& aBytesSent, const TInt64& aBytesReceived); |
|
58 IMPORT_C TInt LogDataUpdateEvent(TInt aRConnectionStatusId, const TUid& aDataEventType, const TInt64& aBytesSent, const TInt64& aBytesReceived); |
|
59 IMPORT_C TInt LogDataUpdateEvent(TInt aRConnectionStatusId, const TUid& aDataEventType); |
|
60 IMPORT_C void LogDataNotifyLastEventUpdate(TRequestStatus* aStatus); |
|
61 |
|
62 /** from CActive */ |
|
63 void DoCancel(); |
|
64 void RunL(); |
|
65 private: |
|
66 CEventLogger(); |
|
67 void ConstructL(); |
|
68 private: |
|
69 CLogWrapper* iLogWrap; |
|
70 CLogEvent* iCurrentLogEvent; |
|
71 CArrayPtrFlat<CLogEvent>* iLogEventQueue; |
|
72 RFs iFsEventLog; |
|
73 TRequestStatus* iNotificationRequestStatus; |
|
74 }; |
|
75 |
|
76 #endif |
|
77 |
|
78 |