|
1 /* |
|
2 * Copyright (c) 2002-2007 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: |
|
15 * API provider. |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #ifndef MAPIPROVIDER_H |
|
22 #define MAPIPROVIDER_H |
|
23 |
|
24 // INCLUDE FILES |
|
25 #include "WmlBrowserBuild.h" |
|
26 #include "BrowserLoadObserver.h" // for LoadUrlType |
|
27 #ifdef __RSS_FEEDS |
|
28 #include "FeedsClientUtilities.h" |
|
29 #endif |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 |
|
33 class MPreferences; |
|
34 class MCommsModel; |
|
35 class MConnection; |
|
36 class MDisplay; |
|
37 class MBmOTABinSender; |
|
38 |
|
39 //class MStartPageHandler; |
|
40 class CBrCtlInterface; |
|
41 class CBrowserDialogsProvider; |
|
42 class CFavouritesItem; |
|
43 class TFavouritesWapAp; |
|
44 class RHttpDownloadMgr; |
|
45 class CDownloadMgrUiDownloadsList; |
|
46 class CBrowserSpecialLoadObserver; |
|
47 class CBrowserSoftkeysObserver; |
|
48 class CBrowserPopupEngine; |
|
49 class CBrowserWindowManager; |
|
50 |
|
51 // CLASS DECLARATION |
|
52 |
|
53 /** |
|
54 * Interface to query several API implementations. |
|
55 * |
|
56 * @lib Browser.app |
|
57 * @since Series 60 1.2 |
|
58 */ |
|
59 class MApiProvider |
|
60 { |
|
61 public: // New functions |
|
62 |
|
63 /** |
|
64 * Returns reference to the implementation of MDisplay. |
|
65 * @since Series 60 1.2 |
|
66 * @return An implementation of MDisplay |
|
67 */ |
|
68 virtual MDisplay& Display() const = 0; |
|
69 |
|
70 /** |
|
71 * Returns a reference to the implementaion of MConnection, |
|
72 * through wich some high-level connection specific data can be set |
|
73 * @since Series 60 1.2 |
|
74 * @return reference to MConnection object |
|
75 */ |
|
76 virtual MConnection& Connection() const = 0; |
|
77 |
|
78 /** |
|
79 * Returns reference to the implementation of MPrefences. |
|
80 * @since Series 60 1.2 |
|
81 * @return An implementation of MPrefences |
|
82 */ |
|
83 virtual MPreferences& Preferences() const = 0; |
|
84 |
|
85 /** |
|
86 * Returns reference to the implementation of MCommsModel. |
|
87 * @since Series 60 1.2 |
|
88 * @return An implementation of MCommsModel |
|
89 */ |
|
90 virtual MCommsModel& CommsModel() const = 0; |
|
91 |
|
92 /** |
|
93 * Returns reference to the CBrCtlInterface |
|
94 * @since Series 60 2.8 |
|
95 * @return A reference to CBrCtlInterface |
|
96 */ |
|
97 virtual CBrCtlInterface& BrCtlInterface() const = 0; |
|
98 |
|
99 /** |
|
100 * Returns reference to CBrowserLoadObserver. |
|
101 * @since Series 60 2.8 |
|
102 * @return An implementation of MBrCtlLoadEventObserver |
|
103 */ |
|
104 virtual CBrowserLoadObserver& LoadObserver() const = 0; |
|
105 |
|
106 virtual CBrowserSpecialLoadObserver& SpecialLoadObserver() const = 0; |
|
107 |
|
108 virtual CBrowserSoftkeysObserver& SoftkeysObserver() const = 0; |
|
109 /** |
|
110 * Returns reference to CBrowserDialogsProvider. |
|
111 * @since Series 60 2.8 |
|
112 * @return An implementation of MBrCtlDialogsProvider |
|
113 */ |
|
114 virtual CBrowserDialogsProvider& DialogsProvider() const = 0; |
|
115 |
|
116 /** |
|
117 * Returns reference to the implementation of MBmOTABinSender. |
|
118 * @since Series 60 1.2 |
|
119 * @return An implementation of MBmOTABinSender |
|
120 */ |
|
121 virtual MBmOTABinSender& BmOTABinSenderL() = 0; |
|
122 |
|
123 virtual CBrowserWindowManager& WindowMgr() const = 0; |
|
124 |
|
125 virtual CBrowserPopupEngine& PopupEngine() const = 0; |
|
126 |
|
127 /** |
|
128 * Sets uid which should be activated if needed |
|
129 * If not, it activates view immediately. |
|
130 * @since Series 60 1.2 |
|
131 * @param aUid Uid of the view |
|
132 */ |
|
133 virtual void SetViewToBeActivatedIfNeededL( TUid aUid, TInt aMessageId = 0 ) = 0; |
|
134 |
|
135 /** |
|
136 * In some cases it's not permitted to cancel fetching process. |
|
137 * @since Series 60 1.2 |
|
138 * @return true is user can cancel fetch |
|
139 */ |
|
140 virtual TBool IsCancelFetchAllowed() const = 0; |
|
141 |
|
142 /** |
|
143 * Returns Uid of the last used view. |
|
144 * @since Series 60 1.2 |
|
145 * @return Uid of the last used view |
|
146 */ |
|
147 virtual TUid LastActiveViewId() const = 0; |
|
148 |
|
149 /** |
|
150 * Sets uid of the last used view |
|
151 * @since Series 60 1.2 |
|
152 * @param aUid Uid of the latest used view |
|
153 */ |
|
154 virtual void SetLastActiveViewId( TUid aUid ) = 0; |
|
155 |
|
156 /** |
|
157 * Tells if WmlBrowser is in the middle of a shutdown process. |
|
158 * @since Series 60 1.2 |
|
159 * @return ETrue if the app is being closed, otherwise with EFalse |
|
160 */ |
|
161 virtual TBool ExitInProgress() const = 0; |
|
162 |
|
163 /** |
|
164 * Sets a flag in WmlBrowser to indicate shutdown process. |
|
165 * @since Series 60 1.2 |
|
166 * @param aValue Determines if exit is in progress or not |
|
167 */ |
|
168 virtual void SetExitInProgress( TBool aValue ) = 0; |
|
169 |
|
170 /** |
|
171 * Is there connection procedure ongoing? |
|
172 * @since Series 60 1.2 |
|
173 * @return ETrue if connection procedure is ongoing |
|
174 */ |
|
175 virtual TBool IsConnecting() const = 0; |
|
176 |
|
177 /** |
|
178 * Updates progress bar in contentview. |
|
179 * @since Series 60 1.2 |
|
180 * @param aStatusMsg Progress bar text |
|
181 */ |
|
182 virtual void UpdateNaviPaneL( TDesC& aStatusMsg ) = 0; |
|
183 |
|
184 /** |
|
185 * Set view to return to when closing the content view. |
|
186 * @since Series60 1.2 |
|
187 * @param aUid View uid |
|
188 */ |
|
189 virtual void SetViewToReturnOnClose( TUid const &aUid ) = 0; |
|
190 |
|
191 /** |
|
192 * Close the content view by activating the bookmarks view |
|
193 * @since Series60 1.2 |
|
194 */ |
|
195 virtual void CloseContentViewL() = 0; |
|
196 |
|
197 /** |
|
198 * Is embedded mode ongoing? |
|
199 * @since Series60 1.2 |
|
200 * @return ETrue if embedded mode is ongoing |
|
201 */ |
|
202 virtual TBool IsEmbeddedModeOn() const = 0; |
|
203 |
|
204 virtual TBool IsShutdownRequested() const = 0; |
|
205 |
|
206 virtual void ExitBrowser(TBool aUserShutdown) = 0; |
|
207 |
|
208 /** |
|
209 * Is the avkon appshutter running |
|
210 * @since Series60 2.0 |
|
211 * @return ETrue if AppShutter is active |
|
212 */ |
|
213 virtual TBool IsAppShutterActive() const = 0; |
|
214 |
|
215 /** |
|
216 * Starts prefrences view if no valid ap |
|
217 * @since Series60 2.0 |
|
218 * @return ETrue if access point has been set. |
|
219 */ |
|
220 virtual TBool StartPreferencesViewL( TUint aListItems ) = 0; |
|
221 |
|
222 /** |
|
223 * Returns ETrue if at least one page has been loaded. |
|
224 * @return ETrue if at least one page has been loaded.\n |
|
225 * EFalse if no pages has been loaded. |
|
226 */ |
|
227 virtual TBool IsPageLoaded() = 0; |
|
228 |
|
229 /** |
|
230 * |
|
231 */ |
|
232 virtual TBool IsForeGround() const = 0; |
|
233 |
|
234 /** |
|
235 * Returns fetching status. |
|
236 * @return ETrue if there is a fetch going on, EFalse otherwise. |
|
237 */ |
|
238 virtual TBool Fetching() const = 0; |
|
239 |
|
240 /** |
|
241 * Returns content display status. |
|
242 * @return ETrue if content of a new page is displayed, EFalse otherwise. |
|
243 * (useful for zooming while page is loading) |
|
244 */ |
|
245 virtual TBool ContentDisplayed() const = 0; |
|
246 |
|
247 /** |
|
248 * Sets the content display status. |
|
249 * (useful for zooming while page is loading) |
|
250 */ |
|
251 virtual void SetContentDisplayed( TBool aValue ) = 0; |
|
252 |
|
253 /** |
|
254 * Initiate fetching of bookmark. |
|
255 * @param aBookmarkUid Uid of bookmark to fetch. |
|
256 */ |
|
257 virtual void FetchBookmarkL( TInt aBookmarkUid ) = 0; |
|
258 |
|
259 /** |
|
260 * Initiate fetching of bookmark. |
|
261 * @param aBookmarkItem Bookmark item to fetch. |
|
262 */ |
|
263 virtual void FetchBookmarkL( const CFavouritesItem& aBookmarkItem ) = 0; |
|
264 |
|
265 /** |
|
266 * Initiate fetching of URL. |
|
267 * @param aUrl URL to fetch. |
|
268 * @param aUserName User name. |
|
269 * @param aPassword Password. |
|
270 * @param aAccessPoint AccessPoint. |
|
271 */ |
|
272 virtual void FetchL( |
|
273 const TDesC& aUrl, |
|
274 const TDesC& aUserName, |
|
275 const TDesC& aPassword, |
|
276 const TFavouritesWapAp& aAccessPoint, |
|
277 CBrowserLoadObserver::TBrowserLoadUrlType aUrlType |
|
278 ) = 0; |
|
279 |
|
280 /** |
|
281 * Initiate fetching of URL with default AP, empty username and password. |
|
282 * @param aUrl URL to fetch. |
|
283 */ |
|
284 virtual void FetchL( const TDesC& aUrl, CBrowserLoadObserver::TBrowserLoadUrlType aUrlType = CBrowserLoadObserver::ELoadUrlTypeOther ) = 0; |
|
285 |
|
286 /** |
|
287 * Cancel fetching. |
|
288 */ |
|
289 virtual void CancelFetch( TBool aIsUserInitiated ) = 0; |
|
290 |
|
291 /** |
|
292 * Sets requested AP. |
|
293 * @param aAp the AP to use when connectionneeded is called. |
|
294 */ |
|
295 virtual void SetRequestedAP( TInt aAp ) = 0; |
|
296 |
|
297 virtual void SetExitFromEmbeddedMode( TBool aFlag ) = 0; |
|
298 |
|
299 //To check and set iShowProgress flag that indicates that |
|
300 //real downloading is going on ( we are not loading from cache ) |
|
301 |
|
302 virtual TBool IsProgressShown() const = 0; |
|
303 |
|
304 virtual void SetProgressShown( TBool aProgressShown ) = 0; |
|
305 |
|
306 virtual TBool StartedUp() const = 0; |
|
307 |
|
308 virtual TUint32 RequestedAp() const = 0; |
|
309 |
|
310 /** |
|
311 * Logs a record of opened pages to AHLE |
|
312 */ |
|
313 virtual void LogAccessToRecentUrlL( CBrCtlInterface& aBrCtlInterface ) = 0; |
|
314 |
|
315 /** |
|
316 * Logs a record of requested pages to Recent Url Store |
|
317 */ |
|
318 virtual void LogRequestedPageToRecentUrlL( const TDesC& aUrl ) = 0; |
|
319 |
|
320 /** |
|
321 * Starts animation. |
|
322 */ |
|
323 virtual void StartProgressAnimationL() = 0; |
|
324 |
|
325 /** |
|
326 * Stops animation. |
|
327 */ |
|
328 virtual void StopProgressAnimationL() = 0; |
|
329 |
|
330 #ifdef __RSS_FEEDS |
|
331 /** |
|
332 * Returns reference to FeedsClientUtilities. |
|
333 */ |
|
334 virtual CFeedsClientUtilities& FeedsClientUtilities() const = 0; |
|
335 #endif // __RSS_FEEDS |
|
336 |
|
337 /** |
|
338 * Returns Uid of the previous active view from the view history. |
|
339 * @since Series 60 3.1 |
|
340 * @return Uid of the previous active view |
|
341 */ |
|
342 virtual TUid GetPreviousViewFromViewHistory() = 0; |
|
343 |
|
344 /** |
|
345 * Set the View for in which the last CBA update was made |
|
346 * @since 5.0 |
|
347 */ |
|
348 virtual void SetLastCBAUpdateView( TUid aView ) = 0; |
|
349 |
|
350 /** |
|
351 * Get the view in which the last CBA update was made |
|
352 * @since 5.0 |
|
353 * @return TUid of last view for which CBA was updated |
|
354 */ |
|
355 virtual TUid GetLastCBAUpdateView() = 0; |
|
356 |
|
357 |
|
358 /** |
|
359 * Return if Flash plugin is present in the system or not |
|
360 * @param none |
|
361 * @return TBool |
|
362 */ |
|
363 virtual TBool FlashPresent( ) = 0; |
|
364 |
|
365 /** |
|
366 * Check state of LaunchHomePage command for dimmed state in options menu and shortcut keymap |
|
367 * @return ETrue is LaunchHomePage command should be dimmed in options menu and shortcut keymap |
|
368 * EFalse otherwise |
|
369 * @param none |
|
370 */ |
|
371 virtual TBool IsLaunchHomePageDimmedL() = 0; |
|
372 |
|
373 /** |
|
374 * Return if the Browser was originally launched directly into the feeds view |
|
375 * @param none |
|
376 * @return TBool |
|
377 */ |
|
378 virtual TBool BrowserWasLaunchedIntoFeeds() = 0; |
|
379 |
|
380 /** |
|
381 * Set flag to ETrue if called from another application. |
|
382 * @since Series 60 1.2 |
|
383 * @param aValue Is browser called from some another App. |
|
384 */ |
|
385 virtual void SetCalledFromAnotherApp( TBool aValue ) = 0; |
|
386 |
|
387 /** |
|
388 * Get flag if called from another application. |
|
389 * @since Series 60 3.1 |
|
390 * @return Etrue if browser is called from some another App. |
|
391 */ |
|
392 virtual TBool CalledFromAnotherApp() = 0; |
|
393 /** |
|
394 * Check from CCoeAppUi if a Dialog or Menu is diplayed on top of the view |
|
395 * @return ETrue if Dialog or Menu is displayed |
|
396 * EFalse otherwise |
|
397 * @param none |
|
398 */ |
|
399 virtual TBool IsDisplayingMenuOrDialog() = 0; |
|
400 |
|
401 /** |
|
402 * API to complete the delayed UI initialization. Invoked once after first view is up. |
|
403 * @return ETrue if successful |
|
404 * EFalse otherwise |
|
405 * @param none |
|
406 */ |
|
407 virtual TBool CompleteDelayedInit() = 0; |
|
408 |
|
409 }; |
|
410 |
|
411 #endif |
|
412 |
|
413 // End of File |