|
1 /** |
|
2 * Copyright (c) 2003-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: |
|
15 * Declares direct connection state classes. |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 |
|
22 /** |
|
23 @file Nd_directstates.h |
|
24 @internalComponent |
|
25 */ |
|
26 |
|
27 #ifndef __ND_DIRECTSTATES_H__ |
|
28 #define __ND_DIRECTSTATES_H__ |
|
29 |
|
30 #include <comms-infras/cagentsmbase.h> |
|
31 |
|
32 |
|
33 class CDirCtInit : public CAgentStateBase |
|
34 /** |
|
35 Direct Connection Init State. |
|
36 |
|
37 @internalComponent |
|
38 */ |
|
39 { |
|
40 public: |
|
41 static CDirCtInit* NewL(MAgentStateMachineEnv& aSMObserver, MNetdialEnv& aNdEnv); |
|
42 virtual ~CDirCtInit(); |
|
43 // Derived from CAgentStateBase |
|
44 virtual void StartState(); |
|
45 virtual CAgentStateBase* NextStateL(TBool aContinue); |
|
46 private: |
|
47 CDirCtInit(MAgentStateMachineEnv& aSMObserver, MNetdialEnv& aNdEnv); |
|
48 void ConstructL(); |
|
49 private: |
|
50 virtual void DoCancel(); |
|
51 virtual void RunL(); |
|
52 private: |
|
53 MNetdialEnv* iNdEnv; |
|
54 }; |
|
55 |
|
56 |
|
57 class CDirCtScanScript : public CAgentStateBase, public MNetDialScriptObserver |
|
58 /** |
|
59 Direct Connection Scan Script State. |
|
60 |
|
61 @internalComponent |
|
62 */ |
|
63 { |
|
64 public: |
|
65 static CDirCtScanScript* NewL(MAgentStateMachineEnv& aSMObserver, MNetdialEnv& aNdEnv); |
|
66 virtual ~CDirCtScanScript(); |
|
67 // Derived from CAgentStateBase |
|
68 virtual void StartState(); |
|
69 virtual CAgentStateBase* NextStateL(TBool aContinue); |
|
70 void ScriptFunctionComplete(TInt aError); |
|
71 private: |
|
72 CDirCtScanScript(MAgentStateMachineEnv& aSMObserver, MNetdialEnv& aNdEnv); |
|
73 void ConstructL(); |
|
74 private: |
|
75 virtual void DoCancel(); |
|
76 virtual void RunL(); |
|
77 private: |
|
78 MNetdialEnv* iNdEnv; |
|
79 }; |
|
80 |
|
81 class CDirCtGetLoginInfo : public CGetLoginInfo |
|
82 /** |
|
83 Direct Connection Get Login Info State. |
|
84 |
|
85 @internalComponent |
|
86 */ |
|
87 { |
|
88 public: |
|
89 static CDirCtGetLoginInfo* NewL(MAgentStateMachineEnv& aSMObserver, MNetdialEnv& aNdEnv); |
|
90 virtual CAgentStateBase* NextStateL(TBool aContinue); |
|
91 ~CDirCtGetLoginInfo(); |
|
92 private: |
|
93 CDirCtGetLoginInfo(MAgentStateMachineEnv& aSMObserver, MNetdialEnv& aNdEnv); |
|
94 virtual void ConstructL(); |
|
95 }; |
|
96 |
|
97 class CDirCtConnect : public CAgentStateBase, public MNetDialScriptObserver |
|
98 /** |
|
99 Direct Connection Connect State. |
|
100 |
|
101 @internalComponent |
|
102 */ |
|
103 { |
|
104 public: |
|
105 static CDirCtConnect* NewL(MAgentStateMachineEnv& aSMObserver, MNetdialEnv& aNdEnv); |
|
106 virtual ~CDirCtConnect(); |
|
107 // Derived from CAgentStateBase |
|
108 virtual void StartState(); |
|
109 virtual CAgentStateBase* NextStateL(TBool aContinue); |
|
110 void ScriptFunctionComplete(TInt aError); |
|
111 private: |
|
112 CDirCtConnect(MAgentStateMachineEnv& aSMObserver, MNetdialEnv& aNdEnv); |
|
113 void ConstructL(); |
|
114 void DoStartStateL(); |
|
115 virtual void DoCancel(); |
|
116 virtual void RunL(); |
|
117 private: |
|
118 MNetdialEnv* iNdEnv; |
|
119 }; |
|
120 |
|
121 class CDirCtOpen : public CAgentStateBase |
|
122 /** |
|
123 Direct Connection Open State. |
|
124 |
|
125 @internalComponent |
|
126 */ |
|
127 { |
|
128 public: |
|
129 static CDirCtOpen* NewL(MAgentStateMachineEnv& aSMObserver, MNetdialEnv& aNdEnv); |
|
130 virtual ~CDirCtOpen(); |
|
131 // Derived from CAgentStateBase |
|
132 virtual void StartState(); |
|
133 virtual CAgentStateBase* NextStateL(TBool aContinue); |
|
134 private: |
|
135 CDirCtOpen(MAgentStateMachineEnv& aSMObserver, MNetdialEnv& aNdEnv); |
|
136 void ConstructL(); |
|
137 virtual void DoCancel(); |
|
138 virtual void RunL(); |
|
139 private: |
|
140 MNetdialEnv* iNdEnv; |
|
141 }; |
|
142 |
|
143 class CDirCtHangUp : public CAgentStateBase |
|
144 /** |
|
145 Direct Connection HangUp State. |
|
146 |
|
147 @internalComponent |
|
148 */ |
|
149 { |
|
150 public: |
|
151 static CDirCtHangUp* NewL(MAgentStateMachineEnv& aSMObserver, MNetdialEnv& aNdEnv); |
|
152 virtual ~CDirCtHangUp(); |
|
153 // Derived from CAgentStateBase |
|
154 virtual void StartState(); |
|
155 virtual CAgentStateBase* NextStateL(TBool aContinue); |
|
156 private: |
|
157 CDirCtHangUp(MAgentStateMachineEnv& aSMObserver, MNetdialEnv& aNdEnv); |
|
158 void ConstructL(); |
|
159 virtual void DoCancel(); |
|
160 virtual void RunL(); |
|
161 private: |
|
162 MNetdialEnv* iNdEnv; |
|
163 }; |
|
164 |
|
165 class CDirCtDisconnect : public CAgentStateBase |
|
166 /** |
|
167 Direct Connection Disconnect State. |
|
168 |
|
169 @internalComponent |
|
170 */ |
|
171 { |
|
172 public: |
|
173 static CDirCtDisconnect* NewL(MAgentStateMachineEnv& aSMObserver, MNetdialEnv& aNdEnv); |
|
174 virtual ~CDirCtDisconnect(); |
|
175 // Derived from CAgentStateBase |
|
176 virtual void StartState(); |
|
177 virtual CAgentStateBase* NextStateL(TBool aContinue); |
|
178 private: |
|
179 CDirCtDisconnect(MAgentStateMachineEnv& aSMObserver, MNetdialEnv& aNdEnv); |
|
180 void ConstructL(); |
|
181 virtual void DoCancel(); |
|
182 virtual void RunL(); |
|
183 private: |
|
184 MNetdialEnv* iNdEnv; |
|
185 }; |
|
186 |
|
187 class CDirCtOpenDataPort : public CAgentStateBase |
|
188 /** |
|
189 Direct Connection Open Data Port State. |
|
190 |
|
191 @internalComponent |
|
192 */ |
|
193 { |
|
194 public: |
|
195 static CDirCtOpenDataPort* NewL(MAgentStateMachineEnv& aSMObserver, MNetdialEnv& aNdEnv); |
|
196 virtual ~CDirCtOpenDataPort(); |
|
197 //CAgentStateBase Inheritance |
|
198 virtual void StartState(); |
|
199 virtual CAgentStateBase* NextStateL(TBool aContinue); |
|
200 private: |
|
201 CDirCtOpenDataPort(MAgentStateMachineEnv& aSMObserver, MNetdialEnv& aNdEnv); |
|
202 virtual void ConstructL(); |
|
203 virtual void DoCancel(); |
|
204 virtual void RunL(); |
|
205 private: |
|
206 MNetdialEnv* iNdEnv; |
|
207 }; |
|
208 |
|
209 class CDirCtConfigureCommPort : public CAgentStateBase |
|
210 /** |
|
211 Direct Connection Configure Comm Port State. |
|
212 |
|
213 @internalComponent |
|
214 */ |
|
215 { |
|
216 public: |
|
217 static CDirCtConfigureCommPort* NewL(MAgentStateMachineEnv& aSMObserver, MNetdialEnv& aNdEnv); |
|
218 virtual ~CDirCtConfigureCommPort(); |
|
219 // Derived from CAgentStateBase |
|
220 virtual void StartState(); |
|
221 virtual CAgentStateBase* NextStateL(TBool aContinue); |
|
222 |
|
223 private: |
|
224 CDirCtConfigureCommPort(MAgentStateMachineEnv& aSMObserver, MNetdialEnv& aNdEnv); |
|
225 void ConstructL(); |
|
226 void DoStartStateL(); |
|
227 virtual void DoCancel(); |
|
228 virtual void RunL(); |
|
229 private: |
|
230 MNetdialEnv* iNdEnv; |
|
231 TCommConfig iConfigPckg; |
|
232 }; |
|
233 |
|
234 class CDirCtReConfigureCommPort : public CAgentStateBase |
|
235 /** |
|
236 Direct Connection ReConfigure Comm Port State. |
|
237 |
|
238 @internalComponent |
|
239 */ |
|
240 { |
|
241 public: |
|
242 static CDirCtReConfigureCommPort* NewL(MAgentStateMachineEnv& aSMObserver, MNetdialEnv& aNdEnv, TBool aReConnect); |
|
243 virtual ~CDirCtReConfigureCommPort(); |
|
244 // Derived from CAgentStateBase |
|
245 virtual void StartState(); |
|
246 virtual CAgentStateBase* NextStateL(TBool aContinue); |
|
247 |
|
248 private: |
|
249 CDirCtReConfigureCommPort(MAgentStateMachineEnv& aSMObserver, MNetdialEnv& aNdEnv, TBool aReConnect); |
|
250 void ConstructL(); |
|
251 void DoStartStateL(); |
|
252 virtual void DoCancel(); |
|
253 virtual void RunL(); |
|
254 private: |
|
255 MNetdialEnv* iNdEnv; |
|
256 TBool iDropping; |
|
257 TBool iReConnect; |
|
258 }; |
|
259 |
|
260 class CDirCtCloseDataPort : public CAgentStateBase |
|
261 /** |
|
262 Direct Connection Close Data Port State. |
|
263 |
|
264 @internalComponent |
|
265 */ |
|
266 { |
|
267 public: |
|
268 static CDirCtCloseDataPort* NewL(MAgentStateMachineEnv& aSMObserver, MNetdialEnv& aNdEnv, TInt aError); |
|
269 virtual ~CDirCtCloseDataPort(); |
|
270 //CAgentStateBase Inheritance |
|
271 virtual void StartState(); |
|
272 virtual CAgentStateBase* NextStateL(TBool aContinue); |
|
273 //MNetDialScriptObserver Inheritance |
|
274 private: |
|
275 CDirCtCloseDataPort(MAgentStateMachineEnv& aSMObserver, MNetdialEnv& aNdEnv, TInt aError); |
|
276 virtual void ConstructL(); |
|
277 virtual void DoCancel(); |
|
278 virtual void RunL(); |
|
279 private: |
|
280 MNetdialEnv* iNdEnv; |
|
281 TInt iError; |
|
282 }; |
|
283 |
|
284 #endif |