|
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: Implementation of base plugin. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 |
|
21 #include "ConnUiUtilsNotif.h" |
|
22 |
|
23 #include "SelectWLanDlgPlugin.h" |
|
24 #include "OfflineWlanNoteNotif.h" |
|
25 #include "OfflineWlanDisabledNoteNotif.h" |
|
26 #include "EasyWepDlgNotif.h" |
|
27 #include "EasyWpaDlgNotif.h" |
|
28 #include "WLANNetworkUnavailableNoteNotif.h" |
|
29 #include "ConfirmationQueryNotif.h" |
|
30 #include "ConnectViaNoteNotif.h" |
|
31 #include "wlanpowersavetestnotif.h" |
|
32 #include "easywapidlgnotif.h" |
|
33 #include "nowlannetworksavailablenotif.h" |
|
34 #include "connectingviadiscreetpopupnotif.h" |
|
35 #include "connectionerrordiscreetpopupnotif.h" |
|
36 |
|
37 // CONSTANTS |
|
38 |
|
39 LOCAL_D const TInt KPluginGranularity = 4; |
|
40 |
|
41 // FORWARD DECLARATIONS |
|
42 |
|
43 LOCAL_C void CreateNotifiersL( |
|
44 CArrayPtrFlat<MEikSrvNotifierBase2>* aNotifiers ); |
|
45 |
|
46 // --------------------------------------------------------- |
|
47 // NotifierArray() |
|
48 // Lib main entry point |
|
49 // --------------------------------------------------------- |
|
50 // |
|
51 EXPORT_C CArrayPtr<MEikSrvNotifierBase2>* NotifierArray() |
|
52 { |
|
53 CArrayPtrFlat<MEikSrvNotifierBase2>* array = new (ELeave) |
|
54 CArrayPtrFlat<MEikSrvNotifierBase2>( KPluginGranularity ); |
|
55 |
|
56 if ( array ) |
|
57 { |
|
58 TRAPD( err, CreateNotifiersL( array ) ); |
|
59 if( err ) |
|
60 { |
|
61 TInt count = array->Count(); |
|
62 while( count-- ) |
|
63 { |
|
64 (*array)[count]->Release(); |
|
65 } |
|
66 delete array; |
|
67 array = NULL; |
|
68 } |
|
69 } |
|
70 |
|
71 return( array ); |
|
72 } |
|
73 |
|
74 // --------------------------------------------------------- |
|
75 // CreateNotifiersL() |
|
76 // --------------------------------------------------------- |
|
77 // |
|
78 LOCAL_C void CreateNotifiersL( |
|
79 CArrayPtrFlat<MEikSrvNotifierBase2>* aNotifiers ) |
|
80 { |
|
81 MEikSrvNotifierBase2 *serNotify; |
|
82 TBool resourceFileResponsible = ETrue; |
|
83 |
|
84 serNotify = CSelectWLanDlgPlugin::NewL( resourceFileResponsible ); |
|
85 CleanupStack::PushL( serNotify ); |
|
86 aNotifiers->AppendL( serNotify ); |
|
87 CleanupStack::Pop( serNotify ); |
|
88 |
|
89 resourceFileResponsible = EFalse; // Only the first has to load resources |
|
90 |
|
91 serNotify = COfflineWlanNoteNotif::NewL( resourceFileResponsible ); |
|
92 CleanupStack::PushL( serNotify ); |
|
93 aNotifiers->AppendL( serNotify ); |
|
94 CleanupStack::Pop( serNotify ); |
|
95 |
|
96 serNotify = COfflineWlanDisabledNoteNotif::NewL( resourceFileResponsible ); |
|
97 CleanupStack::PushL( serNotify ); |
|
98 aNotifiers->AppendL( serNotify ); |
|
99 CleanupStack::Pop( serNotify ); |
|
100 |
|
101 serNotify = CEasyWepDlgNotif::NewL( resourceFileResponsible ); |
|
102 CleanupStack::PushL( serNotify ); |
|
103 aNotifiers->AppendL( serNotify ); |
|
104 CleanupStack::Pop( serNotify ); |
|
105 |
|
106 serNotify = CEasyWpaDlgNotif::NewL( resourceFileResponsible ); |
|
107 CleanupStack::PushL( serNotify ); |
|
108 aNotifiers->AppendL( serNotify ); |
|
109 CleanupStack::Pop( serNotify ); |
|
110 |
|
111 serNotify = CWLANNetworkUnavailableNoteNotif::NewL( |
|
112 resourceFileResponsible ); |
|
113 CleanupStack::PushL( serNotify ); |
|
114 aNotifiers->AppendL( serNotify ); |
|
115 CleanupStack::Pop( serNotify ); |
|
116 |
|
117 serNotify = CConfirmationQueryNotif::NewL( resourceFileResponsible ); |
|
118 CleanupStack::PushL( serNotify ); |
|
119 aNotifiers->AppendL( serNotify ); |
|
120 CleanupStack::Pop( serNotify ); |
|
121 |
|
122 serNotify = CConnectViaNoteNotif::NewL( resourceFileResponsible ); |
|
123 CleanupStack::PushL( serNotify ); |
|
124 aNotifiers->AppendL( serNotify ); |
|
125 CleanupStack::Pop( serNotify ); |
|
126 |
|
127 serNotify = CWlanPowerSaveQueryNotif::NewL( resourceFileResponsible ); |
|
128 CleanupStack::PushL( serNotify ); |
|
129 aNotifiers->AppendL( serNotify ); |
|
130 CleanupStack::Pop( serNotify ); |
|
131 |
|
132 serNotify = CEasyWapiDlgNotif::NewL( resourceFileResponsible ); |
|
133 CleanupStack::PushL( serNotify ); |
|
134 aNotifiers->AppendL( serNotify ); |
|
135 CleanupStack::Pop( serNotify ); |
|
136 |
|
137 serNotify = CConnectingViaDiscreetPopupNotif::NewL( resourceFileResponsible ); |
|
138 CleanupStack::PushL( serNotify ); |
|
139 aNotifiers->AppendL( serNotify ); |
|
140 CleanupStack::Pop( serNotify ); |
|
141 |
|
142 serNotify = CNoWLANNetworksAvailableNotif::NewL( resourceFileResponsible ); |
|
143 CleanupStack::PushL( serNotify ); |
|
144 aNotifiers->AppendL( serNotify ); |
|
145 CleanupStack::Pop( serNotify ); |
|
146 |
|
147 serNotify = CConnectionErrorDiscreetPopupNotif::NewL( resourceFileResponsible ); |
|
148 CleanupStack::PushL( serNotify ); |
|
149 aNotifiers->AppendL( serNotify ); |
|
150 CleanupStack::Pop( serNotify ); |
|
151 } |
|
152 |
|
153 // End of File |