|
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: active object, that monitors IKE plugin session error |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_ERROROBSERVER_H |
|
20 #define C_ERROROBSERVER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 // FORWARD DECLARATIONS |
|
25 class MIkeDebug; |
|
26 class MIkePluginSessionIf; |
|
27 class MIkePluginSessionHandlerCallback; |
|
28 |
|
29 /** |
|
30 * Error observer. |
|
31 * Active object that provides functionality for observing IKE plugin session |
|
32 * error. |
|
33 * |
|
34 * @lib internal (kmdserver.exe) |
|
35 */ |
|
36 class CErrorObserver : public CActive |
|
37 { |
|
38 public: |
|
39 /** |
|
40 * Two-phased constructor. |
|
41 * @param aIkePluginSession IKE plugin session |
|
42 * @param aCallback Callback interface |
|
43 * @param aDebug Debug trace interface |
|
44 */ |
|
45 static CErrorObserver* NewL( MIkePluginSessionIf& aIkePluginSession, |
|
46 MIkePluginSessionHandlerCallback& aCallback, |
|
47 MIkeDebug& aDebug ); |
|
48 |
|
49 /** |
|
50 * Destructor. |
|
51 */ |
|
52 ~CErrorObserver(); |
|
53 |
|
54 /** |
|
55 * Starts observing internal address change. |
|
56 */ |
|
57 void StartObserving(); |
|
58 |
|
59 private: |
|
60 |
|
61 CErrorObserver( MIkePluginSessionIf& aIkePluginSession, |
|
62 MIkePluginSessionHandlerCallback& aCallback, |
|
63 MIkeDebug& aDebug ); |
|
64 |
|
65 void ConstructL(); |
|
66 |
|
67 // from base class CActive |
|
68 |
|
69 /** |
|
70 * From CActive |
|
71 * Handles completion of asynchronous notification request. |
|
72 */ |
|
73 void RunL(); |
|
74 |
|
75 /** |
|
76 * From CActive |
|
77 * Handles cancellation of asynchronous notification request. |
|
78 */ |
|
79 void DoCancel(); |
|
80 |
|
81 private: // data |
|
82 |
|
83 /** |
|
84 * IKE plugin session. |
|
85 * Not own. |
|
86 */ |
|
87 MIkePluginSessionIf& iIkePluginSession; |
|
88 |
|
89 /** |
|
90 * Callback interface. |
|
91 * Not own. |
|
92 */ |
|
93 MIkePluginSessionHandlerCallback& iCallback; |
|
94 |
|
95 /** |
|
96 * Debug trace interface. |
|
97 * Not own. |
|
98 */ |
|
99 MIkeDebug& iDebug; |
|
100 }; |
|
101 |
|
102 |
|
103 #endif // C_ERROROBSERVER_H |