|
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: |
|
15 * Declares the main handler, CDisconnectDialogUi and the public API for |
|
16 * the Disconnect Dialog UI. |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #ifndef DDLG_UI_H |
|
22 #define DDLG_UI_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 #include <rconnmon.h> |
|
27 #include <eiknotapi.h> |
|
28 #include <DisconnectDlgClient.h> |
|
29 |
|
30 |
|
31 // GLOBAL FUNCTIONS |
|
32 |
|
33 // FORWARD DECLARATIONS |
|
34 class CConnectionInfo; |
|
35 class CDisconnectDlgDialog; |
|
36 class CConnectionModel; |
|
37 class CQueryDisconnectDlgDialog; |
|
38 class CActiveDisconnectDlgPlugin; |
|
39 |
|
40 // CLASS DECLARATION |
|
41 |
|
42 /** |
|
43 * Notifier class for DisconnectDlg |
|
44 */ |
|
45 NONSHARABLE_CLASS( CDisconnectDialogUi ) : public CBase, |
|
46 public MEikSrvNotifierBase2 |
|
47 { |
|
48 public: // Constructors and destructor |
|
49 |
|
50 /** |
|
51 * Constructor. |
|
52 */ |
|
53 static CDisconnectDialogUi* NewL(); |
|
54 |
|
55 /** |
|
56 * Destructor. |
|
57 */ |
|
58 virtual ~CDisconnectDialogUi(); |
|
59 |
|
60 public: |
|
61 |
|
62 /** |
|
63 * Component Validation Test. |
|
64 * @return KErrNone. |
|
65 */ |
|
66 static TInt Cvt(); |
|
67 |
|
68 protected: // Constructors |
|
69 |
|
70 /** |
|
71 * Constructor. |
|
72 */ |
|
73 CDisconnectDialogUi(); |
|
74 |
|
75 /** |
|
76 * Second-phase constructor. |
|
77 */ |
|
78 void ConstructL( ); |
|
79 |
|
80 public: |
|
81 /** |
|
82 * Creates a query dialog. |
|
83 * @return ETrue if query created successfully. |
|
84 */ |
|
85 TInt AskDisconnectL(); |
|
86 |
|
87 public: // from MEikSrvNotifierBase |
|
88 |
|
89 /** |
|
90 * from MEikSrvNotifierBase |
|
91 */ |
|
92 void Release(); |
|
93 |
|
94 /** |
|
95 * from MEikSrvNotifierBase |
|
96 */ |
|
97 TNotifierInfo RegisterL(); |
|
98 |
|
99 /** |
|
100 * from MEikSrvNotifierBase |
|
101 */ |
|
102 TNotifierInfo Info() const; |
|
103 |
|
104 /** |
|
105 * from MEikSrvNotifierBase |
|
106 */ |
|
107 TPtrC8 StartL( const TDesC8& aBuffer ); |
|
108 |
|
109 /** |
|
110 * Start the Notifier |
|
111 * @param aBuffer info from caller |
|
112 * @param aReplySlot reply info |
|
113 * @param aMessage |
|
114 * return - |
|
115 */ |
|
116 void StartL( const TDesC8& aBuffer, TInt aReplySlot, |
|
117 const RMessagePtr2& aMessage ); |
|
118 |
|
119 /** |
|
120 * from MEikSrvNotifierBase |
|
121 */ |
|
122 void Cancel(); |
|
123 |
|
124 /** |
|
125 * from MEikSrvNotifierBase |
|
126 */ |
|
127 TPtrC8 UpdateL( const TDesC8& aBuffer ); |
|
128 |
|
129 public:// from MActiveEventObserverInterface |
|
130 |
|
131 /** |
|
132 * Notify when the initialization process has been done |
|
133 * @return - |
|
134 */ |
|
135 void InitializedL( CConnectionInfo* aConnectionInfo ); |
|
136 |
|
137 /** |
|
138 * Sets selected IapId |
|
139 */ |
|
140 void SetClosedIapId( TUint32 aIapId ); |
|
141 |
|
142 public: // New functions |
|
143 |
|
144 void CompleteL( TInt aStatus ); |
|
145 |
|
146 inline void SetStartedFlag( TBool aStarted ); |
|
147 |
|
148 inline TBool Prompt(); |
|
149 |
|
150 public: |
|
151 |
|
152 TBool iDialogRun; ///< ETrue if dialog is run |
|
153 TBool iQueryRun; ///< ETrue if query is run |
|
154 |
|
155 private: //data |
|
156 |
|
157 TInt iResOffset; ///< Offset of loaded resource file |
|
158 |
|
159 /** |
|
160 * refers connections is intialized or not |
|
161 */ |
|
162 TNotifierInfo iInfo; ///< Notifier info |
|
163 |
|
164 RMessagePtr2 iMessage; // Message |
|
165 |
|
166 CDisconnectDlgDialog* iDisconnectDialog; ///< Owned. |
|
167 |
|
168 CQueryDisconnectDlgDialog* iQueryDisconnectDlgDialog; ///< Owned. |
|
169 |
|
170 CConnectionModel* iConnModel; ///< Owned |
|
171 |
|
172 /** |
|
173 * After the query is dismissed, the index will hold |
|
174 * the value of selected item at the iDisconnectDialog. |
|
175 */ |
|
176 TInt iIndex; |
|
177 |
|
178 TBool iStarted; ///< ETrue if notifier is started |
|
179 |
|
180 HBufC* iErrorMsgDetails; ///< For query dialog |
|
181 |
|
182 TDisconnectConnectionPrefs iConnectionPrefs; |
|
183 |
|
184 TInt iReplySlot; // Reply slot |
|
185 |
|
186 TUint32 iIapId; ///< selected Internet Access Point |
|
187 |
|
188 CActiveDisconnectDlgPlugin* iActivePlugin; ///< Owned |
|
189 }; |
|
190 |
|
191 #include "DisconnectDlgUi.inl" |
|
192 |
|
193 #endif /* DDLG_UI_H */ |
|
194 |
|
195 // End of File |