|
1 /* |
|
2 * Copyright (c) 2005 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: Implementation of ecom plugin |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include "ConnectionDialogsUidDefs.h" |
|
21 #include "ConnectionDialogsLogger.h" |
|
22 |
|
23 #include <ecom/implementationproxy.h> |
|
24 #include <AknNotifierWrapper.h> // link against aknnotifierwrapper.lib |
|
25 #include <wifiprotuiddefs.h> |
|
26 |
|
27 |
|
28 // CONSTANTS |
|
29 const TInt KMyPriority = MEikSrvNotifierBase2::ENotifierPriorityLow; |
|
30 const TInt KArrayGranularity = 5; |
|
31 |
|
32 |
|
33 // --------------------------------------------------------- |
|
34 // CleanupArray() |
|
35 // --------------------------------------------------------- |
|
36 // |
|
37 void CleanupArray( TAny* aArray ) |
|
38 { |
|
39 CArrayPtrFlat<MEikSrvNotifierBase2>* |
|
40 subjects = static_cast<CArrayPtrFlat<MEikSrvNotifierBase2>*>( aArray ); |
|
41 TInt lastInd = subjects->Count()-1; |
|
42 for ( TInt i = lastInd; i >= 0; i-- ) |
|
43 { |
|
44 subjects->At( i )->Release(); |
|
45 } |
|
46 |
|
47 delete subjects; |
|
48 } |
|
49 |
|
50 // --------------------------------------------------------- |
|
51 // DoCreateNotifierArrayL() |
|
52 // --------------------------------------------------------- |
|
53 // |
|
54 CArrayPtr<MEikSrvNotifierBase2>* DoCreateNotifierArrayL() |
|
55 { |
|
56 CLOG_CREATE; |
|
57 CArrayPtrFlat<MEikSrvNotifierBase2>* subjects = |
|
58 new ( ELeave )CArrayPtrFlat<MEikSrvNotifierBase2>( KArrayGranularity ); |
|
59 |
|
60 CleanupStack::PushL( TCleanupItem( CleanupArray, subjects ) ); |
|
61 |
|
62 // Create Wrappers |
|
63 |
|
64 _LIT( KCConnDlgPluginName, "CCONNDLGPLUGIN.DLL" ); |
|
65 _LIT( KDisconnectDlgName, "DISCONNECTDLG.DLL" ); |
|
66 _LIT( KConnUiUtilsNotifName, "ConnUiUtilsNotif.DLL" ); |
|
67 |
|
68 // Session owning notifier(if default implementation is enough) |
|
69 CAknCommonNotifierWrapper* master = |
|
70 CAknCommonNotifierWrapper::NewL( KUidCConnDlgIap, |
|
71 KUidCConnDlgIap, |
|
72 KMyPriority, |
|
73 KCConnDlgPluginName, |
|
74 1 ); // we don't use synch reply |
|
75 |
|
76 CleanupStack::PushL( master ); |
|
77 subjects->AppendL( master ); |
|
78 CleanupStack::Pop( master ); |
|
79 |
|
80 subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, |
|
81 KUidCConnDlgNewIap, |
|
82 KUidCConnDlgNewIap, |
|
83 KMyPriority ) ); |
|
84 |
|
85 subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, |
|
86 KUidCConnDlgAuthentication, |
|
87 KUidCConnDlgAuthentication, |
|
88 KMyPriority ) ); |
|
89 |
|
90 subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, |
|
91 KUidCConnDlgReconnect, |
|
92 KUidCConnDlgReconnect, |
|
93 KMyPriority ) ); |
|
94 |
|
95 subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, |
|
96 KUidCConnDlgQos, |
|
97 KUidCConnDlgQos, |
|
98 KMyPriority ) ); |
|
99 |
|
100 subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, |
|
101 KUidCConnDlgSelectConn, |
|
102 KUidCConnDlgSelectConn, |
|
103 KMyPriority ) ); |
|
104 |
|
105 _LIT( KWiFiProtSetupPluginName , "wifiprotplugin.dll" ); |
|
106 master = |
|
107 CAknCommonNotifierWrapper::NewL( KUidWiFiProtSetup, |
|
108 KUidWiFiProtSetup, |
|
109 KMyPriority, |
|
110 KWiFiProtSetupPluginName, |
|
111 1 ); // we don't use synch reply |
|
112 |
|
113 CleanupStack::PushL( master ); |
|
114 subjects->AppendL( master ); |
|
115 CleanupStack::Pop( master ); |
|
116 |
|
117 |
|
118 // Disconnect dialog |
|
119 subjects->AppendL( CAknCommonNotifierWrapper::NewL( KUidDisconnectDlg, |
|
120 KUidDisconnectDlg, |
|
121 KMyPriority, |
|
122 KDisconnectDlgName, |
|
123 1 ) ); |
|
124 |
|
125 // WLAN wrappers |
|
126 master = CAknCommonNotifierWrapper::NewL( KUidSelectWLanDlg, |
|
127 KUidSelectWLanDlg, |
|
128 KMyPriority, |
|
129 KConnUiUtilsNotifName, |
|
130 1 ); |
|
131 |
|
132 CleanupStack::PushL( master ); |
|
133 subjects->AppendL( master ); |
|
134 CleanupStack::Pop( master ); |
|
135 |
|
136 |
|
137 subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, |
|
138 KUidCOfflineWlanNoteDlg, |
|
139 KUidCOfflineWlanNoteDlg, |
|
140 KMyPriority ) ); |
|
141 |
|
142 subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, |
|
143 KUidCOfflineWlanDisabledNoteDlg, |
|
144 KUidCOfflineWlanDisabledNoteDlg, |
|
145 KMyPriority ) ); |
|
146 |
|
147 subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, |
|
148 KUidEasyWepDlg, |
|
149 KUidEasyWepDlg, |
|
150 KMyPriority ) ); |
|
151 |
|
152 subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, |
|
153 KUidEasyWpaDlg, |
|
154 KUidEasyWpaDlg, |
|
155 KMyPriority ) ); |
|
156 |
|
157 subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, |
|
158 KUidWLANNetworkUnavailableNoteDlg, |
|
159 KUidWLANNetworkUnavailableNoteDlg, |
|
160 KMyPriority ) ); |
|
161 |
|
162 // ALR WRAPPERS |
|
163 |
|
164 subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, |
|
165 KUidConfirmationQuery, |
|
166 KUidConfirmationQuery, |
|
167 KMyPriority ) ); |
|
168 |
|
169 subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, |
|
170 KUidConnectViaNote, |
|
171 KUidConnectViaNote, |
|
172 KMyPriority ) ); |
|
173 |
|
174 // WLAN wrappers |
|
175 |
|
176 subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, |
|
177 KUidWlanPowerSaveTestNote, |
|
178 KUidWlanPowerSaveTestNote, |
|
179 KMyPriority ) ); |
|
180 |
|
181 subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, |
|
182 KUidEasyWapiDlg, |
|
183 KUidEasyWapiDlg, |
|
184 KMyPriority ) ); |
|
185 |
|
186 subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, |
|
187 KUidNoWLANNetworksAvailableNote, |
|
188 KUidNoWLANNetworksAvailableNote, |
|
189 KMyPriority ) ); |
|
190 |
|
191 subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, |
|
192 KUidConnectingViaDiscreetPopup, |
|
193 KUidConnectingViaDiscreetPopup, |
|
194 KMyPriority ) ); |
|
195 |
|
196 subjects->AppendL( new( ELeave ) CAknNotifierWrapperLight( *master, |
|
197 KUidConnectionErrorDiscreetPopup, |
|
198 KUidConnectionErrorDiscreetPopup, |
|
199 KMyPriority ) ); |
|
200 |
|
201 CleanupStack::Pop(); // array cleanup |
|
202 return( subjects ); |
|
203 } |
|
204 |
|
205 // --------------------------------------------------------- |
|
206 // NotifierArray() |
|
207 // --------------------------------------------------------- |
|
208 // |
|
209 CArrayPtr<MEikSrvNotifierBase2>* NotifierArray() |
|
210 // old Lib main entry point |
|
211 { |
|
212 CArrayPtr<MEikSrvNotifierBase2>* array = 0; |
|
213 TRAP_IGNORE( array = DoCreateNotifierArrayL() ); |
|
214 return array; |
|
215 } |
|
216 |
|
217 // --------------------------------------------------------- |
|
218 // ImplementationTable |
|
219 // --------------------------------------------------------- |
|
220 // |
|
221 const TImplementationProxy ImplementationTable[] = |
|
222 { |
|
223 #ifdef __EABI__ |
|
224 {{0x10207375}, ( TFuncPtr )NotifierArray} |
|
225 #else |
|
226 {{0x10207375}, NotifierArray} |
|
227 #endif |
|
228 }; |
|
229 |
|
230 // --------------------------------------------------------- |
|
231 // ImplementationGroupProxy |
|
232 // entry point |
|
233 // --------------------------------------------------------- |
|
234 // |
|
235 EXPORT_C const TImplementationProxy* ImplementationGroupProxy( |
|
236 TInt& aTableCount ) |
|
237 { |
|
238 aTableCount = sizeof( ImplementationTable ) / |
|
239 sizeof( TImplementationProxy ) ; |
|
240 return ImplementationTable; |
|
241 } |
|
242 |
|
243 |
|
244 // End of File |