|
1 /* |
|
2 * Copyright (c) 2001-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 the License "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: CWiFiProtActiveResp class |
|
15 * |
|
16 */ |
|
17 |
|
18 /* |
|
19 * %version: tr1cfwln#7 % |
|
20 */ |
|
21 |
|
22 #ifndef C_WIFIPROTACTIVERESP_H |
|
23 #define C_WIFIPROTACTIVERESP_H |
|
24 |
|
25 // INCLUDES |
|
26 #include <e32base.h> |
|
27 #include "wifiparams.h" |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * ActiveObject for asynchronous operations |
|
33 */ |
|
34 NONSHARABLE_CLASS( CWiFiProtActiveResp ) : public CActive |
|
35 { |
|
36 public: // Constructors and destructor |
|
37 /** |
|
38 * Two-phased constructor. |
|
39 * @param aSSid contains SSid of the network we want to configure |
|
40 * @param aConnectionNeeded ETrue if we need a connection |
|
41 * via the configured network |
|
42 * @param aUidsReturned uids of the configured connection methods |
|
43 * @param aReturnValue - possible return values are ok, cancel |
|
44 * process and not use |
|
45 * protected setup (No Automatic Setup). |
|
46 */ |
|
47 static CWiFiProtActiveResp* NewL( const TWlanSsid& aSSid, |
|
48 TBool aConnectionNeeded, RArray<TUint32>& aUidsReturned, |
|
49 WiFiProt::TWiFiReturn& aReturnValue ); |
|
50 |
|
51 /** |
|
52 * Two-phased constructor. |
|
53 * @param aSSid contains SSid of the network we want to configure |
|
54 * via the configured network |
|
55 * @param aNetworkSettings the configured network settings |
|
56 * to be returned |
|
57 * @param aReturnValue - possible return values are ok, cancel |
|
58 * process and not use |
|
59 * protected setup (No Automatic Setup). |
|
60 */ |
|
61 static CWiFiProtActiveResp* NewL( const TWlanSsid& aSSid, |
|
62 TWlanProtectedSetupCredentialAttribute& aNetworkSettings, |
|
63 WiFiProt::TWiFiReturn& aReturnValue ); |
|
64 |
|
65 /** |
|
66 * Destructor. |
|
67 */ |
|
68 virtual ~CWiFiProtActiveResp(); |
|
69 |
|
70 public: // From base class |
|
71 /** |
|
72 * This function is called when the scheduled function ends. |
|
73 */ |
|
74 void RunL(); |
|
75 |
|
76 /** |
|
77 * Cancel operations. |
|
78 */ |
|
79 void DoCancel(); |
|
80 |
|
81 |
|
82 public: // New functions |
|
83 /** |
|
84 * Add this class on the ActiveScheduler and puts itself active. |
|
85 * @param aStatus The status that is checked by the caller of the |
|
86 * Authenticate dialog. |
|
87 */ |
|
88 void Observe( TRequestStatus &aStatus ); |
|
89 |
|
90 /** |
|
91 * Returns the TWiFiInputParams |
|
92 * @return A pointer to iWiFiInputParams. |
|
93 */ |
|
94 TPckgBuf<WiFiProt::TWiFiInputParams>* InputBuffer(); |
|
95 |
|
96 /** |
|
97 * Returns the TWiFiOutputParams |
|
98 * @return A pointer to iWiFiOutputParams. |
|
99 */ |
|
100 TPckgBuf<WiFiProt::TWiFiOutputParams>* OutputBuffer(); |
|
101 |
|
102 /** |
|
103 * Returns the TWiFiConnOutputParams |
|
104 * @return A pointer to iConnWiFiOutputParams. |
|
105 */ |
|
106 TPckgBuf<WiFiProt::TWiFiConnOutputParams>* ConnOutputBuffer(); |
|
107 |
|
108 private: |
|
109 /** |
|
110 * C++ default constructor. |
|
111 * @param aSSid contains SSid of the network we want to configure |
|
112 * @param aConnectionNeeded ETrue if we need a connection via the |
|
113 * configured network |
|
114 * @param aUidsReturned uids of the configured connection methods |
|
115 * @param aReturnValue - possible return values are ok, cancel |
|
116 * process and not use |
|
117 * protected setup (No Automatic Setup). |
|
118 */ |
|
119 CWiFiProtActiveResp( const TWlanSsid& aSSid, |
|
120 TBool aConnectionNeeded, RArray<TUint32>& aUidsReturned, |
|
121 WiFiProt::TWiFiReturn& aReturnValue ); |
|
122 |
|
123 /** |
|
124 * C++ default constructor. |
|
125 * @param aSSid contains SSid of the network we want to configure |
|
126 * @param aNetworkSettings network settings to be returned |
|
127 * @param aReturnValue - possible return values are ok, cancel |
|
128 * process and not use |
|
129 * protected setup (No Automatic Setup). |
|
130 */ |
|
131 CWiFiProtActiveResp( const TWlanSsid& aSSid, |
|
132 TWlanProtectedSetupCredentialAttribute& aNetworkSettings, |
|
133 WiFiProt::TWiFiReturn& aReturnValue ); |
|
134 /** |
|
135 * By default Symbian 2nd phase constructor is private. |
|
136 */ |
|
137 void ConstructL( ); |
|
138 |
|
139 private: // Data |
|
140 // The status that is checked by the caller of the Wi-Fi |
|
141 // Protected Setup ui. Not owned. |
|
142 TRequestStatus* iRequestStatus; |
|
143 |
|
144 // The address of the area where the caller of the Wi-Fi |
|
145 // Protected Setup ui expects the value for iap list. Not owned. |
|
146 RArray<TUint32>* iIapIds; |
|
147 |
|
148 //Contains the return value passed to the client |
|
149 WiFiProt::TWiFiReturn& iReturnValue; |
|
150 |
|
151 // Packed buffer containing Wi-Fi Protected Setup output parameters. |
|
152 TPckgBuf<WiFiProt::TWiFiOutputParams> iWiFiOutputParams; |
|
153 // Packed buffer containing Wi-Fi Protected Setup input parameters. |
|
154 TPckgBuf<WiFiProt::TWiFiInputParams> iWiFiInputParams; |
|
155 // Packed buffer containing Wi-Fi Protected Setup output parameters |
|
156 // for connection creation mode. |
|
157 TPckgBuf<WiFiProt::TWiFiConnOutputParams> iWiFiConnOutputParams; |
|
158 // network settings to be returned |
|
159 // used only for connection creation |
|
160 TWlanProtectedSetupCredentialAttribute* iNetworkSettings; |
|
161 }; |
|
162 |
|
163 |
|
164 #endif //C_WIFIPROTACTIVERESP_H |
|
165 |
|
166 // End of File |