williamr@2
|
1 |
/*
|
williamr@2
|
2 |
* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
3 |
* All rights reserved.
|
williamr@2
|
4 |
* This component and the accompanying materials are made available
|
williamr@2
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
williamr@2
|
6 |
* which accompanies this distribution, and is available
|
williamr@2
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
williamr@2
|
8 |
*
|
williamr@2
|
9 |
* Initial Contributors:
|
williamr@2
|
10 |
* Nokia Corporation - initial contribution.
|
williamr@2
|
11 |
*
|
williamr@2
|
12 |
* Contributors:
|
williamr@2
|
13 |
*
|
williamr@2
|
14 |
* Description: Definition of the Browser Control API
|
williamr@2
|
15 |
*
|
williamr@2
|
16 |
*/
|
williamr@2
|
17 |
|
williamr@2
|
18 |
|
williamr@2
|
19 |
#ifndef BRCTLINTERFACE_H
|
williamr@2
|
20 |
#define BRCTLINTERFACE_H
|
williamr@2
|
21 |
|
williamr@2
|
22 |
// INCLUDES
|
williamr@2
|
23 |
#include <../bidi.h>
|
williamr@2
|
24 |
#include <e32std.h>
|
williamr@2
|
25 |
#include <e32base.h>
|
williamr@2
|
26 |
#include <coecntrl.h>
|
williamr@2
|
27 |
#include <eikmenup.h>
|
williamr@2
|
28 |
#include <ssl.h>
|
williamr@2
|
29 |
|
williamr@2
|
30 |
#include <BrCtlDialogsProvider.h>
|
williamr@2
|
31 |
#include <BrCtlLayoutObserver.h>
|
williamr@2
|
32 |
#include <BrCtlLinkResolver.h>
|
williamr@2
|
33 |
#include <BrCtlSoftkeysObserver.h>
|
williamr@2
|
34 |
#include <BrCtlSpecialLoadObserver.h>
|
williamr@2
|
35 |
#include <BrCtlWindowObserver.h>
|
williamr@2
|
36 |
#include <BrCtlDownloadObserver.h>
|
williamr@2
|
37 |
#include <BrCtlDefs.h>
|
williamr@2
|
38 |
|
williamr@2
|
39 |
// DATA TYPES
|
williamr@2
|
40 |
|
williamr@2
|
41 |
// FORWARD DECLARATIONS
|
williamr@2
|
42 |
class MBrCtlDataLoadSupplier;
|
williamr@2
|
43 |
class MBrCtlDataLoadConsumer;
|
williamr@2
|
44 |
class MBrCtlLoadEventObserver;
|
williamr@2
|
45 |
class MBrCtlDialogsProvider;
|
williamr@2
|
46 |
class TBrCtlWmlServiceOption;
|
williamr@2
|
47 |
class TBrCtlSubscribeTo;
|
williamr@2
|
48 |
class MBrCtlStateChangeObserver;
|
williamr@2
|
49 |
class MBrCtlCommandObserver;
|
williamr@2
|
50 |
class MWidgetCallback;
|
williamr@2
|
51 |
class MWidgetExtension;
|
williamr@2
|
52 |
class CBrCtlInterface;
|
williamr@2
|
53 |
class CPluginInfo;
|
williamr@2
|
54 |
class TBrCtlImageCarrier;
|
williamr@2
|
55 |
|
williamr@2
|
56 |
/**
|
williamr@2
|
57 |
* Creates the browser control.
|
williamr@2
|
58 |
*
|
williamr@2
|
59 |
* @param aParent Parent window of the browser control
|
williamr@2
|
60 |
* @param aRect Bounding rectangle for the browser control
|
williamr@2
|
61 |
* @param aBrCtlCapabilities Desired capabilities of the browser control.
|
williamr@2
|
62 |
* For example, displaying scroll bars, allowing network access for HTTP requests.
|
williamr@2
|
63 |
* @see For a complete list of capability options, see TBrCtlCapabilities
|
williamr@2
|
64 |
* @param aCommandIdBase Base values for Command IDs for Browser Control.
|
williamr@2
|
65 |
* These are added to ensure that each Command ID is unique; Browser Control command IDs must be different from the host application command IDs.
|
williamr@2
|
66 |
* @see For more information, see TBrCtlCommandId
|
williamr@2
|
67 |
* @param aBrCtlSoftkeysObserver Softkeys observer.
|
williamr@2
|
68 |
* Default: the host application does not update the softkeys.
|
williamr@2
|
69 |
* @see For more information, see MBrCtlSoftkeysObserver class
|
williamr@2
|
70 |
* @param aBrCtlLinkResolver Link Resolver. Must be provided if ECapabilityClient
|
williamr@2
|
71 |
* ResolveEmbeddedURL or ECapabilityClientNotifyURL is set.
|
williamr@2
|
72 |
* @see For more information, see MBrCtlLinkResolver class.
|
williamr@2
|
73 |
* @param aBrCtlSpecialLoadObserver Special Load Observer.
|
williamr@2
|
74 |
* @see MBrCtlSpecialLoadObserver class for more details of special load observer.
|
williamr@2
|
75 |
* @param aBrCtlLayoutObserver Layout Observer.
|
williamr@2
|
76 |
* Default:
|
williamr@2
|
77 |
* Non-markup pages are not handled by the browser.
|
williamr@2
|
78 |
* Non-HTTP(S) schemes are not handled by the browser.
|
williamr@2
|
79 |
* Connection is created by the Proxy Filter.
|
williamr@2
|
80 |
* @see For more information, see MBrCtlLayoutObserver class
|
williamr@2
|
81 |
* @param aBrCtlDialogsProvider Dialogs Provider.
|
williamr@2
|
82 |
* @see For more information, see MBrCtlDialogsProvider class
|
williamr@2
|
83 |
* @param aBrCtlWindowObserver Window Observer.
|
williamr@2
|
84 |
* @see For more information, see MBrCtlWindowObserver class
|
williamr@2
|
85 |
* @param aBrCtlDownloadObserver Downlaod observer
|
williamr@2
|
86 |
* @see For more information, MBrCtlDownloadObserver class
|
williamr@2
|
87 |
* @return a pointer to CBrCtlInterface class or NULL if this function fails.
|
williamr@2
|
88 |
*/
|
williamr@2
|
89 |
IMPORT_C CBrCtlInterface* CreateBrowserControlL(CCoeControl* aParent, TRect aRect,
|
williamr@2
|
90 |
TUint aBrCtlCapabilities, TUint aCommandIdBase = TBrCtlDefs::ECommandIdBase,
|
williamr@2
|
91 |
MBrCtlSoftkeysObserver* aBrCtlSoftkeysObserver = NULL,
|
williamr@2
|
92 |
MBrCtlLinkResolver* aBrCtlLinkResolver = NULL,
|
williamr@2
|
93 |
MBrCtlSpecialLoadObserver* aBrCtlSpecialLoadObserver = NULL,
|
williamr@2
|
94 |
MBrCtlLayoutObserver* aBrCtlLayoutObserver = NULL,
|
williamr@2
|
95 |
MBrCtlDialogsProvider* aBrCtlDialogsProvider = NULL,
|
williamr@2
|
96 |
MBrCtlWindowObserver* aBrCtlWindowObserver = NULL,
|
williamr@2
|
97 |
MBrCtlDownloadObserver* aBrCtlDownloadObserver = NULL );
|
williamr@2
|
98 |
|
williamr@2
|
99 |
/**
|
williamr@2
|
100 |
* The CBrCtlInterface class is the base class of the Browser Control API.
|
williamr@2
|
101 |
* All clients of browser control must use this class. The functions defined
|
williamr@2
|
102 |
* in the CBrCtlInterface class implement basic Browser Control functionality.
|
williamr@2
|
103 |
* You can customize the Browser Control to extend its functionality by
|
williamr@2
|
104 |
* implementing additional interface classes in the host application. Examples
|
williamr@2
|
105 |
* of such classes are MBrCtlDataLoadSupplier, MBrCtlDialogsProvider,
|
williamr@2
|
106 |
* MBrCtlDialogsProvider etc.
|
williamr@2
|
107 |
*
|
williamr@2
|
108 |
* Usage:
|
williamr@2
|
109 |
*
|
williamr@2
|
110 |
* @code
|
williamr@2
|
111 |
* #include <BrCtlInterface.h>
|
williamr@2
|
112 |
* // Interface that provides dialogs used by the Browser Control.
|
williamr@2
|
113 |
* #include <BrCtlDialogsProvider.h>
|
williamr@2
|
114 |
* // Interface used to receive scrolling events.
|
williamr@2
|
115 |
* #include <BrCtlLayoutObserver.h>
|
williamr@2
|
116 |
* //Interface that provides a callback mechanism for receiving the
|
williamr@2
|
117 |
* //content of an embedded link or the content of a user-initiated
|
williamr@2
|
118 |
* //load request.
|
williamr@2
|
119 |
* #include <BrCtlLinkResolver.h>
|
williamr@2
|
120 |
* //Interface that handles requests to change the softkeys.
|
williamr@2
|
121 |
* #include <BrCtlSoftkeysObserver.h>
|
williamr@2
|
122 |
* //Interface that handles special load needs.
|
williamr@2
|
123 |
* #include <BrCtlSpecialLoadObserver.h>
|
williamr@2
|
124 |
* //Reserved for future use.
|
williamr@2
|
125 |
* #include <BrCtlWindowObserver.h>
|
williamr@2
|
126 |
* //Interface that passes download events from the
|
williamr@2
|
127 |
* //Download Manager through the Browser Control to the
|
williamr@2
|
128 |
* //host application.
|
williamr@2
|
129 |
* #include <BrCtlDownloadObserver.h>
|
williamr@2
|
130 |
* Enum Definition of the Browser Control API.
|
williamr@2
|
131 |
* #include <BrCtlDefs.h>
|
williamr@2
|
132 |
*
|
williamr@2
|
133 |
*
|
williamr@2
|
134 |
* The following types of things you can do with the Browser Control API.
|
williamr@2
|
135 |
*
|
williamr@2
|
136 |
* Creating a basic Browser Control
|
williamr@2
|
137 |
* Creating a Browser Control with observer interfaces
|
williamr@2
|
138 |
* Loading content
|
williamr@2
|
139 |
* Passing content incrementally
|
williamr@2
|
140 |
* Receiving load progress events
|
williamr@2
|
141 |
* Handling special load requests
|
williamr@2
|
142 |
* Customizing dialogs
|
williamr@2
|
143 |
* Specifying the softkeys
|
williamr@2
|
144 |
* Resolving links
|
williamr@2
|
145 |
* Customizing scroll bars
|
williamr@2
|
146 |
* Receiving change-of-state events
|
williamr@2
|
147 |
*
|
williamr@2
|
148 |
* @see S60 Platform: Browser Control API Developer's Guide Version 2.0
|
williamr@2
|
149 |
* @lib BrowserEngine.lib
|
williamr@2
|
150 |
* @since 2.8
|
williamr@2
|
151 |
* @file BrCtlInterface.h
|
williamr@2
|
152 |
* @endcode *
|
williamr@2
|
153 |
*/
|
williamr@2
|
154 |
class CBrCtlInterface : public CCoeControl
|
williamr@2
|
155 |
{
|
williamr@2
|
156 |
public: // Constructors and destructor
|
williamr@2
|
157 |
|
williamr@2
|
158 |
/**
|
williamr@2
|
159 |
* Destructor.
|
williamr@2
|
160 |
*/
|
williamr@2
|
161 |
inline virtual ~CBrCtlInterface() {}
|
williamr@2
|
162 |
|
williamr@2
|
163 |
public: // New functions
|
williamr@2
|
164 |
|
williamr@2
|
165 |
/**
|
williamr@2
|
166 |
* Passes a command to the Browser Control..
|
williamr@2
|
167 |
* @since 2.8
|
williamr@2
|
168 |
* @param aCommand The command that the Browser Control should process
|
williamr@2
|
169 |
* @return void
|
williamr@2
|
170 |
* @see TBrCtlCommands, For a complete list of commands,
|
williamr@2
|
171 |
*/
|
williamr@2
|
172 |
IMPORT_C virtual void HandleCommandL(TInt aCommand) = 0;
|
williamr@2
|
173 |
|
williamr@2
|
174 |
/**
|
williamr@2
|
175 |
* Return the display size that would be needed to see all the content
|
williamr@2
|
176 |
* @since 2.8
|
williamr@2
|
177 |
* @return The display size that would be needed to see all the content
|
williamr@2
|
178 |
*/
|
williamr@2
|
179 |
IMPORT_C virtual TSize ContentSize() = 0;
|
williamr@2
|
180 |
|
williamr@2
|
181 |
/**
|
williamr@2
|
182 |
* Update a Browser Control setting
|
williamr@2
|
183 |
* @since 2.8
|
williamr@2
|
184 |
* @param aSetting The setting to update
|
williamr@2
|
185 |
* @param aValue The new value of the setting
|
williamr@2
|
186 |
* @leave KErrArgument if the value of aSetting is out of range.
|
williamr@2
|
187 |
* @return void
|
williamr@2
|
188 |
*/
|
williamr@2
|
189 |
IMPORT_C virtual void SetBrowserSettingL(TUint aSetting, TUint aValue) = 0;
|
williamr@2
|
190 |
|
williamr@2
|
191 |
/**
|
williamr@2
|
192 |
* Get a setting from the Browser Control
|
williamr@2
|
193 |
* @since 2.8
|
williamr@2
|
194 |
* @param aSetting The setting to get
|
williamr@2
|
195 |
* @leave KErrArgument if the value of aSetting is out of range.
|
williamr@2
|
196 |
* @return The value of the setting
|
williamr@2
|
197 |
*/
|
williamr@2
|
198 |
IMPORT_C virtual TUint BrowserSettingL(TUint aSetting) = 0;
|
williamr@2
|
199 |
|
williamr@2
|
200 |
/**
|
williamr@2
|
201 |
* Request the Browser Control to display the content of a buffer
|
williamr@2
|
202 |
* @since 2.8
|
williamr@2
|
203 |
* @param aUrl A url that refers to the data. If a url scheme is used, it must be "data:"
|
williamr@2
|
204 |
* @param aData The content to display. Browser Control does not take ownership
|
williamr@2
|
205 |
* @param aDataType The data type of the data
|
williamr@2
|
206 |
* @param aCharsetUid The UID of the character converter of the content's charset 0 assumed Latin-1
|
williamr@2
|
207 |
* @return void
|
williamr@2
|
208 |
* @attention If you use this function, the Browser Control does not keep
|
williamr@2
|
209 |
* track of the history. If the data is not markup, Browser Control uses
|
williamr@2
|
210 |
* the Special Load Observer to pass the content back to the Host Application.
|
williamr@2
|
211 |
* The Special Load Observer uses the Document Handler to send the content
|
williamr@2
|
212 |
* to the proper application.
|
williamr@2
|
213 |
*/
|
williamr@2
|
214 |
IMPORT_C virtual void LoadDataL(const TDesC& aUrl,
|
williamr@2
|
215 |
const TDesC8& aData,
|
williamr@2
|
216 |
const TDataType& aDataType,
|
williamr@2
|
217 |
TUid aCharsetUid) = 0;
|
williamr@2
|
218 |
|
williamr@2
|
219 |
/**
|
williamr@2
|
220 |
* Request the Browser Control to display content incrementaly
|
williamr@2
|
221 |
* @since 2.8
|
williamr@2
|
222 |
* @param aUrl A url that refers to the data. If a url scheme is used, it must be "data:"
|
williamr@2
|
223 |
* @param aDataType The data type of the data
|
williamr@2
|
224 |
* @param aCharsetUid The UID of the character converter of the content's charset 0 assumed Latin-1
|
williamr@2
|
225 |
* @param aContentLength The length of the content.
|
williamr@2
|
226 |
* @param aBrCtlDataLoadSupplier A callback interface to stop passing data if an error occured in the Browser Control
|
williamr@2
|
227 |
* @param aBrCtlDataLoadConsumer A callback interface returned by the browser. Data should be passed to that interface
|
williamr@2
|
228 |
* @return void
|
williamr@2
|
229 |
* @attension If you use this function, the Browser Control does not keep
|
williamr@2
|
230 |
* track of the history.If the content type of the data is not markup, Browser
|
williamr@2
|
231 |
* Control uses the Special Load Observer to pass the content back to the Host
|
williamr@2
|
232 |
* Application. The Special Load Observer uses the Document Handler to send
|
williamr@2
|
233 |
* the content to the proper application.
|
williamr@2
|
234 |
*/
|
williamr@2
|
235 |
// The url scheme must be "data:" The url is needed as reference to this load request
|
williamr@2
|
236 |
IMPORT_C virtual void InitLoadDataL(const TDesC& aUrl,
|
williamr@2
|
237 |
const TDataType& aDataType,
|
williamr@2
|
238 |
TUid aCharsetUid,
|
williamr@2
|
239 |
TUint aContentLength,
|
williamr@2
|
240 |
MBrCtlDataLoadSupplier* aBrCtlDataLoadSupplier,
|
williamr@2
|
241 |
MBrCtlDataLoadConsumer** aBrCtlDataLoadConsumer) = 0;
|
williamr@2
|
242 |
|
williamr@2
|
243 |
/**
|
williamr@2
|
244 |
* Request the Browser Control to load a url
|
williamr@2
|
245 |
* @since 2.8
|
williamr@2
|
246 |
* @param aUrl The url to load
|
williamr@2
|
247 |
* @param aApId The Access Point Id to use
|
williamr@2
|
248 |
* @param aCacheMode The cache mode to use.
|
williamr@2
|
249 |
* Values: One of the following:
|
williamr@2
|
250 |
* ECacheModeNormal
|
williamr@2
|
251 |
* ECacheModeHistory
|
williamr@2
|
252 |
* ECacheModeNoCache
|
williamr@2
|
253 |
* ECacheModeOnlyCache
|
williamr@2
|
254 |
* @see For a description of each of these values, see TBrCtlCacheMode
|
williamr@2
|
255 |
* @return void
|
williamr@2
|
256 |
*/
|
williamr@2
|
257 |
IMPORT_C virtual void LoadUrlL( const TDesC& aUrl,
|
williamr@2
|
258 |
TInt aApId = -1,
|
williamr@2
|
259 |
TBrCtlDefs::TBrCtlCacheMode aBrCtlCacheMode = TBrCtlDefs::ECacheModeNormal) = 0;
|
williamr@2
|
260 |
|
williamr@2
|
261 |
/**
|
williamr@2
|
262 |
* Request the Browser Control to load and display a file from the file system
|
williamr@2
|
263 |
* @since 2.8
|
williamr@2
|
264 |
* @param aFileName The name of the file
|
williamr@2
|
265 |
* @return void
|
williamr@2
|
266 |
*/
|
williamr@2
|
267 |
IMPORT_C virtual void LoadFileL(const TDesC& aFileName) = 0;
|
williamr@2
|
268 |
|
williamr@2
|
269 |
/**
|
williamr@2
|
270 |
* Request the Browser Control to load and display a file from the file system
|
williamr@2
|
271 |
* @since 2.8
|
williamr@2
|
272 |
* @param aFileHandle The handle of the file
|
williamr@2
|
273 |
* @return void
|
williamr@2
|
274 |
*/
|
williamr@2
|
275 |
IMPORT_C virtual void LoadFileL(RFile& aFileHandle) = 0;
|
williamr@2
|
276 |
|
williamr@2
|
277 |
/*
|
williamr@2
|
278 |
* Return the WML Options for the current page
|
williamr@2
|
279 |
* @since 2.8
|
williamr@2
|
280 |
* @param
|
williamr@2
|
281 |
* @return The WML Options for the current page
|
williamr@2
|
282 |
*/
|
williamr@2
|
283 |
IMPORT_C virtual RPointerArray<TBrCtlWmlServiceOption>* WMLOptionMenuItemsL() = 0;
|
williamr@2
|
284 |
|
williamr@2
|
285 |
/**
|
williamr@2
|
286 |
* Request the Browser Control to add its own options to the option menu
|
williamr@2
|
287 |
* @since 2.8
|
williamr@2
|
288 |
* @param aMenuPane Handle of the menu that will contain the options
|
williamr@2
|
289 |
* @param aResourceId The resource ID of the menu
|
williamr@2
|
290 |
* @param aAfter WML options should be added after that index
|
williamr@2
|
291 |
* @return void
|
williamr@2
|
292 |
*/
|
williamr@2
|
293 |
IMPORT_C virtual void AddOptionMenuItemsL(CEikMenuPane& aMenuPane, TInt aResourceId, TInt aAfter=-1 ) = 0;
|
williamr@2
|
294 |
|
williamr@2
|
295 |
/**
|
williamr@2
|
296 |
* Request the Browser Control to clear the cache
|
williamr@2
|
297 |
* @since 2.8
|
williamr@2
|
298 |
* @return The number of bytes that were freed from cache.
|
williamr@2
|
299 |
*/
|
williamr@2
|
300 |
IMPORT_C virtual TUint ClearCache() = 0;
|
williamr@2
|
301 |
|
williamr@2
|
302 |
/**
|
williamr@2
|
303 |
* Ask the Browser Control if a URL is in cache
|
williamr@2
|
304 |
* @since 2.8
|
williamr@2
|
305 |
* @param aUrl The Url
|
williamr@2
|
306 |
* @return ETrue, if a specific Url is in cache
|
williamr@2
|
307 |
* EFalse if the URL is not in the cache
|
williamr@2
|
308 |
*/
|
williamr@2
|
309 |
IMPORT_C virtual TBool IsUrlInCache(TDesC& aUrl) = 0;
|
williamr@2
|
310 |
|
williamr@2
|
311 |
/**
|
williamr@2
|
312 |
* Ask the Browser Control to clear a URL from the cache
|
williamr@2
|
313 |
* @since 2.8
|
williamr@2
|
314 |
* @param aUrl The Url
|
williamr@2
|
315 |
* @return KErrNone if the URL is cleared from the cache
|
williamr@2
|
316 |
* Error message is the URL has not been cleared.
|
williamr@2
|
317 |
*/
|
williamr@2
|
318 |
IMPORT_C virtual TInt ClearItemInCache(TDesC& aUrl) = 0;
|
williamr@2
|
319 |
|
williamr@2
|
320 |
/**
|
williamr@2
|
321 |
* Request the Browser Control to return info about the page. The info is returned on the Cleanup Stack.
|
williamr@2
|
322 |
* @since 2.8
|
williamr@2
|
323 |
* @param aBrCtlPageInfo The type of requested info
|
williamr@2
|
324 |
* @return A descriptor containing the requested page info
|
williamr@2
|
325 |
* @attention The information is returned on the Cleanup stack.
|
williamr@2
|
326 |
*/
|
williamr@2
|
327 |
IMPORT_C virtual HBufC* PageInfoLC(TBrCtlDefs::TBrCtlPageInfo aBrCtlPageInfo ) = 0;
|
williamr@2
|
328 |
|
williamr@2
|
329 |
/**
|
williamr@2
|
330 |
* From CBrCtlInterface Query the Browser Control
|
williamr@2
|
331 |
* if there is a previous or next (depending on aDirection) element in history stack
|
williamr@2
|
332 |
* @param aDirection
|
williamr@2
|
333 |
* ENavigationBack if you wish to query whether there is a previous element
|
williamr@2
|
334 |
* in the history stack.
|
williamr@2
|
335 |
* ENavigationForward if you wish to query whether there is a subsequent
|
williamr@2
|
336 |
* element in the history stack.
|
williamr@2
|
337 |
* @since 2.8
|
williamr@2
|
338 |
* @return ETrue if can go aDirection, EFalse otherwise
|
williamr@2
|
339 |
*/
|
williamr@2
|
340 |
IMPORT_C virtual TBool NavigationAvailable( TBrCtlDefs::TBrCtlNavigationDirection aDirection ) = 0;
|
williamr@2
|
341 |
|
williamr@2
|
342 |
/**
|
williamr@2
|
343 |
* Request the Browser Control to save the current content to a file
|
williamr@2
|
344 |
* @since 2.8
|
williamr@2
|
345 |
* @param aFileName The name of the file to use for saving the content
|
williamr@2
|
346 |
* @return The number of bytes in the saved file
|
williamr@2
|
347 |
*/
|
williamr@2
|
348 |
IMPORT_C virtual TUint16 SaveToFileL(const TDesC& aFileName) = 0;
|
williamr@2
|
349 |
|
williamr@2
|
350 |
/**
|
williamr@2
|
351 |
* Request the Browser Control to pass the server's certificate info for the current page
|
williamr@2
|
352 |
* @since 2.8
|
williamr@2
|
353 |
* @return Certificate info of the server of the current page
|
williamr@2
|
354 |
*/
|
williamr@2
|
355 |
IMPORT_C virtual const TCertInfo* CertInfo() = 0;
|
williamr@2
|
356 |
|
williamr@2
|
357 |
/**
|
williamr@2
|
358 |
* Request the Browser Control to register for load events
|
williamr@2
|
359 |
* @since 2.8
|
williamr@2
|
360 |
* @param aBrCtlLoadEventObserver A load events observer to add
|
williamr@2
|
361 |
* @return void
|
williamr@2
|
362 |
* @attenstion Call this function immediately after creating the Browser Control.
|
williamr@2
|
363 |
* For multiple registrations, the host application may call this function more than once.
|
williamr@2
|
364 |
* Observers must unregister before deleting the Browser Control.
|
williamr@2
|
365 |
*/
|
williamr@2
|
366 |
IMPORT_C virtual void AddLoadEventObserverL(MBrCtlLoadEventObserver* aBrCtlLoadEventObserver) = 0;
|
williamr@2
|
367 |
|
williamr@2
|
368 |
/**
|
williamr@2
|
369 |
* Request the Browser Control to unregister for load events
|
williamr@2
|
370 |
* @since 2.8
|
williamr@2
|
371 |
* @param aBrCtlLoadEventObserver A load events observer to remove
|
williamr@2
|
372 |
* @return void
|
williamr@2
|
373 |
* @attenstion Call this function for each Load Observer that was previously registered.
|
williamr@2
|
374 |
|
williamr@2
|
375 |
|
williamr@2
|
376 |
*/
|
williamr@2
|
377 |
IMPORT_C virtual void RemoveLoadEventObserver(MBrCtlLoadEventObserver* aBrCtlLoadEventObserver) = 0;
|
williamr@2
|
378 |
|
williamr@2
|
379 |
/**
|
williamr@2
|
380 |
* Return the number of images in the current page
|
williamr@2
|
381 |
* @since 2.8
|
williamr@2
|
382 |
* @param
|
williamr@2
|
383 |
* @return The number of images in the current page
|
williamr@2
|
384 |
*/
|
williamr@2
|
385 |
IMPORT_C virtual TInt ImageCountL() = 0;
|
williamr@2
|
386 |
|
williamr@2
|
387 |
/**
|
williamr@2
|
388 |
* Returns the focused element
|
williamr@2
|
389 |
* @since 2.8
|
williamr@2
|
390 |
* @return The type of the focused element
|
williamr@2
|
391 |
* @attension The host application may need to perform special processing,
|
williamr@2
|
392 |
* such as updating the softkeys, when a specific element has the focus.
|
williamr@2
|
393 |
*/
|
williamr@2
|
394 |
IMPORT_C virtual TBrCtlDefs::TBrCtlElementType FocusedElementType() = 0;
|
williamr@2
|
395 |
|
williamr@2
|
396 |
/**
|
williamr@2
|
397 |
* Register an observer for state changes
|
williamr@2
|
398 |
* @since 2.8
|
williamr@2
|
399 |
* @param aBrCtlStateChangeObserver The observer to register
|
williamr@2
|
400 |
* @return void
|
williamr@2
|
401 |
* @attenstion The Observer must unregister before deleting the Browser Control.
|
williamr@2
|
402 |
*/
|
williamr@2
|
403 |
IMPORT_C virtual void AddStateChangeObserverL(MBrCtlStateChangeObserver* aBrCtlStateChangeObserver) = 0;
|
williamr@2
|
404 |
|
williamr@2
|
405 |
/**
|
williamr@2
|
406 |
* Unregister an observer for state changes
|
williamr@2
|
407 |
* @since 2.8
|
williamr@2
|
408 |
* @param The observer to unregister
|
williamr@2
|
409 |
* @return void
|
williamr@2
|
410 |
*/
|
williamr@2
|
411 |
IMPORT_C virtual void RemoveStateChangeObserver(MBrCtlStateChangeObserver* aBrCtlStateChangeObserver) = 0;
|
williamr@2
|
412 |
|
williamr@2
|
413 |
/**
|
williamr@2
|
414 |
* Request the Browser Control to return info about the Browser Control version. The info is returned on the Cleanup Stack.
|
williamr@2
|
415 |
* @since 2.8
|
williamr@2
|
416 |
* @param aVersionInfo The type of requested info
|
williamr@2
|
417 |
* @return A descriptor containing the requested page info
|
williamr@2
|
418 |
* @attention The information is returned on the Cleanup Stack.
|
williamr@2
|
419 |
*/
|
williamr@2
|
420 |
IMPORT_C virtual HBufC* VersionInfoLC(TBrCtlDefs::TBrCtlVersionInfo aVersionInfo) = 0;
|
williamr@2
|
421 |
|
williamr@2
|
422 |
/**
|
williamr@2
|
423 |
* Pass a list of content types to the Browser Control.
|
williamr@2
|
424 |
* These content types will not be using the download manager.
|
williamr@2
|
425 |
* The list must be separated by ';' e.g. "text/html;text/wml"
|
williamr@2
|
426 |
* @since 2.8
|
williamr@2
|
427 |
* @param aContentTypes The content types that should not use Download Manager
|
williamr@2
|
428 |
* @return void
|
williamr@2
|
429 |
* @deprecated This function is deprecated. Use the
|
williamr@2
|
430 |
* EParamsSelfDownloadableTypes parameter of the SetParamL function instead.
|
williamr@2
|
431 |
*/
|
williamr@2
|
432 |
IMPORT_C virtual void SetSelfDownloadContentTypesL(TDesC& aContentTypes) = 0;
|
williamr@2
|
433 |
|
williamr@2
|
434 |
/**
|
williamr@2
|
435 |
* Update a Browser Control parameter. consequent calls with the
|
williamr@2
|
436 |
* same aParam will replace the value, and not append to it.
|
williamr@2
|
437 |
* @since 2.8
|
williamr@2
|
438 |
* @param aParam The parameter to update
|
williamr@2
|
439 |
* @param aValue The new value of the parameter
|
williamr@2
|
440 |
* EParamsSelfDownoadableTypes: Pass a list of content types to the
|
williamr@2
|
441 |
* Browser Control. These content types will not be using the
|
williamr@2
|
442 |
* download manager. The list must be separated by ';' e.g.
|
williamr@2
|
443 |
* "text/html;text/wml"
|
williamr@2
|
444 |
*
|
williamr@2
|
445 |
* EParamsRequestHeaders: Pass a list of headers that the
|
williamr@2
|
446 |
* Browser Control. These headers will be added to each request.
|
williamr@2
|
447 |
* The list must be separated by '\r'. The header name and value must be
|
williamr@2
|
448 |
* separated by ':' e.g.
|
williamr@2
|
449 |
* "x-myheader: myvalue\rx-myotherheader: myothervalue"
|
williamr@2
|
450 |
* @return void
|
williamr@2
|
451 |
*/
|
williamr@2
|
452 |
IMPORT_C virtual void SetParamL(TBrCtlDefs::TBrCtlParams aParam, const TDesC& aValue) = 0;
|
williamr@2
|
453 |
|
williamr@2
|
454 |
/**
|
williamr@2
|
455 |
* Request the Browser Control to load a saved page.
|
williamr@2
|
456 |
* @since 3.0
|
williamr@2
|
457 |
* @param aUid a unique identifier for the saved page
|
williamr@2
|
458 |
* @param aSavedPageBuffer buffer which contains the content of the saved page
|
williamr@2
|
459 |
* @return void
|
williamr@2
|
460 |
*/
|
williamr@2
|
461 |
IMPORT_C virtual void LoadSavedPageL(const TDesC& aUid, TDesC& aSavedPageBuffer) = 0;
|
williamr@2
|
462 |
|
williamr@2
|
463 |
/**
|
williamr@2
|
464 |
* Return the zoom levels index
|
williamr@2
|
465 |
* @since 3.0
|
williamr@2
|
466 |
* @return The zoom levels array.
|
williamr@2
|
467 |
*/
|
williamr@2
|
468 |
IMPORT_C virtual RArray<TUint>* ZoomLevels() const = 0;
|
williamr@2
|
469 |
|
williamr@2
|
470 |
/**
|
williamr@2
|
471 |
* Perform the incremental find operation
|
williamr@2
|
472 |
* @param aKeyword String to be find.
|
williamr@2
|
473 |
* @since 3.0
|
williamr@2
|
474 |
* @return TBrCtlFindResponse
|
williamr@2
|
475 |
*/
|
williamr@2
|
476 |
IMPORT_C virtual int FindKeyword( const TDesC& aKeyword ) = 0;
|
williamr@2
|
477 |
|
williamr@2
|
478 |
/**
|
williamr@2
|
479 |
* Continue the incremental find operation
|
williamr@2
|
480 |
* @since 3.0
|
williamr@2
|
481 |
* @param aFowardDirection TRUE if search is in forword direction.
|
williamr@2
|
482 |
* For backword direction, it is FALSE.
|
williamr@2
|
483 |
* @return TBrCtlFindResponse
|
williamr@2
|
484 |
* @attention Method that is called when the user searches for the next
|
williamr@2
|
485 |
* keyword in the doc.
|
williamr@2
|
486 |
*
|
williamr@2
|
487 |
*/
|
williamr@2
|
488 |
IMPORT_C virtual TBrCtlDefs::TBrCtlFindResponse FindKeywordAgain( TBool aFowardDirection ) = 0;
|
williamr@2
|
489 |
|
williamr@2
|
490 |
/**
|
williamr@2
|
491 |
* Return information about the linked feeds in the current page - used to
|
williamr@2
|
492 |
* build a "Subscribe to" submenu.
|
williamr@2
|
493 |
* @since 3.0
|
williamr@2
|
494 |
* @return Information about the linked feeds in the current page. The
|
williamr@2
|
495 |
* caller adopts the result.
|
williamr@2
|
496 |
*/
|
williamr@2
|
497 |
IMPORT_C virtual const RPointerArray<TBrCtlSubscribeTo>& SubscribeToMenuItemsL() = 0;
|
williamr@2
|
498 |
|
williamr@2
|
499 |
|
williamr@2
|
500 |
|
williamr@2
|
501 |
public: // Functions from base classes
|
williamr@2
|
502 |
|
williamr@2
|
503 |
// Functions from CCoeControl
|
williamr@2
|
504 |
|
williamr@2
|
505 |
/**
|
williamr@2
|
506 |
* From CCoeControl Return the minimum size the Browser Control can use
|
williamr@2
|
507 |
* @since 2.8
|
williamr@2
|
508 |
* @return The minimum size that the Browser Control can use.
|
williamr@2
|
509 |
* @attention This function is inherited from the Symbian CCoeControl class.
|
williamr@2
|
510 |
*/
|
williamr@2
|
511 |
IMPORT_C virtual TSize MinimumSize() = 0;
|
williamr@2
|
512 |
|
williamr@2
|
513 |
/**
|
williamr@2
|
514 |
* From CCoeControl Pass key events to the Browser Control
|
williamr@2
|
515 |
* @since 2.8
|
williamr@2
|
516 |
* @param aKeyEvent The key event
|
williamr@2
|
517 |
* @param aType The key code
|
williamr@2
|
518 |
* @return If the Browser Control consumed the key event or not
|
williamr@2
|
519 |
* @attention This function is inherited from the Symbian CCoeControl class.
|
williamr@2
|
520 |
*/
|
williamr@2
|
521 |
IMPORT_C virtual TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType) = 0;
|
williamr@2
|
522 |
|
williamr@2
|
523 |
/**
|
williamr@2
|
524 |
* From CCoeControl Sets that the Browser Control has keyboard focus.
|
williamr@2
|
525 |
* @since 2.8
|
williamr@2
|
526 |
* @param aFocus If the Browser Control gets or loses focus
|
williamr@2
|
527 |
* @param ENoDrawNow If the Browser Control should redraw itself as result of focus change
|
williamr@2
|
528 |
* @return void
|
williamr@2
|
529 |
* @attention This function is inherited from the Symbian CCoeControl class.
|
williamr@2
|
530 |
*/
|
williamr@2
|
531 |
IMPORT_C virtual void SetFocus(TBool aFocus, TDrawNow aDrawNow = ENoDrawNow) = 0;
|
williamr@2
|
532 |
|
williamr@2
|
533 |
/*
|
williamr@2
|
534 |
* This method calls to download manager in order to display query "Cancel
|
williamr@2
|
535 |
* outstanding downloads?" and cancel if it requested by user
|
williamr@2
|
536 |
* @param none
|
williamr@2
|
537 |
* @return ETrue if it is OK to exit; EFalse - if it is not OK to exit
|
williamr@2
|
538 |
*/
|
williamr@2
|
539 |
IMPORT_C virtual TBool OkToExit() = 0;
|
williamr@2
|
540 |
|
williamr@2
|
541 |
|
williamr@2
|
542 |
/**
|
williamr@2
|
543 |
* This method calls to download manager in order to send the commands (EDownloadCmdPause,DownloadCmdResume,
|
williamr@2
|
544 |
* EDownloadCmdCancel, EDownloadCmdMarkAsProgressive, EDownloadCmdMarkAsNotProgressive )
|
williamr@2
|
545 |
* @param aCommand The command that the Browser Control should process
|
williamr@2
|
546 |
* @param aTransId The transaction Id associated with this command
|
williamr@2
|
547 |
* @return void
|
williamr@2
|
548 |
*/
|
williamr@2
|
549 |
IMPORT_C virtual void HandleDownloadCommandL(TUint16 aTransId, TBrCtlDefs::TBrCtlDownloadCmd aCommand) = 0;
|
williamr@2
|
550 |
|
williamr@2
|
551 |
/**
|
williamr@2
|
552 |
* Request icon for the given url
|
williamr@2
|
553 |
* @since 3.1
|
williamr@2
|
554 |
* @param aUrl url to a favicon or a page
|
williamr@2
|
555 |
* @param aBitmapInfo info on whether to retun a favicon or a page icon
|
williamr@2
|
556 |
* @return favion icon or page icon
|
williamr@2
|
557 |
*/
|
williamr@2
|
558 |
IMPORT_C virtual CGulIcon* GetBitmapData(const TDesC& aUrl, TBrCtlDefs::TBrCtlBitmapInfo aBitmapInfo) = 0;
|
williamr@2
|
559 |
|
williamr@2
|
560 |
/**
|
williamr@2
|
561 |
* Register a client command interface for the browser engine
|
williamr@2
|
562 |
* @since 3.1
|
williamr@2
|
563 |
* @param The observer to register
|
williamr@2
|
564 |
* @return void
|
williamr@2
|
565 |
*/
|
williamr@2
|
566 |
IMPORT_C virtual void AddCommandObserverL(MBrCtlCommandObserver* aBrCtlCommandObserver) = 0;
|
williamr@2
|
567 |
|
williamr@2
|
568 |
/**
|
williamr@2
|
569 |
* Unregister a client command interface for the browser engine
|
williamr@2
|
570 |
* @since 3.1
|
williamr@2
|
571 |
* @param The observer to unregister
|
williamr@2
|
572 |
* @return void
|
williamr@2
|
573 |
*/
|
williamr@2
|
574 |
IMPORT_C virtual void RemoveCommandObserver(MBrCtlCommandObserver* aBrCtlCommandObserver) = 0;
|
williamr@2
|
575 |
|
williamr@2
|
576 |
/**
|
williamr@2
|
577 |
* Unregister a client command interface for the browser engine
|
williamr@2
|
578 |
* @since 3.1
|
williamr@2
|
579 |
* @param The observer to unregister
|
williamr@2
|
580 |
* @return void
|
williamr@2
|
581 |
*/
|
williamr@2
|
582 |
IMPORT_C virtual MWidgetExtension* CreateWidgetExtensionL(MWidgetCallback& aWidgetCallback) = 0;
|
williamr@2
|
583 |
|
williamr@2
|
584 |
/**
|
williamr@2
|
585 |
* Get information about the focused image. The function leaves if the focus is not on an image
|
williamr@2
|
586 |
* @since 3.2
|
williamr@2
|
587 |
* @param
|
williamr@2
|
588 |
* @return The requested information
|
williamr@2
|
589 |
*/
|
williamr@2
|
590 |
IMPORT_C virtual TBrCtlImageCarrier* FocusedImageLC() = 0;
|
williamr@2
|
591 |
|
williamr@2
|
592 |
/**
|
williamr@2
|
593 |
* Requests the Browser Control to POST to a URL
|
williamr@2
|
594 |
* @since 5.0
|
williamr@2
|
595 |
* @param aUrl URL to which the Browser Control sends the POST request
|
williamr@2
|
596 |
* @param aContentType Content type of the data to be posted
|
williamr@2
|
597 |
* @param aPostData Data to be posted
|
williamr@2
|
598 |
* @param aBoundary Boundary for form-data or multi-part content.
|
williamr@2
|
599 |
* @param aReserved For future use only
|
williamr@2
|
600 |
* @return void
|
williamr@2
|
601 |
*/
|
williamr@2
|
602 |
IMPORT_C virtual void PostUrlL (const TDesC& aUrl,
|
williamr@2
|
603 |
const TDesC8& aContentType,
|
williamr@2
|
604 |
const TDesC8& aPostData,
|
williamr@2
|
605 |
const TDesC8* aBoundary,
|
williamr@2
|
606 |
TAny* aReserved) = 0;
|
williamr@2
|
607 |
/**
|
williamr@2
|
608 |
* Requests the Browser Control for offscreen bitmap
|
williamr@2
|
609 |
* @since 5.0
|
williamr@2
|
610 |
* @ fills offscreen bitmap.The bitmap memory has to be set and freed by the api calling that function.
|
williamr@2
|
611 |
* @return void.
|
williamr@2
|
612 |
*/
|
williamr@2
|
613 |
IMPORT_C virtual void TakeSnapshotL(CFbsBitmap& snapshot) = 0;
|
williamr@2
|
614 |
};
|
williamr@2
|
615 |
|
williamr@2
|
616 |
|
williamr@2
|
617 |
/**
|
williamr@2
|
618 |
* The MBrCtlDataLoadSupplier class is a callback interface that
|
williamr@2
|
619 |
* provides the Browser Control with the ability to display content incrementally.
|
williamr@2
|
620 |
* It does this by providing a means for the Browser Control to cancel the load operation
|
williamr@2
|
621 |
* if an error occurs.
|
williamr@2
|
622 |
* For example, if the Browser Control runs out of memory during the
|
williamr@2
|
623 |
* load operation, it can cancel that operation by means of this interface.
|
williamr@2
|
624 |
*
|
williamr@2
|
625 |
* Usage:
|
williamr@2
|
626 |
*
|
williamr@2
|
627 |
* @code
|
williamr@2
|
628 |
* #include <BrCtlInterface.h>
|
williamr@2
|
629 |
* @see S60 Platform: Browser Control API Developer's Guide Version 2.0
|
williamr@2
|
630 |
* @lib BrowserEngine.lib
|
williamr@2
|
631 |
* @since 2.8
|
williamr@2
|
632 |
* @file BrCtlInterface.h
|
williamr@2
|
633 |
* @endcode *
|
williamr@2
|
634 |
*/
|
williamr@2
|
635 |
class MBrCtlDataLoadSupplier
|
williamr@2
|
636 |
{
|
williamr@2
|
637 |
public: // New functions
|
williamr@2
|
638 |
/**
|
williamr@2
|
639 |
* Cancel the load operation
|
williamr@2
|
640 |
* @since 2.8
|
williamr@2
|
641 |
* @return void
|
williamr@2
|
642 |
*/
|
williamr@2
|
643 |
virtual void CancelLoad() = 0;
|
williamr@2
|
644 |
};
|
williamr@2
|
645 |
|
williamr@2
|
646 |
|
williamr@2
|
647 |
|
williamr@2
|
648 |
/**
|
williamr@2
|
649 |
* The MBrCtlDataLoadConsumer class is a callback interface that provides
|
williamr@2
|
650 |
* the Browser Control with the ability to receive content incrementally.
|
williamr@2
|
651 |
*
|
williamr@2
|
652 |
* @code
|
williamr@2
|
653 |
* #include <BrCtlInterface.h>
|
williamr@2
|
654 |
* @see S60 Platform: Browser Control API Developer's Guide Version 2.0
|
williamr@2
|
655 |
* @lib BrowserEngine.lib
|
williamr@2
|
656 |
* @since 2.8
|
williamr@2
|
657 |
* @file BrCtlInterface.h
|
williamr@2
|
658 |
* @endcode *
|
williamr@2
|
659 |
*/
|
williamr@2
|
660 |
class MBrCtlDataLoadConsumer
|
williamr@2
|
661 |
{
|
williamr@2
|
662 |
public: // New functions
|
williamr@2
|
663 |
/**
|
williamr@2
|
664 |
* Pass the next data chunk
|
williamr@2
|
665 |
* @since 2.8
|
williamr@2
|
666 |
* @param aData The data chunk to process
|
williamr@2
|
667 |
* @return void
|
williamr@2
|
668 |
*/
|
williamr@2
|
669 |
virtual void HandleNextDataChunk(const TDesC8& aData) = 0;
|
williamr@2
|
670 |
|
williamr@2
|
671 |
/**
|
williamr@2
|
672 |
* Inform the Browser Control about completion of data load
|
williamr@2
|
673 |
* @since 2.8
|
williamr@2
|
674 |
* @return void
|
williamr@2
|
675 |
*/
|
williamr@2
|
676 |
virtual void HandleLoadComplete() = 0;
|
williamr@2
|
677 |
|
williamr@2
|
678 |
/**
|
williamr@2
|
679 |
* Inform the Browser Control that an error occured
|
williamr@2
|
680 |
* if HandleError() is called, then LoadComplete() is infered.
|
williamr@2
|
681 |
* @since 2.8
|
williamr@2
|
682 |
* @param aError The error code
|
williamr@2
|
683 |
* @return void
|
williamr@2
|
684 |
*/
|
williamr@2
|
685 |
virtual void HandleError(TInt aError) = 0;
|
williamr@2
|
686 |
};
|
williamr@2
|
687 |
|
williamr@2
|
688 |
/**
|
williamr@2
|
689 |
* The MBrCtlLoadEventObserver interface receives load progress events.
|
williamr@2
|
690 |
* The host application can implement this interface.
|
williamr@2
|
691 |
*
|
williamr@2
|
692 |
* @code
|
williamr@2
|
693 |
* #include <BrCtlInterface.h>
|
williamr@2
|
694 |
* @see S60 Platform: Browser Control API Developer's Guide Version 2.0
|
williamr@2
|
695 |
* @lib BrowserEngine.lib
|
williamr@2
|
696 |
* @since 2.8
|
williamr@2
|
697 |
* @file BrCtlInterface.h
|
williamr@2
|
698 |
* @endcode *
|
williamr@2
|
699 |
*/
|
williamr@2
|
700 |
class MBrCtlLoadEventObserver
|
williamr@2
|
701 |
{
|
williamr@2
|
702 |
public: // New functions
|
williamr@2
|
703 |
/**
|
williamr@2
|
704 |
* A load events notification
|
williamr@2
|
705 |
* @since 2.8
|
williamr@2
|
706 |
* @param aLoadEvent The load event
|
williamr@2
|
707 |
* @param aSize Size depends on the event
|
williamr@2
|
708 |
* @param aTransactionId The transaction id of the transaction that had this event
|
williamr@2
|
709 |
* @return void
|
williamr@2
|
710 |
*/
|
williamr@2
|
711 |
virtual void HandleBrowserLoadEventL(TBrCtlDefs::TBrCtlLoadEvent aLoadEvent, TUint aSize, TUint16 aTransactionId) = 0;
|
williamr@2
|
712 |
};
|
williamr@2
|
713 |
|
williamr@2
|
714 |
/**
|
williamr@2
|
715 |
* The TBrCtlWmlServiceOption class wraps information about the WML DO elements.
|
williamr@2
|
716 |
* For more information about the DO tag, see http://www.w3schools.com/wap/tag_do.asp.
|
williamr@2
|
717 |
* @code
|
williamr@2
|
718 |
* #include <BrCtlInterface.h>
|
williamr@2
|
719 |
* @lib BrowserEngine.lib
|
williamr@2
|
720 |
* @since 2.8
|
williamr@2
|
721 |
* @file BrCtlInterface.h
|
williamr@2
|
722 |
* @endcode *
|
williamr@2
|
723 |
*/
|
williamr@2
|
724 |
class TBrCtlWmlServiceOption
|
williamr@2
|
725 |
{
|
williamr@2
|
726 |
public:
|
williamr@2
|
727 |
/**
|
williamr@2
|
728 |
* Constructor
|
williamr@2
|
729 |
* @since 2.8
|
williamr@2
|
730 |
* @param aText The text to display in the WML service options
|
williamr@2
|
731 |
* @param aElemID The element Id to use when the user selects this command
|
williamr@2
|
732 |
* @param aActualElemID Internal to the Browser Control. The host
|
williamr@2
|
733 |
* application should not modify this parameter.
|
williamr@2
|
734 |
*/
|
williamr@2
|
735 |
TBrCtlWmlServiceOption(HBufC* aText, TUint aElemID, TUint aActualElemID);
|
williamr@2
|
736 |
/**
|
williamr@2
|
737 |
* Displays the text for the WML service options
|
williamr@2
|
738 |
* @since 2.8
|
williamr@2
|
739 |
* @return Text to display for the WML service options
|
williamr@2
|
740 |
*/
|
williamr@2
|
741 |
inline const TDesC& Text() {return *iText;}
|
williamr@2
|
742 |
/**
|
williamr@2
|
743 |
* Gets the command ID to use when the user selects this command
|
williamr@2
|
744 |
* @since 2.8
|
williamr@2
|
745 |
* @return Element ID employed when the user selects this command
|
williamr@2
|
746 |
*/
|
williamr@2
|
747 |
inline TUint ElemID(){return iElemID;}
|
williamr@2
|
748 |
/**
|
williamr@2
|
749 |
* Gets the actual element ID defined in the WML page.
|
williamr@2
|
750 |
* @since 2.8
|
williamr@2
|
751 |
* @return Actual element ID
|
williamr@2
|
752 |
* @attention This parameter is internal to the Browser Control.
|
williamr@2
|
753 |
* The host application should not modify this parameter.
|
williamr@2
|
754 |
*/
|
williamr@2
|
755 |
inline TUint ActualElemID(){return iActualElemID;}
|
williamr@2
|
756 |
|
williamr@2
|
757 |
/**
|
williamr@2
|
758 |
* Destructor.
|
williamr@2
|
759 |
*/
|
williamr@2
|
760 |
~TBrCtlWmlServiceOption();
|
williamr@2
|
761 |
|
williamr@2
|
762 |
private: // Data
|
williamr@2
|
763 |
/**
|
williamr@2
|
764 |
* Default constructor
|
williamr@2
|
765 |
* @since 2.8
|
williamr@2
|
766 |
*/
|
williamr@2
|
767 |
TBrCtlWmlServiceOption() {};
|
williamr@2
|
768 |
|
williamr@2
|
769 |
// The text to display in the WML service options
|
williamr@2
|
770 |
HBufC* iText;
|
williamr@2
|
771 |
// The element Id to use when the user selects this command
|
williamr@2
|
772 |
TUint iElemID;
|
williamr@2
|
773 |
// The actual element Id
|
williamr@2
|
774 |
TUint iActualElemID;
|
williamr@2
|
775 |
};
|
williamr@2
|
776 |
|
williamr@2
|
777 |
/**
|
williamr@2
|
778 |
* The TBrCtlSubscribeTo class provides information of Subscribe to items.
|
williamr@2
|
779 |
* @code
|
williamr@2
|
780 |
* #include <BrCtlInterface.h>
|
williamr@2
|
781 |
* @lib BrowserEngine.lib
|
williamr@2
|
782 |
* @since 2.8
|
williamr@2
|
783 |
* @file BrCtlInterface.h
|
williamr@2
|
784 |
* @endcode *
|
williamr@2
|
785 |
*/
|
williamr@2
|
786 |
class TBrCtlSubscribeTo
|
williamr@2
|
787 |
{
|
williamr@2
|
788 |
public:
|
williamr@2
|
789 |
/**
|
williamr@2
|
790 |
* Constructor
|
williamr@2
|
791 |
* @since 3.0
|
williamr@2
|
792 |
* @param aText The text to display in the subscribe to option. aText
|
williamr@2
|
793 |
* is adopted.
|
williamr@2
|
794 |
* @param aCommandID The menu command Id to use when the user selects it.
|
williamr@2
|
795 |
*/
|
williamr@2
|
796 |
TBrCtlSubscribeTo(const TPtrC& aTitle, const TPtrC& aUrl, TUint aCommandID);
|
williamr@2
|
797 |
|
williamr@2
|
798 |
/**
|
williamr@2
|
799 |
* Returns the title.
|
williamr@2
|
800 |
* @since 3.0
|
williamr@2
|
801 |
* @return The title.
|
williamr@2
|
802 |
*/
|
williamr@2
|
803 |
inline const TPtrC& Title() {return iTitle;}
|
williamr@2
|
804 |
|
williamr@2
|
805 |
/**
|
williamr@2
|
806 |
* Returns the url.
|
williamr@2
|
807 |
* @since 3.0
|
williamr@2
|
808 |
* @return The url.
|
williamr@2
|
809 |
*/
|
williamr@2
|
810 |
inline const TPtrC& Url() {return iUrl;}
|
williamr@2
|
811 |
|
williamr@2
|
812 |
/**
|
williamr@2
|
813 |
* Returns the command.
|
williamr@2
|
814 |
* @since 3.0
|
williamr@2
|
815 |
* @return The command.
|
williamr@2
|
816 |
*/
|
williamr@2
|
817 |
inline TUint CommandID() {return iCommandID;}
|
williamr@2
|
818 |
|
williamr@2
|
819 |
private:
|
williamr@2
|
820 |
/**
|
williamr@2
|
821 |
* Default constructor
|
williamr@2
|
822 |
* @since 3.0
|
williamr@2
|
823 |
*/
|
williamr@2
|
824 |
TBrCtlSubscribeTo();
|
williamr@2
|
825 |
|
williamr@2
|
826 |
private: // Data
|
williamr@2
|
827 |
const TPtrC iTitle;
|
williamr@2
|
828 |
const TPtrC iUrl;
|
williamr@2
|
829 |
|
williamr@2
|
830 |
TUint iCommandID;
|
williamr@2
|
831 |
};
|
williamr@2
|
832 |
|
williamr@2
|
833 |
/**
|
williamr@2
|
834 |
* The MBrCtlStateChangeObserver class receives state-changed events.
|
williamr@2
|
835 |
* At the present time, there is only one state-changed event.
|
williamr@2
|
836 |
* This event is generated when the browser switches to and from
|
williamr@2
|
837 |
* the Image Map view. In Image Map view, only an image map is displayed,
|
williamr@2
|
838 |
* which enables the user to navigate. The host application can
|
williamr@2
|
839 |
* implement this interface in order to find out when the view
|
williamr@2
|
840 |
* changes to and from the Image Map view.
|
williamr@2
|
841 |
* @code
|
williamr@2
|
842 |
* #include <BrCtlInterface.h>
|
williamr@2
|
843 |
* @lib BrowserEngine.lib
|
williamr@2
|
844 |
* @since 2.8
|
williamr@2
|
845 |
* @file BrCtlInterface.h
|
williamr@2
|
846 |
* @endcode *
|
williamr@2
|
847 |
*/
|
williamr@2
|
848 |
class MBrCtlStateChangeObserver
|
williamr@2
|
849 |
{
|
williamr@2
|
850 |
public:
|
williamr@2
|
851 |
/**
|
williamr@2
|
852 |
* Notifies the Browser Control of a state-changed event.
|
williamr@2
|
853 |
* @param aState Indicates whether or not the browser is in Image Map view.
|
williamr@2
|
854 |
* Value:EStateImageMapView
|
williamr@2
|
855 |
* @param aValue Indicates the state being changed.
|
williamr@2
|
856 |
* Values:
|
williamr@2
|
857 |
* ETrue indicates entering Image Map view
|
williamr@2
|
858 |
* EFalse indicates exiting Image Map view
|
williamr@2
|
859 |
* @since 2.8
|
williamr@2
|
860 |
* @return void
|
williamr@2
|
861 |
*/
|
williamr@2
|
862 |
virtual void StateChanged(TBrCtlDefs::TBrCtlState aState, TInt aValue) = 0;
|
williamr@2
|
863 |
};
|
williamr@2
|
864 |
|
williamr@2
|
865 |
// CLASS DECLARATION
|
williamr@2
|
866 |
/**
|
williamr@2
|
867 |
* This class provides a mechanism for the browser engine to pass commands to the client
|
williamr@2
|
868 |
*
|
williamr@2
|
869 |
* @lib BrowserEngine.lib
|
williamr@2
|
870 |
* @since 3.1
|
williamr@2
|
871 |
*/
|
williamr@2
|
872 |
class MBrCtlCommandObserver
|
williamr@2
|
873 |
{
|
williamr@2
|
874 |
public: // New functions
|
williamr@2
|
875 |
/**
|
williamr@2
|
876 |
* Method to call client to execute commands
|
williamr@2
|
877 |
* @since 3.1
|
williamr@2
|
878 |
* @param A callback command
|
williamr@2
|
879 |
* @param Array of attribute names
|
williamr@2
|
880 |
* @param Array of attribute values
|
williamr@2
|
881 |
* @return void
|
williamr@2
|
882 |
*/
|
williamr@2
|
883 |
virtual void HandleCommandL(TBrCtlDefs::TBrCtlClientCommands aCommand, const CArrayFix<TPtrC>& aAttributesNames,
|
williamr@2
|
884 |
const CArrayFix<TPtrC>& aAttributeValues) = 0;
|
williamr@2
|
885 |
};
|
williamr@2
|
886 |
|
williamr@2
|
887 |
// CLASS DECLARATION
|
williamr@2
|
888 |
/**
|
williamr@2
|
889 |
* This class provides a mechanism for the browser engine to interact with the widget host application
|
williamr@2
|
890 |
*
|
williamr@2
|
891 |
* @lib BrowserEngine.lib
|
williamr@2
|
892 |
* @since 3.2
|
williamr@2
|
893 |
*/
|
williamr@2
|
894 |
class MWidgetCallback
|
williamr@2
|
895 |
{
|
williamr@2
|
896 |
public:
|
williamr@2
|
897 |
/**
|
williamr@2
|
898 |
* Navigates through your file system and selects a file of specific mime type;
|
williamr@2
|
899 |
* analogous to the Browse command in Windows.
|
williamr@2
|
900 |
* @since 3.2
|
williamr@2
|
901 |
* @param aSelectedFileName The selected file name.
|
williamr@2
|
902 |
* @param aMimeType The accepted mime type.
|
williamr@2
|
903 |
* @return ETrue if the user selected a file
|
williamr@2
|
904 |
* EFalse if the user cancelled the transaction and did not select a file.
|
williamr@2
|
905 |
* @attiontion Returned on cleanup stack. Browser control will free the buffer.
|
williamr@2
|
906 |
*/
|
williamr@2
|
907 |
virtual TBool DialogMimeFileSelectLC(HBufC*& aSelectedFileName,
|
williamr@2
|
908 |
const TDesC& aMimeType) = 0;
|
williamr@2
|
909 |
|
williamr@2
|
910 |
/**
|
williamr@2
|
911 |
* Called to show or hide softkeys
|
williamr@2
|
912 |
* @since 3.1
|
williamr@2
|
913 |
* @param aVisible ETrue to show softkeys, EFalse when full screen is needed
|
williamr@2
|
914 |
*/
|
williamr@2
|
915 |
virtual void SetSoftkeysVisible(TBool aVisible) = 0;
|
williamr@2
|
916 |
|
williamr@2
|
917 |
/**
|
williamr@2
|
918 |
* Called to change the display orientation to landscape
|
williamr@2
|
919 |
* @since 3.1
|
williamr@2
|
920 |
*/
|
williamr@2
|
921 |
virtual void SetDisplayMode(TBrCtlDefs::TBrCtlOrientation aOrientation) = 0;
|
williamr@2
|
922 |
|
williamr@2
|
923 |
//Reserved for future use
|
williamr@2
|
924 |
virtual TInt Reserved_1(TAny*& a0, TAny* a1, TAny* a2) = 0;
|
williamr@2
|
925 |
virtual TInt Reserved_2(TAny*& a0, TAny* a1, TAny* a2) = 0;
|
williamr@2
|
926 |
virtual TInt Reserved_3(TAny*& a0, TAny* a1, TAny* a2) = 0;
|
williamr@2
|
927 |
virtual TInt Reserved_4(TAny*& a0, TAny* a1, TAny* a2) = 0;
|
williamr@2
|
928 |
virtual TInt Reserved_5(TAny*& a0, TAny* a1, TAny* a2) = 0;
|
williamr@2
|
929 |
virtual TInt Reserved_6(TAny*& a0, TAny* a1, TAny* a2) = 0;
|
williamr@2
|
930 |
virtual TInt Reserved_7(TAny*& a0, TAny* a1, TAny* a2) = 0;
|
williamr@2
|
931 |
virtual TInt Reserved_8(TAny*& a0, TAny* a1, TAny* a2) = 0;
|
williamr@2
|
932 |
virtual TInt Reserved_9(TAny*& a0, TAny* a1, TAny* a2) = 0;
|
williamr@2
|
933 |
virtual TInt Reserved_10(TAny*& a0, TAny* a1, TAny* a2) = 0;
|
williamr@2
|
934 |
};
|
williamr@2
|
935 |
|
williamr@2
|
936 |
// CLASS DECLARATION
|
williamr@2
|
937 |
/**
|
williamr@2
|
938 |
* This class provides an extension mechanism for the widget host app to interact with the browser engine
|
williamr@2
|
939 |
* This class includes the Widget specific extension needed in the browser engine
|
williamr@2
|
940 |
* @lib BrowserEngine.lib
|
williamr@2
|
941 |
* @since 3.2
|
williamr@2
|
942 |
*/
|
williamr@2
|
943 |
class MWidgetExtension
|
williamr@2
|
944 |
{
|
williamr@2
|
945 |
public: // New functions
|
williamr@2
|
946 |
/**
|
williamr@2
|
947 |
* Method to set parameters in the browser engine
|
williamr@2
|
948 |
* @since 3.2
|
williamr@2
|
949 |
* @param The widget identifier
|
williamr@2
|
950 |
* @param The value for the paramater
|
williamr@2
|
951 |
* @return void
|
williamr@2
|
952 |
*/
|
williamr@2
|
953 |
virtual void SetParamL(TBrCtlDefs::TBrCtlWidgetParams aParam, const TDesC& aValue) = 0;
|
williamr@2
|
954 |
|
williamr@2
|
955 |
/**
|
williamr@2
|
956 |
* Method to set parameters in the browser engine
|
williamr@2
|
957 |
* @since 3.2
|
williamr@2
|
958 |
* @param The widget parameter aParam
|
williamr@2
|
959 |
* @param The value for the paramater
|
williamr@2
|
960 |
* @return void
|
williamr@2
|
961 |
*/
|
williamr@2
|
962 |
virtual void SetParamL(TBrCtlDefs::TBrCtlWidgetParams aParam, TUint aValue) = 0;
|
williamr@2
|
963 |
|
williamr@2
|
964 |
/**
|
williamr@2
|
965 |
* Method to invoke callback function for right soft key
|
williamr@2
|
966 |
* @since 3.2
|
williamr@2
|
967 |
* @param none
|
williamr@2
|
968 |
* @return ETrue if there is a rightsoftkey callback, else EFalse
|
williamr@2
|
969 |
*/
|
williamr@2
|
970 |
virtual TBool HandleCommandL( TInt aCommandId ) = 0;
|
williamr@2
|
971 |
|
williamr@2
|
972 |
};
|
williamr@2
|
973 |
#endif // BRCTLINTERFACE_H
|
williamr@2
|
974 |
|
williamr@2
|
975 |
// End of File
|