|
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 the License "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: Forwards Dialog requests to the BrowserDialogsProvider |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef BROWSERDIALOGSPROVIDERPROXY_H |
|
21 #define BROWSERDIALOGSPROVIDERPROXY_H |
|
22 |
|
23 // INCLUDES |
|
24 |
|
25 // User includes |
|
26 |
|
27 // System Includes |
|
28 #include <BrCtlDialogsProvider.h> |
|
29 //#include <BrowserDialogsProviderProxy.h> |
|
30 #include <e32std.h> |
|
31 |
|
32 // CONSTANTS |
|
33 |
|
34 // FORWARD DECLARATIONS |
|
35 class CBrCtlDialogsProvider; |
|
36 class CBrowserDialogsProviderBlocker; |
|
37 class CBrowserWindowFocusNotifier; |
|
38 class CBrowserWindow; |
|
39 class MBrowserDialogsProviderObserver; |
|
40 |
|
41 // CLASS DECLARATION |
|
42 |
|
43 /** |
|
44 * Provide dialogs needed for browser operation |
|
45 * |
|
46 * @since 3.0 |
|
47 */ |
|
48 class CBrowserDialogsProviderProxy : public CBase, |
|
49 public MBrCtlDialogsProvider |
|
50 { |
|
51 // Construction/Destruction |
|
52 public: |
|
53 |
|
54 // Two stage constructor |
|
55 static CBrowserDialogsProviderProxy* NewL( ); |
|
56 |
|
57 // Destructor |
|
58 virtual ~CBrowserDialogsProviderProxy(); |
|
59 |
|
60 protected: |
|
61 |
|
62 // 1st stage Constructor |
|
63 CBrowserDialogsProviderProxy( ); |
|
64 |
|
65 |
|
66 // 2nd stage constructor |
|
67 void ConstructL(); |
|
68 |
|
69 public: // From MBrCtlDialogsProvider |
|
70 |
|
71 /** |
|
72 * Notify the user of an error |
|
73 * @since 3.0 |
|
74 * @param aErrCode The error that occured |
|
75 * @return void |
|
76 */ |
|
77 virtual void DialogNotifyErrorL( TInt aErrCode ); |
|
78 |
|
79 /** |
|
80 * Notify the user of an http error |
|
81 * @since 3.0 |
|
82 * @param aErrCode The error that occured |
|
83 * @param aUri The uri of the request that failed |
|
84 * @return void |
|
85 */ |
|
86 virtual void DialogNotifyHttpErrorL( TInt aErrCode, |
|
87 const TDesC& aUri ); |
|
88 |
|
89 /** |
|
90 * File selection dialog |
|
91 * @since 3.0 |
|
92 * @param aStartPath The initial displayed directory |
|
93 * @param aRootPath The top most directory that the user can go up to |
|
94 * @param aSelectedFileName The selected file name. |
|
95 * Returned on cleanup stack. Browser control will free the buffer |
|
96 * @return EFalse if the user canceled, ETrue otherwise |
|
97 */ |
|
98 virtual TBool DialogFileSelectLC( const TDesC& aStartPath, |
|
99 const TDesC& aRootPath, |
|
100 HBufC*& aSelectedFileName); |
|
101 |
|
102 /** |
|
103 * List selection dialog |
|
104 * @since 3.0 |
|
105 * @param aTitle The title, could be empty |
|
106 * @param aBrowserSelectOptionType The type of the list box |
|
107 * @param aOptions A list of options to display |
|
108 * @return EFalse if the user canceled, ETrue otherwise |
|
109 */ |
|
110 virtual TBool DialogSelectOptionL( |
|
111 const TDesC& aTitle, |
|
112 TBrCtlSelectOptionType aBrowserSelectOptionType, |
|
113 CArrayFix<TBrCtlSelectOptionData>& aOptions ); |
|
114 |
|
115 /** |
|
116 * User Authentication dialog. |
|
117 * User name and password are returned on cleanup stack |
|
118 * @since 3.0 |
|
119 * @param aUrl The url requiring authentication |
|
120 * @param aRealm The realm requiring authentication |
|
121 * @param aDefaultUser/Name The user name that was used before for this |
|
122 * realm and path, if any |
|
123 * @param aReturnedUserName The user name entered by the user |
|
124 * @param aReturnedPasswd The password entered by the user |
|
125 * @param aBasicAuthentication A flag if basic authentication was used |
|
126 * @return EFalse if the user canceled, ETrue otherwise |
|
127 */ |
|
128 virtual TBool DialogUserAuthenticationLC( |
|
129 const TDesC& aUrl, |
|
130 const TDesC& aRealm, |
|
131 const TDesC& aDefaultUserName, |
|
132 HBufC*& aReturnedUserName, |
|
133 HBufC*& aReturnedPasswd, |
|
134 TBool aBasicAuthentication = EFalse); |
|
135 |
|
136 /** |
|
137 * Display a note to the user. No softkeys |
|
138 * @since 3.0 |
|
139 * @param aMessage The message to display |
|
140 * @return void |
|
141 */ |
|
142 virtual void DialogNoteL( const TDesC& aMessage ); |
|
143 |
|
144 /** |
|
145 * Display a note to the user with ok softkey only |
|
146 * @since 3.0 |
|
147 * @param aTitle The title, could be empty |
|
148 * @param aMessage The message to display |
|
149 * @return void |
|
150 */ |
|
151 virtual void DialogAlertL( const TDesC& aTitle, |
|
152 const TDesC& aMessage ); |
|
153 |
|
154 /** |
|
155 * Display confirmation message to the user |
|
156 * @since 3.0 |
|
157 * @param aTitle The title, could be empty |
|
158 * @param aMessage The message to display |
|
159 * @param aYesMessage The text to display on left softkey |
|
160 * @param aNoMessage The text to display on right softkey |
|
161 * @return EFalse if the user canceled, ETrue otherwise |
|
162 */ |
|
163 virtual TBool DialogConfirmL( const TDesC& aTitle, |
|
164 const TDesC& aMessage, |
|
165 const TDesC& aYesMessage, |
|
166 const TDesC& aNoMessage); |
|
167 |
|
168 /** |
|
169 * Display input dialog to the user |
|
170 * @since 3.0 |
|
171 * @param aTitle The title, could be empty |
|
172 * @param aMessage The message to display |
|
173 * @param aDefaultInput The default input if available |
|
174 * @param aReturnedInput The input entered by the user |
|
175 * Returned on the cleanup stack, owned by the calling application |
|
176 * @return EFalse if the user canceled, ETrue otherwise |
|
177 */ |
|
178 virtual TBool DialogPromptLC(const TDesC& aTitle, |
|
179 const TDesC& aMessage, |
|
180 const TDesC& aDefaultInput, |
|
181 HBufC*& aReturnedInput); |
|
182 |
|
183 /** |
|
184 * Display object info and ask confirmation before download |
|
185 * @since 3.0 |
|
186 * @param aBrCtlObjectInfo The object info |
|
187 * @return EFalse if the user canceled, ETrue otherwise |
|
188 */ |
|
189 virtual TBool DialogDownloadObjectL( |
|
190 CBrCtlObjectInfo* aBrCtlObjectInfo ); |
|
191 |
|
192 /** |
|
193 * DIsplay the images that appear in the current page |
|
194 * @since 3.0 |
|
195 * @param aPageImages The images that appear in this page |
|
196 * @return vois |
|
197 */ |
|
198 virtual void DialogDisplayPageImagesL( |
|
199 CArrayFixFlat<TBrCtlImageCarrier>& aPageImages); |
|
200 |
|
201 /** |
|
202 * Cancel any dialog that is being displayed due to |
|
203 * e.g. Browser exit or page was destroyed |
|
204 * @since 3.0 |
|
205 * @return void |
|
206 */ |
|
207 virtual void CancelAll(); |
|
208 |
|
209 /** |
|
210 * Display search on page dialog |
|
211 * @since 3.0 |
|
212 * @return void |
|
213 */ |
|
214 virtual void DialogFindL() { /* TODO: implement this body!!! */ } ; |
|
215 |
|
216 /** |
|
217 * Mime File selection dialog for specific mime type files |
|
218 * @since 3.2 |
|
219 * @param aSelectedFileName The selected file name. |
|
220 * @param aMimeType The accepted mime type |
|
221 * Returned on cleanup stack. Browser control will free the buffer |
|
222 * @return EFalse if the user canceled, ETrue otherwise |
|
223 */ |
|
224 virtual TBool DialogMimeFileSelectLC( HBufC*& aSelectedFileName, |
|
225 const TDesC& aMimeType ); |
|
226 |
|
227 |
|
228 public: // New functions |
|
229 |
|
230 /** |
|
231 * Display a tooltip (info popup note) |
|
232 * @since 3.0 |
|
233 * @return void |
|
234 */ |
|
235 void ShowTooltipL( const TDesC& aText, TInt aDuration, TInt aDelay ); |
|
236 |
|
237 /** |
|
238 * Display a dialog which tracks upload progress |
|
239 * @since 3.0 |
|
240 * @param aTotalSize the total size of a file being uploaded |
|
241 * @param aChunkSize the size of the current chunk being uploaded |
|
242 * @param aIsLastChunk boolean value indicating whether the current |
|
243 * @param aObserver an observer for the upload progress dialog |
|
244 * chunk is the last one in the entire download |
|
245 * @return void |
|
246 */ |
|
247 void UploadProgressNoteL( |
|
248 TInt32 aTotalSize, |
|
249 TInt32 aChunkSize, |
|
250 TBool aIsLastChunk, |
|
251 MBrowserDialogsProviderObserver* aObserver ); |
|
252 |
|
253 /** |
|
254 * Callback from Window, indicating that the window is now active |
|
255 * @since 3.0 |
|
256 */ |
|
257 void WindowActivated(); |
|
258 |
|
259 // DATA MEMBERS |
|
260 private: |
|
261 |
|
262 TBool iCancelWaitingDialogs; // ETrue means that waiting dialogs should not be displayed when flushed |
|
263 |
|
264 }; |
|
265 |
|
266 #endif // BROWSERDIALOGSPROVIDERPROXY_H |
|
267 |
|
268 // End of File |