|
1 /* |
|
2 * Copyright (c) 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: KMD event logger |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_KMDEVENTLOGGER_H |
|
20 #define C_KMDEVENTLOGGER_H |
|
21 |
|
22 #include "kmdeventloggerif.h" |
|
23 |
|
24 // FORWARD DECLARATIONS |
|
25 class MIkeDebug; |
|
26 |
|
27 /** |
|
28 * KMD event logger. |
|
29 * |
|
30 * Handles logging of KMD specific events to event log. |
|
31 * |
|
32 * @lib internal (kmdserver.exe) |
|
33 */ |
|
34 class CKmdEventLogger : public CBase, |
|
35 public MKmdEventLoggerIf |
|
36 { |
|
37 public: |
|
38 |
|
39 /** |
|
40 * Two-phased constructor. |
|
41 * @param aDebug Debug trace interface |
|
42 */ |
|
43 static CKmdEventLogger* NewL( MIkeDebug& aDebug ); |
|
44 |
|
45 /** |
|
46 * Destructor. |
|
47 */ |
|
48 ~CKmdEventLogger(); |
|
49 |
|
50 // from base class MKmdEventLoggerIf |
|
51 |
|
52 /** |
|
53 * From MKmdEventLoggerIf |
|
54 * Writes event to event log. |
|
55 * |
|
56 * @param aCategory Log event category |
|
57 * @param aMsgId Msg Id |
|
58 * @param aStatus Status |
|
59 * @param aVpnIapId VPN IAP Id |
|
60 * @param aSgwIp SGW IP address |
|
61 * @param aLocalAddr Local IP address |
|
62 */ |
|
63 void LogEvent( TLogCategory aCategory, |
|
64 TInt aMsgId, |
|
65 TInt aStatus, |
|
66 TUint32 aVpnIapId, |
|
67 const TInetAddr* aGwIp, |
|
68 const TInetAddr* aLocalAddr = NULL ); |
|
69 |
|
70 /** |
|
71 * From MKmdEventLoggerIf |
|
72 * Writes event to event log. |
|
73 * |
|
74 * @param aCategory Log event category |
|
75 * @param aMsgId Msg Id |
|
76 * @param aStatus Status |
|
77 * @param aVpnIapId VPN IAP Id |
|
78 * @param aSgwIp SGW IP address |
|
79 * @param aLocalAddr Local IP address |
|
80 */ |
|
81 void LogEvent( TKmdLogCategory aCategory, |
|
82 TInt aMsgId, |
|
83 TInt aStatus, |
|
84 TUint32 aVpnIapId, |
|
85 const TInetAddr* aGwIp, |
|
86 const TInetAddr* aLocalAddr = NULL ); |
|
87 |
|
88 private: |
|
89 CKmdEventLogger( MIkeDebug& aDebug ); |
|
90 |
|
91 void ConstructL(); |
|
92 |
|
93 private: // data |
|
94 |
|
95 /** |
|
96 * Event mediator. |
|
97 * Own. |
|
98 */ |
|
99 REventMediator iEventMediator; |
|
100 |
|
101 /** |
|
102 * Debug trace interface. |
|
103 * Not own. |
|
104 */ |
|
105 MIkeDebug& iDebug; |
|
106 |
|
107 }; |
|
108 |
|
109 |
|
110 #endif // C_KMDEVENTLOGGER_H |