1 /* |
|
2 * Copyright (c) 2007-2008 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: Implementation of CWsfDisconnectActiveWrapper. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CWSFDISCONNECTACTIVEWRAPPER_H |
|
19 #define CWSFDISCONNECTACTIVEWRAPPER_H |
|
20 |
|
21 // EXTERNAL INCLUDES |
|
22 #include <e32base.h> |
|
23 |
|
24 // INTERNAL INCLUDES |
|
25 #include "wsfaicontroller.h" |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CWsfModel; |
|
29 |
|
30 /** |
|
31 * Active object that disconnects wlan |
|
32 * |
|
33 * @lib wsfaiplugin.lib |
|
34 * @since S60 v5.2 |
|
35 */ |
|
36 class CWsfDisconnectActiveWrapper : public CActive |
|
37 { |
|
38 public: |
|
39 // Constructors and destructor |
|
40 |
|
41 /** |
|
42 * Destructor |
|
43 * @since S60 5.2 |
|
44 */ |
|
45 ~CWsfDisconnectActiveWrapper(); |
|
46 |
|
47 /** |
|
48 * Two-phased constructor. |
|
49 * @since S60 5.2 |
|
50 */ |
|
51 static CWsfDisconnectActiveWrapper* NewL( CWsfModel* aModel ); |
|
52 |
|
53 /** |
|
54 * Two-phased constructor. |
|
55 * @since S60 5.2 |
|
56 */ |
|
57 static CWsfDisconnectActiveWrapper* NewLC( CWsfModel* aModel ); |
|
58 |
|
59 public: |
|
60 |
|
61 /** |
|
62 * Function for making the initial request |
|
63 * @since S60 5.2 |
|
64 */ |
|
65 void Start(); |
|
66 |
|
67 private: |
|
68 |
|
69 /** |
|
70 * constructor |
|
71 */ |
|
72 CWsfDisconnectActiveWrapper(); |
|
73 |
|
74 /** |
|
75 * Factory function. |
|
76 * @since S60 5.2 |
|
77 * @param aModel CWsfModel pointer |
|
78 */ |
|
79 void ConstructL( CWsfModel* aModel ); |
|
80 |
|
81 private: |
|
82 // From CActive |
|
83 /** |
|
84 * @see CActive |
|
85 */ |
|
86 void RunL(); |
|
87 |
|
88 /** |
|
89 * @see CActive |
|
90 */ |
|
91 void DoCancel(); |
|
92 |
|
93 /** |
|
94 * @see CActive |
|
95 */ |
|
96 TInt RunError( TInt aError ); |
|
97 |
|
98 private: |
|
99 /** |
|
100 * States of the active object |
|
101 */ |
|
102 enum CWsfDisconnectActiveWrapperState |
|
103 { |
|
104 EUninitialized, // Uninitialized |
|
105 EInitialized, // Initalized |
|
106 EError |
|
107 // Error condition |
|
108 }; |
|
109 |
|
110 private: |
|
111 |
|
112 /** |
|
113 * State of the active object |
|
114 */ |
|
115 TInt iState; // State of the active object |
|
116 |
|
117 /** |
|
118 * Request result |
|
119 */ |
|
120 TPckgBuf<TBool> iPckg; |
|
121 |
|
122 /** |
|
123 * Reference to Model |
|
124 */ |
|
125 CWsfModel* iModel; |
|
126 |
|
127 }; |
|
128 |
|
129 #endif // CWSFDISCONNECTACTIVEWRAPPER_H |
|