|
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: Network connection restore UI control. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __CCNUIRECONNECTALLUICNTRLSTEP_H |
|
19 #define __CCNUIRECONNECTALLUICNTRLSTEP_H |
|
20 |
|
21 |
|
22 // INCLUDES |
|
23 #include <E32Std.h> |
|
24 #include <impspresenceconnectionuiconstsng.h> |
|
25 #include "CCnUiLoginUiCntrlStep.h" |
|
26 |
|
27 |
|
28 //FORWARD DECLARATION |
|
29 class CIMPSSAPSettings; |
|
30 class CPEngNWSessionSlotID2; |
|
31 |
|
32 |
|
33 // CLASS DECLARATION |
|
34 /** |
|
35 * Network connection restore UI control. |
|
36 * Restores network connection to all |
|
37 * given clients. |
|
38 * |
|
39 * Extends CCnUiLoginUiCntrlStep behaviour |
|
40 * by looping back from HandleCompleteL() |
|
41 * after each client login. |
|
42 * |
|
43 * @since 2.1 |
|
44 */ |
|
45 NONSHARABLE_CLASS( CCnUiReconnectAllUiCntrlStep ) : public CCnUiLoginUiCntrlStep |
|
46 { |
|
47 public: // Two-phased constructors and destructor |
|
48 |
|
49 /** |
|
50 * Two-phased constructor. |
|
51 * @param aCCntxt UI control context. |
|
52 * @param aLoginSap The sap to reconnect. |
|
53 * @param aReconnectedClients The clients to reconnect. |
|
54 */ |
|
55 static CCnUiReconnectAllUiCntrlStep* NewLC( MCnUiUiControlContext& aCCntxt, |
|
56 CIMPSSAPSettings& aLoginSap, |
|
57 TIMPSConnectionClient aReconnectedClient, |
|
58 CPEngNWSessionSlotID2& aNWSessionSlotID ); |
|
59 |
|
60 /** |
|
61 * Destructor. |
|
62 */ |
|
63 virtual ~CCnUiReconnectAllUiCntrlStep(); |
|
64 |
|
65 |
|
66 protected: //protected to allow derivation |
|
67 |
|
68 /** |
|
69 * C++ constructor. |
|
70 */ |
|
71 CCnUiReconnectAllUiCntrlStep( MCnUiUiControlContext& aCCntxt, |
|
72 CIMPSSAPSettings& aLoginSap, |
|
73 TIMPSConnectionClient aReconnectedClient, |
|
74 CPEngNWSessionSlotID2& aNWSessionSlotID ); |
|
75 |
|
76 /** |
|
77 * Symbian OS constructor. |
|
78 */ |
|
79 void ConstructL(); |
|
80 |
|
81 |
|
82 |
|
83 public: // Overridden functions from MCnUiCntrlStep |
|
84 |
|
85 |
|
86 /** |
|
87 * Overridden HandleCompleteL(). |
|
88 * If there is still more clients to login, |
|
89 * issues a new login round. |
|
90 * |
|
91 * @since 2.1 |
|
92 * @return ECnUiRestartStep if there is another clients to reconnect. |
|
93 * Else ECnUiStepContinueTeardown. |
|
94 */ |
|
95 TCnUiHandleCompleteStatus HandleCompleteL(); |
|
96 |
|
97 |
|
98 /** |
|
99 * Undo step. |
|
100 * |
|
101 * @since 2.1 |
|
102 */ |
|
103 void UndoStepL(); |
|
104 |
|
105 |
|
106 protected: // New helper functions |
|
107 |
|
108 /** |
|
109 * Over written framework method. |
|
110 * |
|
111 * Setups the reconnect step as needed. |
|
112 * |
|
113 * @since 2.1 |
|
114 * @param aClient Init has to initialize the aClient |
|
115 * with the client id to log out. |
|
116 * |
|
117 * @return Error status from init. If init returns something |
|
118 * else than ECnUiLoginInitContinue login operation RunStepL() |
|
119 * is breaked with return value. |
|
120 */ |
|
121 TInt DoInitLoginStepL( TIMPSConnectionClient& aClient ); |
|
122 |
|
123 |
|
124 /** |
|
125 * Over written framework method. |
|
126 * |
|
127 * Shows proper wait note for |
|
128 * reconnect state. |
|
129 * |
|
130 * @since 2.1 |
|
131 * @param aStateId State id from CCnUiConnOpener. |
|
132 * @param aClient The accessed client. |
|
133 */ |
|
134 void DoShowLoginStateSpecificWaitnoteL( TInt aStateId, |
|
135 TIMPSConnectionClient aClient ); |
|
136 |
|
137 |
|
138 |
|
139 protected: // New helper functions |
|
140 |
|
141 /** |
|
142 * Initializes the disconnect. |
|
143 * Gets the SAP o disconnect and |
|
144 * populates the clients to logout. |
|
145 * |
|
146 * @since 2.1 |
|
147 */ |
|
148 void InitNWReConnectL(); |
|
149 |
|
150 |
|
151 /** |
|
152 * Shows error note from simultaneous |
|
153 * login operation. |
|
154 * |
|
155 * @since 2.1 |
|
156 */ |
|
157 void ShowSimultaneousLoginOperationNoteL(); |
|
158 |
|
159 |
|
160 private: // private data |
|
161 |
|
162 ///<Cached reference to aReconnectedClients parameter, not owned |
|
163 TIMPSConnectionClient iRequestedReconnClient; |
|
164 |
|
165 ///<Has the reconnect initialization done, owned |
|
166 TBool iInitDone; |
|
167 |
|
168 ///<Clients to reconnect, owned |
|
169 RArray< TIMPSConnectionClient > iClientsToReConn; |
|
170 |
|
171 CPEngNWSessionSlotID2& iNWSessionSlotID; |
|
172 |
|
173 }; |
|
174 |
|
175 #endif // __CCNUIRECONNECTALLUICNTRLSTEP_H |
|
176 |
|
177 // End of File |
|
178 |