17
|
1 |
/*
|
|
2 |
* Copyright (c) 2004 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: Logout UI control.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef __CCNUILOGOUTUICNTRLSTEP_H
|
|
19 |
#define __CCNUILOGOUTUICNTRLSTEP_H
|
|
20 |
|
|
21 |
// INCLUDES
|
|
22 |
#include <E32Base.h>
|
|
23 |
#include "MCnUiCntrlStep.h"
|
|
24 |
#include "MCnUiOpProgressStateObserver.h"
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
//FORWARD DECLARATION
|
|
29 |
class MCnUiUiControlContext;
|
|
30 |
class MCnUiConnWaitNote;
|
|
31 |
class CCnUiConnCloser;
|
|
32 |
class CPEngNWSessionSlotID2;
|
|
33 |
|
|
34 |
|
|
35 |
// CLASS DECLARATION
|
|
36 |
/**
|
|
37 |
* Logout UI control.
|
|
38 |
* Performs logout using the CCnUiConnCloser.
|
|
39 |
*
|
|
40 |
* This class behaviour can be extended by deriving.
|
|
41 |
*
|
|
42 |
* @since 2.1
|
|
43 |
*/
|
|
44 |
NONSHARABLE_CLASS( CCnUiLogoutUiCntrlStep ) : public CBase,
|
|
45 |
public MCnUiCntrlStep,
|
|
46 |
public MCnUiOpProgressStateObserver
|
|
47 |
{
|
|
48 |
protected: //own enumerations
|
|
49 |
/**
|
|
50 |
* Return status for succesful logout init.
|
|
51 |
*/
|
|
52 |
enum TCnUiLogoutInitStatus
|
|
53 |
{
|
|
54 |
ECnUiLogoutInitContinue = 1 //must be positive to distinguish from KErrXXX error codes
|
|
55 |
};
|
|
56 |
|
|
57 |
public: // Two-phased constructors and destructor
|
|
58 |
|
|
59 |
/**
|
|
60 |
* Two-phased constructor.
|
|
61 |
*/
|
|
62 |
static CCnUiLogoutUiCntrlStep* NewLC( MCnUiUiControlContext& aCCntxt,
|
|
63 |
CIMPSSAPSettings& aLogoutSap,
|
|
64 |
const CPEngNWSessionSlotID2& aNWSessionSlotID );
|
|
65 |
|
|
66 |
|
|
67 |
/**
|
|
68 |
* Destructor.
|
|
69 |
*/
|
|
70 |
virtual ~CCnUiLogoutUiCntrlStep();
|
|
71 |
|
|
72 |
|
|
73 |
protected: //protected to allow derivation
|
|
74 |
|
|
75 |
/**
|
|
76 |
* C++ constructor.
|
|
77 |
*/
|
|
78 |
CCnUiLogoutUiCntrlStep( MCnUiUiControlContext& aCCntxt,
|
|
79 |
CIMPSSAPSettings& aLogoutSap );
|
|
80 |
|
|
81 |
|
|
82 |
/**
|
|
83 |
* Symbian OS constructor.
|
|
84 |
*/
|
|
85 |
void ConstructL( const CPEngNWSessionSlotID2& aNWSessionSlotID );
|
|
86 |
|
|
87 |
|
|
88 |
|
|
89 |
public: // New functions from MCnUiCntrlStep
|
|
90 |
|
|
91 |
|
|
92 |
/**
|
|
93 |
* Runs logout operation.
|
|
94 |
* Uses virtual DoInitLogoutStepL()
|
|
95 |
* to setup logout data and virtual
|
|
96 |
* DoHandleLogoutStatusL() to handle logout
|
|
97 |
* status code.
|
|
98 |
*
|
|
99 |
* @since 2.1
|
|
100 |
* @return Errorcode from logout.
|
|
101 |
*/
|
|
102 |
TInt RunStepL();
|
|
103 |
|
|
104 |
|
|
105 |
/**
|
|
106 |
* Handles logout complete.
|
|
107 |
*
|
|
108 |
* If there isn't anymore active network
|
|
109 |
* connection, issues connection restore
|
|
110 |
* for previously dropped network connections
|
|
111 |
* if needed.
|
|
112 |
*
|
|
113 |
* @since 2.1
|
|
114 |
* @return Always ECnUiStepContinueTeardown.
|
|
115 |
*/
|
|
116 |
TCnUiHandleCompleteStatus HandleCompleteL();
|
|
117 |
|
|
118 |
|
|
119 |
/**
|
|
120 |
* Undo step.
|
|
121 |
*
|
|
122 |
* @since 2.1
|
|
123 |
*/
|
|
124 |
void UndoStepL();
|
|
125 |
|
|
126 |
|
|
127 |
|
|
128 |
public: // New functions from MCnUiOpProgressStateObserver
|
|
129 |
|
|
130 |
/**
|
|
131 |
* Notification method to get notifications from
|
|
132 |
* MCnUiOpProgressStateObserver events.
|
|
133 |
*
|
|
134 |
* Sets up proper wait note by using the
|
|
135 |
* DoShowLogoutStateSpecificWaitnoteL();
|
|
136 |
*
|
|
137 |
* @param aStateId The state id from CCnUiConnCloser.
|
|
138 |
* @param aClient The accessed client.
|
|
139 |
* @since 2.1
|
|
140 |
*/
|
|
141 |
void HandleProgressStateEnter( TInt aStateId,
|
|
142 |
TIMPSConnectionClient aClient );
|
|
143 |
|
|
144 |
|
|
145 |
|
|
146 |
protected: // New helper & template functions for derived class use
|
|
147 |
|
|
148 |
|
|
149 |
/**
|
|
150 |
* Shows error note from simultaneous
|
|
151 |
* login operation.
|
|
152 |
*
|
|
153 |
* @since 2.1
|
|
154 |
*/
|
|
155 |
void ShowSimultaneousLoginOperationNoteL();
|
|
156 |
|
|
157 |
|
|
158 |
/**
|
|
159 |
* Framework method.
|
|
160 |
* Virtual method to initializes the logout operation.
|
|
161 |
*
|
|
162 |
* @since 2.1
|
|
163 |
*
|
|
164 |
* @param aClient Init has to initialize the aClient
|
|
165 |
* with the client id to log in.
|
|
166 |
*
|
|
167 |
* @return Error status from init. If init returns something
|
|
168 |
* else than ECnUiLogoutInitContinue login operation RunStepL()
|
|
169 |
* is breaked with return value.
|
|
170 |
*/
|
|
171 |
virtual TInt DoInitLogoutStepL( TIMPSConnectionClient& aClient );
|
|
172 |
|
|
173 |
|
|
174 |
/**
|
|
175 |
* Framework method.
|
|
176 |
*
|
|
177 |
* Virtual method to show proper wait note for
|
|
178 |
* logout state.
|
|
179 |
*
|
|
180 |
* @since 2.1
|
|
181 |
* @param aStateId State id from CCnUiConnCloser.
|
|
182 |
* @param aClient The accessed client.
|
|
183 |
*/
|
|
184 |
virtual void DoShowLogoutStateSpecificWaitnoteL( TInt aStateId,
|
|
185 |
TIMPSConnectionClient aClient );
|
|
186 |
|
|
187 |
|
|
188 |
|
|
189 |
/**
|
|
190 |
* Framework method.
|
|
191 |
*
|
|
192 |
* Virtual method to show proper note for
|
|
193 |
* successful logout.
|
|
194 |
*
|
|
195 |
* @since 2.1
|
|
196 |
* @param aClient The accessed client.
|
|
197 |
*/
|
|
198 |
virtual void DoShowLogoutOkNoteL( TIMPSConnectionClient aClient );
|
|
199 |
|
|
200 |
|
|
201 |
/**
|
|
202 |
* Gets the current client information from TLS
|
|
203 |
*
|
|
204 |
* @since 3.0
|
|
205 |
*/
|
|
206 |
virtual TIMPSConnectionClient ConnectionClient();
|
|
207 |
|
|
208 |
protected: // protected data shared with derived classes
|
|
209 |
|
|
210 |
///<UI operation context, not owned
|
|
211 |
MCnUiUiControlContext& iCCntxt;
|
|
212 |
|
|
213 |
///<Used logout SAP, not owned
|
|
214 |
CIMPSSAPSettings& iLogoutSap;
|
|
215 |
|
|
216 |
///<Wait note, owned. Initialized and destroyed during the operation.
|
|
217 |
MCnUiConnWaitNote* iWaitNote;
|
|
218 |
|
|
219 |
// owns: network session slot ID
|
|
220 |
CPEngNWSessionSlotID2* iNWSessionSlotID;
|
|
221 |
|
|
222 |
private: // private data
|
|
223 |
|
|
224 |
///<Connection closer, owned
|
|
225 |
CCnUiConnCloser* iConnCloser;
|
|
226 |
|
|
227 |
};
|
|
228 |
|
|
229 |
#endif // __CCNUILOGOUTUICNTRLSTEP_H
|
|
230 |
|
|
231 |
// End of File
|
|
232 |
|