|
1 /* |
|
2 * Copyright (c) 2002-2005 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: Class for doing Initilization of protocol handler operation. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef C_COMASUPLDEINITIALIZER_H |
|
21 #define C_COMASUPLDEINITIALIZER_H |
|
22 |
|
23 #include <e32base.h> |
|
24 #include "epos_csuplprotocolmanagerbase.h" // interface |
|
25 /** |
|
26 * MCompleteDeInitialization ... observer for De-initilization completion. |
|
27 * |
|
28 * @lib eposomasuplprotocolhandler.lib |
|
29 * @since S60 5.2 |
|
30 */ |
|
31 class MCompleteDeInitialization |
|
32 { |
|
33 public: |
|
34 /** |
|
35 * DeInitilizationCompletedL Method,called after request has been completed by Active Scheduler |
|
36 * @since S60 5.2 |
|
37 * @param aError,Error code occured during initilization |
|
38 * @return None |
|
39 */ |
|
40 virtual void DeInitilizationCompletedL(TInt aError)=0; |
|
41 |
|
42 |
|
43 }; |
|
44 /** |
|
45 * Class for doing De-initilization of protocol handler. |
|
46 * |
|
47 * @lib eposomasuplprotocolhandler.lib |
|
48 * @since S60 5.2 |
|
49 */ |
|
50 class COMASuplTrace; |
|
51 |
|
52 class COMASuplDeInitilizer : public CActive |
|
53 { |
|
54 |
|
55 public : // Constructor |
|
56 |
|
57 /** |
|
58 * NewL Method. |
|
59 * @since S60 5.2 |
|
60 * @param MCompleteDeInitilization |
|
61 * @return Instance of COMASuplDeInitilizer |
|
62 */ |
|
63 static COMASuplDeInitilizer* NewL( MCompleteDeInitialization& aObserver ); |
|
64 |
|
65 /** |
|
66 * Destructor. |
|
67 */ |
|
68 ~COMASuplDeInitilizer(); |
|
69 |
|
70 void Deinitialize( CSUPLProtocolManagerBase* aOMASuplProtocolHandler ); |
|
71 |
|
72 private : |
|
73 |
|
74 |
|
75 /** |
|
76 * Constuctor |
|
77 * @since S60 5.2 |
|
78 * @param aObserver, MCompleteDeInitilization |
|
79 * @return None |
|
80 */ |
|
81 COMASuplDeInitilizer(MCompleteDeInitialization& aObserver); |
|
82 |
|
83 /** |
|
84 * By default Symbian 2nd phase constructor is private. |
|
85 */ |
|
86 void ConstructL(); |
|
87 |
|
88 |
|
89 |
|
90 protected : // Functions from CActive |
|
91 |
|
92 /** |
|
93 * From CActive |
|
94 * To handle request completion |
|
95 */ |
|
96 void RunL(); |
|
97 |
|
98 /** |
|
99 * From CActive |
|
100 * To cancel the asynchronous requests |
|
101 */ |
|
102 void DoCancel(); |
|
103 |
|
104 private : //Data |
|
105 //Tracing utility |
|
106 COMASuplTrace* iTrace; |
|
107 |
|
108 |
|
109 //Observer for initilization |
|
110 MCompleteDeInitialization& iObserver; |
|
111 CSUPLProtocolManagerBase* iOMASuplProtocolHandler; |
|
112 |
|
113 |
|
114 |
|
115 }; |
|
116 |
|
117 #endif //C_COMASUPLDEINITIALIZER_H |