|
1 /* |
|
2 * Copyright (c) 2005-2010 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: Dialog renderer. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_AIDIALOGRENDERER_H |
|
20 #define C_AIDIALOGRENDERER_H |
|
21 |
|
22 // System includes |
|
23 #include <e32base.h> |
|
24 #include "ainativerenderer.h" |
|
25 #include <MPsetNetworkInfoObs.h> // for MPsetNetworkInfoObserver |
|
26 #include <MPsetNetworkSelect.h> // for MPsetNetworkSelect |
|
27 |
|
28 // User includes |
|
29 #include "ainativerenderer.h" |
|
30 |
|
31 // Forward declarations |
|
32 class CAknNoteDialog; |
|
33 class CHsContentPublisher; |
|
34 class CPsetNetwork; |
|
35 class CAknWaitDialog; |
|
36 class CPsetContainer; |
|
37 class CAknPopupList; |
|
38 |
|
39 namespace AiNativeUiController |
|
40 { |
|
41 |
|
42 /** |
|
43 * Dialog renderer. |
|
44 * |
|
45 * Used to show CAknNoteDialog on screen. |
|
46 * |
|
47 * @since S60 3.2 |
|
48 */ |
|
49 NONSHARABLE_CLASS( CAiDialogRenderer ) : public CAiNativeRenderer, public MPsetNetworkInfoObserver |
|
50 { |
|
51 public: |
|
52 |
|
53 static CAiDialogRenderer* NewLC(); |
|
54 |
|
55 virtual ~CAiDialogRenderer(); |
|
56 |
|
57 // from base class CAiNativeRenderer |
|
58 |
|
59 void DoPublishL( CHsContentPublisher& aPlugin, TInt aContent, TInt aResource, TInt aIndex ); |
|
60 |
|
61 void DoCleanL( CHsContentPublisher& aPlugin, TInt aContent ); |
|
62 |
|
63 void FocusObtainedL(); |
|
64 |
|
65 // from base class MPsetNetworkInfoObserver |
|
66 |
|
67 /** |
|
68 * @@see MPsetNetworkInfoObserver::HandleNetworkInfoReceivedL |
|
69 */ |
|
70 void HandleNetworkInfoReceivedL( |
|
71 const CNetworkInfoArray* aInfoArray, const TInt aResult ); |
|
72 |
|
73 /** |
|
74 * @@see MPsetNetworkInfoObserver::HandleSearchingNetworksL |
|
75 */ |
|
76 void HandleSearchingNetworksL( TServiceRequest aRequest ); |
|
77 |
|
78 /** |
|
79 * @@see MPsetNetworkInfoObserver::HandleRequestingSelectedNetworkL |
|
80 */ |
|
81 void HandleRequestingSelectedNetworkL( TBool aOngoing ); |
|
82 |
|
83 /** |
|
84 * @@see MPsetNetworkInfoObserver::HandleNetworkChangedL - not used |
|
85 */ |
|
86 void HandleNetworkChangedL( |
|
87 const MPsetNetworkSelect::TNetworkInfo& aCurrentInfo, |
|
88 const RMobilePhone::TMobilePhoneRegistrationStatus& aStatus, |
|
89 const TInt aResult ); |
|
90 |
|
91 /** |
|
92 * @@see MPsetNetworkInfoObserver::HandleNetworkErrorL |
|
93 */ |
|
94 void HandleNetworkErrorL( const TServiceRequest aRequest, |
|
95 const TInt aError ); |
|
96 |
|
97 /** |
|
98 * @@see MPsetNetworkInfoObserver::HandleCurrentNetworkInfoL - not used |
|
99 */ |
|
100 void HandleCurrentNetworkInfoL( |
|
101 const MPsetNetworkSelect::TCurrentNetworkInfo& /* aCurrentInfo */, |
|
102 const TInt /* aResult */ ) {}; |
|
103 |
|
104 /** |
|
105 * @@see MPsetNetworkInfoObserver::HandleNetworkChangedL - not used |
|
106 */ |
|
107 void HandleNetworkChangedL( |
|
108 const MPsetNetworkSelect::TNetworkInfo& /* aCurrentInfo */, |
|
109 const MPsetNetworkSelect::TCurrentNetworkStatus /* aStatus */, |
|
110 const TInt /* aResult */ ) {}; |
|
111 |
|
112 /** |
|
113 * @@see MPsetNetworkInfoObserver::HandleCallActivatedL |
|
114 */ |
|
115 void HandleCallActivatedL() {}; |
|
116 |
|
117 |
|
118 private: |
|
119 |
|
120 CAiDialogRenderer(); |
|
121 |
|
122 /** |
|
123 * Show dialog. |
|
124 * |
|
125 * @since S60 3.2 |
|
126 */ |
|
127 void ShowDialogL(); |
|
128 |
|
129 void ConstructL(); |
|
130 |
|
131 void PopulatePLMNListL(); |
|
132 |
|
133 /** |
|
134 * Provides the network operator list. |
|
135 */ |
|
136 void NetworkListL(); |
|
137 |
|
138 /** |
|
139 * Sets title to a popup list. |
|
140 * @param aList pointer to list |
|
141 * @param aTitleID resource ID of the title |
|
142 */ |
|
143 void SetTitleToPopupL( CAknPopupList& aList, TInt aTitleID ); |
|
144 |
|
145 /** |
|
146 * Creates a waiting note (member variable). |
|
147 * @param aDelayOff is the note shown immediately or not |
|
148 */ |
|
149 void CheckAndCreateDlgL( TBool aDelayOff ); |
|
150 |
|
151 /* |
|
152 * Empties fetched network provider's list. |
|
153 */ |
|
154 void PurgeNetworkList(); |
|
155 |
|
156 /** |
|
157 * Shows a requested note. |
|
158 * @param aResourceId reource ID for note text |
|
159 * @param aType type of note |
|
160 */ |
|
161 void ShowNoteL( TInt aResourceId, TInt aType ); |
|
162 |
|
163 |
|
164 private: // data |
|
165 |
|
166 /** |
|
167 * Dialog. |
|
168 * Own. |
|
169 */ |
|
170 CAknNoteDialog* iDialog; |
|
171 |
|
172 /** |
|
173 * Text to be rendered in the dialog. |
|
174 * Own. |
|
175 */ |
|
176 HBufC* iText; |
|
177 |
|
178 /// Indicates SIM registration failure. |
|
179 TBool iShowDialog; |
|
180 |
|
181 #ifdef __COVER_DISPLAY |
|
182 /** |
|
183 * Dialog ID to be published. |
|
184 * Own. |
|
185 */ |
|
186 TInt iDialogId; |
|
187 #endif |
|
188 |
|
189 |
|
190 //PhoneSettings engine object |
|
191 CPsetNetwork* iNetwork; |
|
192 //PhoneSettings container |
|
193 CPsetContainer* iSettingsContainer; |
|
194 //Requesting note |
|
195 CAknWaitDialog* iDlg; |
|
196 //Array of networks |
|
197 CNetworkInfoArray* iNetworkArray; |
|
198 //Network selection list |
|
199 CAknPopupList* iNetworkPopupList; |
|
200 //Has the user selected a valid network |
|
201 TBool iApprovedNetwork; |
|
202 TBool iSearchForNetworksActive; |
|
203 TBool iPLMNListPopulateShowIsHandling; |
|
204 |
|
205 // Resource index |
|
206 TInt iRscIndex; |
|
207 |
|
208 }; |
|
209 |
|
210 } // namespace AiNativeUiController |
|
211 |
|
212 #endif // C_AIDIALOGRENDERER_H |