1 /* |
|
2 * Copyright (c) 2002 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: Declaration of class CSelectConnectionDialog. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __SELECTCONNECTIONDIALOG_H__ |
|
20 #define __SELECTCONNECTIONDIALOG_H__ |
|
21 |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <aknlistquerydialog.h> |
|
26 #include "ExpiryTimerCallback.h" |
|
27 |
|
28 |
|
29 // FORWARD DECLARATION |
|
30 class CConnDlgSelectConnectionPlugin; |
|
31 class CConnectionInfoArray; |
|
32 class MEikSrvNotifierBase2; |
|
33 class CActiveSelectExplicit; |
|
34 class CExpiryTimer; |
|
35 |
|
36 // CLASS DECLARATION |
|
37 /** |
|
38 * Class implementing SelectConnection dialog |
|
39 */ |
|
40 NONSHARABLE_CLASS( CSelectConnectionDialog ) : public CAknListQueryDialog, public MExpiryTimerCallback |
|
41 { |
|
42 private: |
|
43 /** |
|
44 * CSelectConnectionDialog constructor |
|
45 * @param aPlugin plugin pointer |
|
46 */ |
|
47 CSelectConnectionDialog( MEikSrvNotifierBase2* aPlugin, |
|
48 TInt aRefreshInterval, |
|
49 TUint32 aBearerSet, |
|
50 TBool aIsWLANFeatureSupported, |
|
51 TUint aDefaultCMId ); |
|
52 |
|
53 /** |
|
54 * Symbian default constructor. |
|
55 */ |
|
56 void ConstructL(); |
|
57 |
|
58 |
|
59 public: |
|
60 /** |
|
61 * NewL function |
|
62 * @param aPlugin plugin pointer |
|
63 * return CSelectConnectionDialog* |
|
64 */ |
|
65 static CSelectConnectionDialog* NewL( MEikSrvNotifierBase2* aPlugin, |
|
66 TInt aRefreshInterval, |
|
67 TUint32 aBearerSet, |
|
68 TBool aIsWLANFeatureSupported, |
|
69 TUint aDefaultCMId ); |
|
70 |
|
71 /** |
|
72 * ~CSelectConnectionDialog destructor |
|
73 */ |
|
74 ~CSelectConnectionDialog(); |
|
75 |
|
76 /** |
|
77 * Exit function OF the CSelectConnectionDialog |
|
78 * @param aButtonId button exit id |
|
79 * @return TBool exit or no |
|
80 */ |
|
81 virtual TBool OkToExitL( TInt aButtonId ); |
|
82 |
|
83 void PrepareAndRunLD( CConnectionInfoArray* aIAP, |
|
84 CArrayPtr< CGulIcon >* aIcons, |
|
85 TBool aIsReallyRefreshing, |
|
86 const TInt aHighlightedItem ); |
|
87 |
|
88 /** |
|
89 * Dialog refreshing |
|
90 */ |
|
91 void RefreshDialogL( CConnectionInfoArray* aIAP, |
|
92 CArrayPtr< CGulIcon >* aIcons, |
|
93 TBool aIsReallyRefreshing, |
|
94 const TInt aHighlightedItem ); |
|
95 |
|
96 /** |
|
97 * |
|
98 * @return The value of iFromOkToExit. |
|
99 */ |
|
100 inline TBool GetOkToExit(); |
|
101 |
|
102 /** |
|
103 * Dialog expiration timeout callback |
|
104 */ |
|
105 void HandleTimedOut(); |
|
106 |
|
107 /** |
|
108 * From CCoeControl Handle key events. When a key event occurs, |
|
109 * CONE calls this function for each control on the control stack, |
|
110 * until one of them returns EKeyWasConsumed to indicate that it processed the key event. |
|
111 * @param aKeyEvent The key event. |
|
112 * @param aType The type of the event: EEventKey, EEventKeyUp or EEventKeyDown. |
|
113 * @return Indicates whether or not the key event was used by this control. |
|
114 */ |
|
115 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, |
|
116 TEventCode aType ); |
|
117 |
|
118 TInt RunLD(); |
|
119 |
|
120 void SetElementIDL( TUint32 aIAPId ); |
|
121 |
|
122 void CompleteL( TInt aStatus ); |
|
123 |
|
124 void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType); |
|
125 |
|
126 void HandlePointerEventL(const TPointerEvent& aPointerEvent); |
|
127 |
|
128 private: |
|
129 /** |
|
130 * PreLayoutDynInitL |
|
131 * @param - |
|
132 */ |
|
133 virtual void PreLayoutDynInitL(); |
|
134 |
|
135 /** |
|
136 * Initialize menu pane. |
|
137 * @param aResourceId Menu pane resource id. |
|
138 * @param CEikMenuPane Menu pane. |
|
139 */ |
|
140 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
141 |
|
142 void ProcessCommandL( TInt aCommand ); |
|
143 |
|
144 |
|
145 private: // Data |
|
146 |
|
147 // Pointer to the plugin, not owned |
|
148 CConnDlgSelectConnectionPlugin* iPlugin; |
|
149 |
|
150 RArray<TUint> iIapIDs; |
|
151 RArray<TUint> iDestIDs; |
|
152 |
|
153 // For base class, unused. |
|
154 TInt iDummy; |
|
155 |
|
156 TBool iFromOkToExit; ///< closed the dialof from OkToExitL or not |
|
157 |
|
158 CArrayPtr< CGulIcon >* iIcons; |
|
159 |
|
160 // pointer to active object |
|
161 CActiveSelectExplicit* iActiveSelectExplicit; |
|
162 TInt iRefreshInterval; |
|
163 |
|
164 // Selected preferences |
|
165 TUint32 iBearerSet; |
|
166 |
|
167 TBool iIsWLANFeatureSupported; |
|
168 |
|
169 TUint iDefaultCMId; |
|
170 |
|
171 // Pointer for dialog expiration timer |
|
172 CExpiryTimer* iExpiryTimer; |
|
173 }; |
|
174 |
|
175 |
|
176 #include "SelectConnectionDialog.inl" |
|
177 |
|
178 #endif |
|
179 |
|
180 |
|
181 // End of File |
|