The Browser Control API consists of the classes and functions described in this chapter. Figure 1 shows the class diagram of the new classes created for the Browser Control feature.
The following table contains descriptions of the structural classes shown in Figure 1.
Class name / Header file | Class description |
---|---|
CCoeControl CoeControl.h |
Symbian parent class. Control base class from which all other control classes are derived. |
CBrCtlInterface BrCtlInterface.h |
Base class for Browser Control. All Browser Control clients must use this class. |
CBrCtl BrCtl.h |
Implementation class for Browser Control. |
MBrCtlDialogsProvider BrCtlDialogsProvider.h |
Interface that provides dialogs used by the Browser Control. If this interface is not specified, then the Browser Control uses the default browser's dialogs. |
MBrCtlDownloadObserver BrCtlDownloadObserver.h |
Interface that handles download events from the Download Manager. |
MBrCtlSpecialLoadObserver BrCtlSpecialLoadObserver.h |
Interface that handles special load needs, such as:
|
MBrCtlSoftkeysObserver BrCtlSoftkeysObserver.h |
Interface that handles requests to change the softkeys. |
MBrCtlLinkResolver BrCtlLinkResolver.h |
Interface that provides a callback mechanism for receiving the content of:
|
MBrCtlLinkContent BrCtlLinkResolver.h |
Interface that returns the response from the MBrCtlLinkResolver interface. |
MBrCtlLayoutObserver BrCtlLayoutObserver.h |
Interface that receives scrolling events. Use this interface when the host application draws the scrollbars by itself. |
MBrCtlLoadEventObserver BrCtlInterface.h |
Interface that receives load progress events. It can be implemented by the host application. |
MBrCtlDataLoadSupplier BrCtlInterface.h |
Interface that provides the browser control with incremental content to display. |
MBrCtlDataLoadConsumer BrCtlInterface.h |
Interface that is provided by the browser control for receiving content incrementally. |
MBrCtlStateChangeObserver BrCtlInterface.h |
Interface that receives state-changed events. At the present time, the only state-changed event is generated when the browser switches to and from the Image Map view. In Image Map view, only an image map is displayed, which enables the user to navigate. The host application can implement this interface in order to find out when the view changes to and from the Image Map view. |
MBrCtlWindowObserver BrCtlWindowObserver.h |
Reserved for future use. |
The following table contains the description of the auxiliary class that contains the enumerations for the Browser Control.
Class / Header file | Description |
---|---|
TBrCtlDefs TBrCtlDefs.h |
Helper class that provides a namespace for the enumerations used by the Browser Control. |
The tables in this section define the functions for the classes described in the following table.
The CCoeControl class is a standard Symbian class. This is the parent class for all Browser Control API classes. For more information about CCoeControl, see the Symbian Developer Library at the following URL: http://www.symbian.com/developer/techlib/v70sdocs/doc_source/reference/cpp/UIControlFramework/CCoeControlClass.html
The CBrCtlInterface class is the base class of the Browser Control API. All clients of browser control must use this class.
Syntax:
class CBrCtlInterface : public CCoeControl |
This section describes the functions contained in the CBrCtlInterface class.
Syntax |
IMPORT_C CBrCtlInterface* CreateBrowserControlL(CCoeControl* aParent, TRect aRect, TUint aBrCtlCapabilities, TUint aCommandIdBase = TBrCtlDefs::ECommandIdBase, MBrCtlSoftkeysObserver* aBrCtlSoftkeyObserver = NULL, MBrCtlLinkResolver* aBrCtlLinkResolver = NULL, MBrCtlSpecialLoadObserver* aBrCtlSpecialLoadObserver = NULL, MBrCtlLayoutObserver* aBrCtlLayoutObserver = NULL, MBrCtlDialogsProvider* aBrCtlDialogsProvider = NULL) |
Parameters |
aParent Parent window of the browser control aRect Bounding rectangle for the browser control aBrCtlCapabilities Desired capabilities of the browser control. For example, displaying scroll bars, allowing network access for HTTP requests. For a complete list of capability options, see TBrCtlCapabilities. aCommandIdBase Base values for Command IDs for Browser Control. These are added to ensure that each Command ID is unique; Browser Control command IDs must be different from the host application command IDs. For more information, see TBrCtlCommandId. |
Parameters |
aBrCtlSoftkeysObserver Softkeys observer. Default: the host application does not update the softkeys. For more information, see MBrCtlSoftkeysObserver class. |
aBrCtlLinkResolver Link Resolver. Must be provided if ECapabilityClient ResolveEmbeddedURL or ECapabilityClient NotifyURL is set. For more information, see MBrCtlLinkResolver class. aBrCtlSpecialLoadObserver Special Load Observer. For more information, see MBrCtlSpecialLoadObserver class. |
|
aBrCtlLayoutObserver Layout Observer. Default:
|
|
Returns |
None |
Description |
Creates the browser control. |
Syntax |
inline virtual ~CBrCtlInterface() { } |
Parameters |
None |
Returns |
None |
Description |
Destructor for the CBrCtlInterface class. |
Syntax |
IMPORT_C virtual void HandleCommandL(TInt aCommand) |
Parameters |
aCommand Command to be processed by the Browser Control. For a complete list of commands, see TBrCtlCommands. |
Returns |
None |
Description |
Passes a command to the Browser Control. |
Syntax |
IMPORT_C virtual void HandleDownloadCommandL(TUint16 aTransId, TBrCtlDefs::TBrCtlDownloadCmd aCommand) = 0; |
Parameters |
aTransId HTTP transaction ID associated with this command. aCommand Download command to be processed by the Browser Control. For a complete list of download commands, see TBrCtlDownloadCmd enumeration table. |
Returns |
None |
Description |
Passes a download command from the host application to the Browser Control, which passes it on to the Download Manager. |
Syntax |
IMPORT_C virtual TSize ContentSize() |
Parameters |
None |
Returns |
Display size required to see all of the content |
Description |
Returns the display size required to see all of the content. |
Syntax |
IMPORT_C virtual void SetBrowserSettingL(TUint aSetting, TUint aValue) |
Parameters |
aSetting Setting to update. For a list of settings, see TBrCtlSettings. aValue New value of the setting |
Returns |
None |
Description |
Updates a Browser Control setting. Leaves with KErrArgument if the value of aSetting is out of range. |
Syntax |
IMPORT_C virtual TUint BrowserSettingL(TUint aSetting) |
Parameters |
aSetting Setting to retrieve |
Returns |
Value of the setting |
Description |
Gets a setting from the Browser Control. Leaves with KErrArgument if the value of aSetting is out of range. |
Syntax |
IMPORT_C virtual void LoadDataL (const TDesC& aUrl, const TDesC8& aData, const TDataType& aDataType, TUid aCharsetUid) |
Parameters |
aUrl URL for the data. If a URL scheme is used, it must be "data:". aData Content to display. The Browser Control does not take ownership of the displayed content. aDataType Data type of the data to be loaded. aCharSetUid UID of the character converter for the content's character set. Default: 0 Latin-1 is the default character set. |
Returns |
None |
Description |
Requests the Browser Control to display the content of a buffer. |
Note |
If you use this function, the Browser Control does not keep track of the history. If the data is not markup, Browser Control uses the Special Load Observer to pass the content back to the Host Application. The Special Load Observer uses the Document Handler to send the content to the proper application. |
Syntax |
IMPORT_C virtual void InitLoadDataL (const TDesC& aUrl, const TDataType& aDataType, TUid aCharsetUid, TUint aContentLength, MBrCtlDataLoadSupplier* aBrCtlDataLoadSupplier, MBrCtlDataLoadConsumer** aBrCtlDataLoadConsumer) |
Parameters |
aUrl URL for the data. If a URL scheme is used, it must be "data:". The URL is needed as a reference to this load request. aDataType Data type of the data to be loaded. aCharSetUid UID of the character converter for the content's character set. Default: 0 Latin-1 is the default character set. For a list of UIDs, see charconv.h. aContentLength Length of the content. aBrCtlDataLoadSupplier Callback interface to stop passing data if an error occurs in the Browser Control. aBrCtlDataLoadConsumer Callback interface returned by the browser. Data should be passed to this interface. |
Returns |
None. |
Description |
Requests the Browser Control to display content incrementally. |
Note |
If you use this function, the Browser Control does not keep track of the history. If the content type of the data is not markup, Browser Control uses the Special Load Observer to pass the content back to the Host Application. The Special Load Observer uses the Document Handler to send the content to the proper application. |
Syntax |
IMPORT_C virtual void LoadUrlL (const TDesC& aUrl, TInt aApId = -1, TBrCtlDefs::TBrCtlCacheMode aBrCtlCacheMode = TBrCtlDefs::ECacheModeNormal) |
Parameters |
aUrl URL to be loaded aApId Access point ID NOTE: This parameter is for future use. aBrCtlCacheMode Cache mode Values: One of the following:
|
Returns |
None |
Description |
Requests the Browser Control to load a URL. |
Syntax |
IMPORT_C virtual void LoadFileL (const TDesC& aFileName) |
Parameters |
aFileName Name of the file to display |
Returns |
None |
Description |
Requests the Browser Control to load and display a file from the file system. |
Syntax |
IMPORT_C virtual void LoadFileL (RFile& aFileHandle) |
Parameters |
aFileHandle Handle of the file to display |
Returns |
None |
Description |
Requests the Browser Control to load and display a file from the file system. |
Syntax |
IMPORT_C virtual void PostUrlL (const TDesC& aUrl, const TDesC8& aContentType, const TDesC8& aPostData, const TDesC8* aBoundary, TAny* aReserved) |
Parameters |
aUrl URL to which the Browser Control sends the POST request aContentType Content type of the data to be posted aPostData Data to be posted aBoundary Boundary for form-data or multi-part content. aReserved For future use only |
Returns |
None |
Description |
Requests the Browser Control to POST to a URL |
Syntax |
IMPORT_C virtual RPointerArray<TBrCtlWmlServiceOption>* WMLOptionMenuItemsL() |
Parameters |
None |
Returns |
WML options for the current page |
Description |
Requests the Browser Control to return the WML options associated with the current page. |
Syntax |
IMPORT_C virtual void AddOptionMenuItemsL (CEikMenuPane& aMenuPane, TInt aResourceId, TInt aAfter=-1) |
Parameters |
aMenuPane Handle of the menu that contains the options aResourceId Resource ID of the menu aAfter Index after which the WML options should be added |
Returns |
None |
Description |
Requests the Browser Control to add its own options to the top of the option menu. |
Syntax |
IMPORT_C virtual TUint ClearCache() |
Parameters |
None |
Returns |
Number of bytes that were freed from the cache. |
Description |
Requests the Browser Control to clear the cache. |
Syntax |
IMPORT_C virtual TBool IsUrlInCache (TDesC& aUrl) |
Parameters |
aUrl URL being queried |
Returns |
ETrue if the URL is in the cache EFalseif the URL is not in the cache |
Description |
Queries the Browser Control as to whether a URL is in the cache. |
Syntax |
IMPORT_C virtual TInt ClearItemInCache (TDesC& aUrl) |
Parameters |
aUrl URL being queried |
Returns |
KErrNone if the URL is cleared from the cache Error message is the URL has not been cleared |
Description |
Requests the Browser Control to clear a URL from the cache. |
Syntax |
IMPORT_C virtual HBufC* PageInfoLC (TBrCtlDefs::TBrCtlPageInfo aBrCtlPageInfo) |
Parameters |
aBrCtlPageInfo Type of information requested |
Returns |
Page title, URL, or content. |
Description |
Requests that the Browser Control returns information about the page, such as the page title, URL, or content. For more information, see 3.2.2.8. |
Note |
The information is returned on the Cleanup stack. |
Syntax |
IMPORT_C virtual TBool NavigationAvailable(TBrCtlDefs::TBrCtlNavigationDirection aDirection) |
Parameters |
aDirection ENavigationBack if you wish to query whether there is a previous element in the history stack ENavigationForward if you wish to query whether there is a subsequent element in the history stack |
Returns |
ETrue if forward or backward navigation is available. EFalse if forward or backward navigation is not available. |
Description |
Queries the Browser Control as to whether forward or backward navigation is available. |
Syntax |
IMPORT_C virtual const TCertInfo* CertInfo() |
Parameters |
None |
Returns |
Certificate information about the server for the current page |
Description |
Requests the Browser Control to pass server certificate information for the current page to the reader. |
Syntax |
IMPORT_C virtual void AddLoadEventObserverL (MBrCtlLoadEventObserver* aBrCtlLoadEventObserver) |
Parameters |
aBrCtlLoadEventObserver Load events observer to be added |
Returns |
None |
Description |
Requests the Browser Control to register for load events. |
Notes |
Call this function immediately after creating the Browser Control. For multiple registrations, the host application may call this function more than once. Observers must unregister before deleting the Browser Control. |
Syntax |
IMPORT_C virtual void RemoveLoadEventObserver (MBrCtlLoadEventObserver* aBrCtlLoadEventObserver) |
Parameters |
aBrCtlLoadEventObserver Load events observer to be removed |
Returns |
None |
Description |
Requests the Browser Control to unregister for load events. |
Note |
Call this function for each Load Observer that was previously registered. |
Syntax |
IMPORT_C virtual TInt ImageCountL() |
Parameters |
None |
Returns |
Number of images in the current page |
Description |
Returns the number of images in the current page. |
Syntax |
IMPORT_C virtual TBrCtlDefs::TBrCtlElementType FocusedElementType() |
Parameters |
None |
Returns |
Type of the focused element |
Description |
Returns the type of the focused element. A focused element is an HTML tag element that is highlighted or activated and listening for user events. Some examples of HTML tag elements are hyperlinks, input boxes, and check boxes. |
Note |
The host application may need to perform special processing, such as updating the softkeys, when a specific element has the focus. |
Syntax |
IMPORT_C virtual void AddStateChangeObserverL (MBrCtlStateChangeObserver* aBrCtlStateChangeObserver) |
Parameters |
aBrCtlStateChangeObserver The observer to register |
Returns |
None |
Description |
Registers an observer for state changes. At the present time, there is only one state change, which is Image Map view on or off. |
Note |
The Observer must unregister before deleting the Browser Control. |
Syntax |
IMPORT_C virtual void RemoveStateChangeObserver (MBrCtlStateChangeObserver* aBrCtlStateChangeObserver) |
Parameters |
aBrCtlStateChangeObserver The observer to unregister |
Returns |
None |
Description |
Unregisters an observer for state changes. At the present time, there is only one state change, which is Image Map view on or off. |
Syntax |
IMPORT_C virtual HBufC* VersionInfoLC(TBrCtlDefs::TBrCtlVersionInfo aVersionInfo) |
Parameters |
aVersionInfo Type of the requested information |
Returns |
Descriptor containing the requested version information. |
Description |
Requests the Browser Control to return information about its version. |
Note |
The information is returned on the Cleanup Stack. |
Syntax |
IMPORT_C virtual void SetSelfDownloadContentTypesL(TDesC& aContentTypes) |
Parameters |
aContentTypes Content types that should not use the Download Manager |
Returns |
None |
Description |
Passes a list of content types to the Browser Control. These content types should not use the Download Manager. The items listed must be separated by a semicolon. Example: text/html;text/wml |
Note |
This function is deprecated. Use the EParamsSelfDownloadableTypes parameter of the SetParamL function instead. |
Syntax |
IMPORT_C virtual void SetParamL(TBrCtlDefs::TBrCtlParams aParam, const TDesC& aValue) |
Parameters |
aParam Parameter to update. Values: One of the following:
|
Returns |
None |
Description |
Updates the value of a Browser Control parameter. |
Syntax |
IMPORT_C virtual void LoadSavedPageL (const TDesC& aUid, TDesC& aSavedPageBuffer) |
Parameters |
aUid Unique identifier for the saved page. It is passed in the format: “savedpage://<aUid>” aSavedPageBuffer Buffer that contains the content of the saved page |
Returns |
None |
Description |
Requests the Browser Control to do the following:
|
Syntax |
IMPORT_C virtual TSize MinimumSize() |
Parameters |
None |
Returns |
Minimum size that the Brower Control can use |
Description |
Returns the minimum size of the Browser Control |
Note |
This function is inherited from the Symbian CCoeControl class. |
Syntax |
IMPORT_C virtual TKeyResponse OfferKeyEventL (const TKeyEvent& aKeyEvent, TEventCode aType) |
Parameters |
aKeyEvent Key event aType Key code |
Returns |
One of the following:
|
Description |
Passes key events to the Browser Control. |
Note |
This function is inherited from the Symbian CCoeControl class. |
Syntax |
IMPORT_C virtual void SetFocus (TBool aFocus, TDrawNow aDrawNow = ENoDrawNow) |
Parameters |
aFocus Values: Etrue if the Browser Control is to have focus Efalse if the Browser Control is to lose focus aDrawNow Values: EDrawNow if the Browser Control must redraw itself immediately as a result of a focus change ENoDrawNow if the Browser Control is not required to redraw itself immediately |
Returns |
None |
Description |
Sets keyboard focus for the Browser Control |
Note |
This function is inherited from the Symbian CCoeControl class. |
Reserved for future use.
Reserved for future use.
Reserved for future use.
The MBrCtlDataLoadConsumer class is a callback interface that provides the Browser Control with the ability to receive content incrementally. This class is stored in the BrowserEngine.lib library.
Syntax:
class MCBrCtlDataLoadConsumer |
This section describes the functions contained in the MBrCtlDataLoadConsumer class.
Syntax |
virtual void HandleNextDataChunk(const TDesC8& aData) |
Parameters |
aData Data chunk to display |
Returns |
None |
Description |
Passes the next data chunk to the Browser Control for display. |
Syntax |
virtual void HandleLoadComplete() |
Parameters |
None |
Returns |
None |
Description |
Informs the Browser Control that the data load is complete |
Syntax |
virtual void HandleError(TInt aError) |
Parameters |
aError Symbian error code |
Returns |
None |
Description |
Informs the Browser Control that an error has occurred |
The MBrCtlDataLoadSupplier class is a callback interface that provides the Browser Control with the ability to display content incrementally. It does this by providing a means for the Browser Control to cancel the load operation if an error occurs. For example, if the Browser Control runs out of memory during the load operation, it can cancel that operation by means of this interface.
This class is stored in the BrowserEngine.lib library.
Syntax:
class MBrCtlDataLoadSupplier |
This section describes the functions contained in the MBrCtlDataLoadSupplier class.
Syntax |
virtual void CancelLoad() |
Parameters |
None |
Returns |
None |
Description |
Cancels the load operation. |
The MBrDialogsProvider class provides functions implemented by the Browser Control to display dialogs, such as error notifications, authentication requests, and selection lists.
Syntax:
class CBrCtlDialogsProvider : public CBase, public MBrCtlDialogsProvider |
This section describes the functions contained in the MBrDialogsProvider class.
Syntax |
virtual void DialogNotifyErrorL(TInt /*ErrCode*/) |
Parameters |
aErrCode Error code for the error that occurred |
Returns |
None |
Description |
Notifies the user of an error encountered during a download. Some examples are: insufficient memory, unrecognized URL, and DNS not found. |
Syntax |
virtual void DialogNotifyHttpErrorL (TInt /*aErrCode*/, const TDesC& /*aUri*/) |
Parameters |
aErrCode Error code for the error that occurred aUri URI of the failed request |
Returns |
None |
Description |
Notifies the user of an error from the HTTP server during a download. Some examples are: file not found, redirect error. |
Syntax |
virtual TBool DialogFileSelectLC (const TDesC& /*aStartPath*/, const TDesC& /*aRootPath*/), HBufC*& /*aSelectedFileName*/) |
Parameters |
aStartPath Most recent directory displayed aRootPath For future use aSelectedFileName File name of the current file |
Returns |
ETrue if the user selected a file EFalse if the user cancelled the transaction and did not select a file. |
Description |
Navigates through your file system and selects a file; analogous to the Browse command in Windows. |
Syntax |
virtual TBool DialogSelectOptionL (const TDesC& /*aTitle*/, TBrCtlSelectOptionType / aBrCtlSelectOptionType*/, CArrayFix <TBrCtlSelectOptionData>& /*aOptions*/) |
Parameters |
aTitle Title of the selection dialog. This is optional. aBrCtlSelectOptionType Type of selection dialog. Values: One of the following:
|
Returns |
EFalse if the user cancelled the dialog selection ETrue if the user selected an option |
Description |
Displays the selected dialog. |
Note |
To use the selections, you must fill the TBrCtlSelectOptionData array with the following four elements: const TDesC& aText Text to display with this element TBool aIsSelected ETrue if this element is selected EFalse if this element is not selected TBool aIsOptGroup ETrue if this element is the title of an option group EFalse if this element is not the title of an option group TBool aHasOnPick ETrue if the dialog window should close when this element is selected EFalse if the dialog window should remain open after this element is selected |
Syntax |
virtual TBool DialogUserAuthenticationLC (const TDesC& /*aUrl*/, const TDesC& /*aRealm*/, const TDesC& /*aDefaultUserName*/, HBufC*& /*aReturnedUserName*/, HBufC*& /*aReturnedPasswd*/, TBool /*aBasicAuthentication*/ = EFalse) |
Parameters |
aUrl URL for which authentication is required. aRealm Realm for which authentication is required. aDefaultUserName User name used previously for this realm and URL, if any. aReturnedUserName User name entered by the user. aReturnedPasswd Password entered by the user. aBasicAuthentication ETrue if basic authentication is required. EFalse if another type of authentication is required; for example, Digest. Default: EFalse |
Returns |
EFalse if the user cancelled the selection ETrue if the user selected an option |
Description |
User authentication dialog. Returns the user name and password on the cleanup stack. |
Syntax |
virtual void DialogNoteL(const TDesC& /*aMessage*/) |
Parameters |
aMessage Message to display |
Returns |
None |
Description |
Displays a message to the user. For example, the message may inform the user about an error encountered while processing a request. |
Note |
Softkeys are not supported. The message disappears after a time out. |
Syntax |
virtual void DialogAlertL (const TDesC& /*aTitle*/, const TDesC& /*aMessage*/) |
Parameters |
aTitle Title of the selection dialog. This is optional. aMessage Message to display |
Returns |
None |
Description |
Displays a message to the user. |
Note |
The OK softkey is supported. The message displays until the user presses OK. |
Syntax |
virtual TBool DialogConfirmL (const TDesC& /*aTitle*/, const TDesC& /*aMessage*/, const TDesC& /*aYesMessage*/, const TDesC& /*aNoMessage*/) |
Parameters |
aTitle Title of the selection dialog. This is optional. aMessage Message to display aYesMessage Text to display on the left softkey aNoMessage Text to display on the right softkey |
Returns |
EFalse if the user cancelled the selection ETrue if the user selected an option |
Description | Displays a confirmation message to the user. For example, Are you sure you want to delete this? |
---|
Syntax |
virtual TBool DialogPromptLC (const TDesC& /*aTitle*/, const TDesC& /*aMessage*/, const TDesC& /*aDefaultInput*/, HBufC*& /*aReturnedInput*/) |
Parameters |
aTitle Title of the selection dialog. This is optional. aMessage Message to display aDefaultInput Default input, if available aReturnedInput Input entered by the user |
Returns |
EFalse if the user cancelled the selection ETrue if the user selected an option |
Description |
Displays an input dialog to the user. Asks the user to input data. |
Syntax |
virtual TBool DialogDownloadObjectL (CBrCtlObjectInfo* /*aBrCtlObjectInfo*/) |
Parameters |
aBrCtlObjectInfo Information about the object to be downloaded:
|
Returns |
EFalse if the user cancelled the selection ETrue if the user selected an option |
Description |
Displays information about the Netscape plug-in object and requests confirmation before downloading the object. |
Syntax |
virtual void DialogDisplayPageImagesL (CArrayFixFlat <TBrCtlImageCarrier>& /*aPageImages*/) |
Parameters |
aPageImages Array describing the images that appear in the current page. The array contains the following elements for each image:
|
Returns |
None |
Description |
Displays the images contained in the current page. |
Syntax |
virtual void CancelAll() |
Parameters |
None |
Returns |
None |
Description |
Cancels the dialog displayed due to browser exit or destroyed pages. |
Syntax |
virtual void DialogFindL() |
Parameters |
None |
Returns |
None |
Description |
Displays a dialog for searching on the page. |
The MBrCtlDownloadObserver class handles download events.
Syntax:
class MBrCtlDownloadObserver |
This section describes the functions contained in the MBrCtlDownloadObserver class.
Syntax |
virtual void HandleDownloadEventL(TUint aTransactionID, TBrCtlDownloadEvent aDownloadEvent, TUint aValue) = 0; |
Parameters |
aTransactionID ID of the transaction This ID must be unique while the transaction is in progress. aDownloadEvent Event to be handled Examples:
|
Parameters |
aValue Value associated with the event. Examples:
|
Returns |
None |
Description | Informs the host application that one of the following download events is in progress: NOTE: All events have the prefix EDownload: EventStarted EventCompleted EventProgress EventCanceled EventError EventPaused EventResumed EventPausable |
---|
Syntax |
virtual TBool NewDownloadL(TUint aTransactionID, const TDesC& aFileName, const TDesC& aContentType, const TDesC& aUrl) = 0; |
Parameters |
aTransactionID ID of the transaction This ID must be unique while the transaction is in progress. aFileName Name of the file in which the downloaded content is stored aContentType Type of content to be downloaded. For example:
|
Returns |
ETrue if the file can be displayed or played while it is downloading (progressive download) EFalse if the file cannot be displayed or played while it is downloading |
Description |
Informs the host application that the Download Manager has begun a new download. |
Syntax |
virtual void ResumeDownloadL(TUint aTransactionID, TUint aLength, const TDesC& aFileName, const TDesC& aContentType, const TDesC& aUrl) = 0; |
Parameters |
aTransactionID ID of the transaction This ID must be unique while the transaction is in progress. aLength Length of the content previously downloaded aFileName Name of the file in which the downloaded content is stored aContentType Type of content downloaded. For example:
|
Returns |
None |
Description |
Tells the host application to resume an incomplete download. After the host application restarts, this method is called for each file whose download was interrupted when the host application closed. |
The MBrCtlLayoutObserver class receives scrolling events when the host application draws the scrollbar.
Syntax:
class MBrCtlLayoutObserver |
This section describes the functions contained in the MBrCtlLayoutObserver class.
Syntax |
virtual void UpdateBrowserVScrollBarL (TInt aDocumentHeight, TInt aDisplayHeight, TInt aDisplayPosY) |
Parameters |
aDocumentHeight Height of the total page aDisplayHeight Height of the display aDisplayPosY Current Y position |
Returns |
None |
Description |
Updates the position of the vertical scrollbar. |
Syntax |
virtual void UpdateBrowserHScrollBarL (TInt aDocumentWidth, TInt aDisplayWidth, TInt aDisplayPosX) |
Parameters |
aDocumentHeight Width of the total page aDisplayHeight Width of the display aDisplayPosY Current X position |
Returns |
None |
Description |
Updates the position of the horizontal scrollbar. |
Syntax |
virtual void NotifyLayoutChange (TBrCtlLayout aNewLayout) |
Parameters |
aNewLayout Layout of the page Values: One of the following:
|
Returns |
None |
Description |
Determines whether the page is to be read right-to-left or left-to-right. |
Notes |
This function is useful when the host application draws the scrollbar. In RTL pages, the scroll bar should be on the left side. |
Syntax |
virtual void UpdateTitleL(const TDesC& aTitle) |
Parameters |
aTitle Title of the page |
Returns |
None |
Description |
Updates the title of the page in the History view. |
The MBrCtlLinkContent class is an interface that loads the resolved content.
Syntax:
class MBrCtlLinkContent |
This section describes the functions contained in the MBrCtlLinkContent class.
Syntax |
virtual void HandleResolveComplete (const TDesC& aContentType, const TDesC& aCharset, const HBufC8* aContentBuf)= 0; |
Parameters |
aContentType Type of content loaded aCharset Character set of the loaded content. For an image, the value of this parameter may be empty. aContentBuf Content to be loaded |
Returns |
None |
Description |
Called when content is resolved. |
Syntax |
virtual void HandleResolveError (TInt aError)= 0; |
Parameters |
aError System-wide error code For a list of error codes, see the Symbian developer documentation. |
Returns |
None |
Description |
Called if an error occurs while resolving the content. |
The MBrCtlLinkResolver class provides the content of an embedded link or the content of a load request that was initiated by the user. This class is used when the host application stores markup text or other information in a private store. For example, this class could be used for e-mail applications.
Syntax:
class MBrCtlLinkResolver |
This section describes the functions contained in the MBrCtlLinkResolver class.
Syntax |
virtual TBool ResolveEmbeddedLinkL (const TDesC& aEmbeddedUrl, const TDesC& aCurrentUrl, TBrCtlLoadContentType aLoadContentType, MBrCtlLinkContent& aEmbeddedLinkContent)= 0; |
Parameters |
aEmbeddedUrl URL of the embedded content aCurrentUrl URL of the current page aLoadContentType Type of the embedded content Values: One of the following: ELoadContentTypeAny ELoadContentTypeMarkup ELoadContentTypeImage ELoadContentTypeCss ELoadContentTypeJava script ELoadContentTypePlug-in aEmbeddedLinkContent Callback interface to return the embedded content |
Returns |
ETrue if the host application resolves the link. EFalse if the host application does not resolve the link. |
Description |
Resolves embedded links. The host application may request that the browser plug-in call this function to retrieve the content of embedded objects. |
Note |
The host application makes this request by setting the ECapabilityClientResolveEmbeddedURL function. |
Syntax |
virtual TBool ResolveLinkL (const TDesC& aUrl, const TDesC& aCurrentUrl, MBrCtlLinkContent& aBrCtlLinkContent)= 0; |
Parameters |
aUrl URL of the embedded content aCurrentUrl URL of the current page aBrCtlLinkContent Callback interface to return the embedded content |
Returns |
ETrue if the host application resolves the link. EFalse if the host application does not resolve the link. |
Description |
Loads new content identified by a link. |
Note |
The host application requests that the browser plug-in call this function to load new content by setting the ECapabilityClientNotifyURL function. |
Syntax |
virtual void CancelAll() = 0; |
Parameters |
None |
Returns |
None |
Description |
Cancels all outstanding link resolution operations. |
The MBrCtlLoadEventObserver interface receives load progress events. The host application can implement this interface. This class is located in the BrowserEngine.lib library.
Syntax:
class MBrCtlLoadEventObserver |
This section describes the functions contained in the MBrCtlLoadEventObserver class.
Syntax |
virtual void HandleBrowserLoadEventL (TBrCtlDefs::TBrCtlLoadEvent aLoadEvent, TUint aSize, TUint16 aTransactionId) = 0; |
Parameters |
aLoadEvent The load event aSize Size of the content associated with this event aTransactionId ID of the transaction corresponding to this event, if applicable |
Returns |
None |
Description |
Notifies the Browser Control of a load event |
The MBrCtlSoftkeysObserver class handles requests to change the softkeys.
Syntax:
class MBrCtlSoftkeysObserver |
This section describes the functions contained in the MBrCtlSoftkeysObserver class.
Syntax |
virtual void UpdateSoftkeyL (TBrCtlKeySoftkey aKeySoftkey, const TDesC& aLabel, TUint32 aCommandId, TBrCtlSoftkeyChangeReason aBrCtlSoftkeyChangeReason) = 0; |
Parameters |
aKeySoftkey Determines whether to update the left softkey or the right softkey. Values: EKeyRight to update the right softkey EKeyLeft to update the left softkey aLabel For future use aCommandId For future use aBrCtlSoftkeyChange Reason Reason for the softkey change Value: EChangeReasonIdle (The other values are reserved for future use.) |
Returns |
None |
Description |
Requests the host application to change a softkey. The host application may or may not change the softkey. |
The MBrCtlSpecialLoadObserver class handles special load events, such as network connection, non-HTTP(S) load requests, and non-HTML responses.
Syntax:
class MBrCtlSpecialLoadObserver |
This section describes the functions contained in the MBrCtlSpecialLoadObserver class.
Syntax |
virtual void NetworkConnectionNeededL (TInt* aConnectionPtr, TInt* aSockSvrHandle, TBool* aNewConn, TApBearerType* aBearerType) = 0; |
Parameters |
aConnectionPtr Pointer to the network connection. It must be type casted to an integer. If NULL, the Proxy Filter creates a network connection automatically. aSockSvrHandle Handle to the socket server. It must be type casted to an integer. aNewConn ETrue if a new connection was created. EFalse if a previously created connection was used. aBearerType Bearer type of the new connection. For example, GPRS, WCDMA. TapBearerType is defined in ApEngineConsts.h. |
Returns |
None |
Description |
Requests a new network connection. |
Note |
This function is called for every HTTP request for which the content was not found in the cache. This function is called whether or not a connection was established in a previous request. The host application determines whether to create a new connection or to use an existing connection. |
Syntax |
virtual TBool HandleRequestL (RArray<TUint>* aTypeArray, CDesCArrayFlat* aDesArray) = 0; |
Parameters |
aTypeArray Array of request parameters Examples: URL, referrer header aDesArray Array of values corresponding to the types in aTypeArray |
Returns |
ETrue if the host application handles the scheme. EFalse if the host application cannot handle the scheme. |
Description |
Requests the host application to handle non-HTTP requests. It is expected that the host application will call the Scheme Dispatcher to handle these requests. |
Note |
The browser checks the scheme to determine whether or not it is supported. The browser supports the following schemes:
|
Syntax |
virtual TBool HandleDownloadL (RArray<TUint>* aTypeArray, CDesCArrayFlat* aDesArray) = 0; |
Parameters |
aTypeArray Array of download parameter types aDesArray Array of values corresponding to the types in aTypeArray |
Returns |
ETrue if handled by the host application EFalse if not handled by the host application |
Description |
Requests the host application to handle downloads. |
Notes |
The host application should call the Download Manager to handle non-HTML content. Only GET requests are supported because the Browser Control must cancel the transaction before the Download Manager can take over. If a POST request is cancelled, the server may enter an unpredictable state. For POST requests, the Browser Control downloads the content before calling this function. It stores the content in a file whose name is passed to the host application by using the EParamLocalFileName parameter. The host application should check whether this parameter was passed by the Browser Control to determine whether the Browser Control already downloaded the content. If not, the host application should download the content. |
The MBrCtlStateChangeObserver class receives state-changed events. At the present time, there is only one state-changed event. This event is generated when the browser switches to and from the Image Map view. In Image Map view, only an image map is displayed, which enables the user to navigate. The host application can implement this interface in order to find out when the view changes to and from the Image Map view. This class is located in the BrowserEngine.lib library.
Syntax:
class MBrCtlStateChangeObserver |
This section describes the functions contained in the MBrCtlStateChangeObserver class.
Syntax |
virtual void StateChanged (TBrCtlDefs::TBrCtlState aState, Tint aValue) = 0; |
Parameters |
aState Indicates whether or not the browser is in Image Map view. Value: EStateImageMapView aValue Indicates the state being changed. Values: ETrue indicates entering Image Map view EFalse indicates exiting Image Map view |
Returns |
None |
Description |
Notifies the Browser Control of a state-changed event. |
The MBrCtlWindowObserver class is reserved for future use.
The TBrCtlWmlServiceOption class wraps information about the WML DO elements. For more information about the DO tag, see http://www.w3schools.com/wap/tag_do.asp.
Syntax:
class TBrCtlWmlServiceOption |
This section describes the functions contained in the TBrCtlWmlServiceOption class.
Syntax |
TBrCtlWmlServiceOption(HBufC* aText, TUint aElemID, TUint aActualElemID); |
Parameters |
HBufC* aText Text to display for the WML service options TUint aElemID Element ID TUint aActualElemID Internal to the Browser Control. The host application should not modify this parameter. |
Returns |
TBrWmlServiceOption object |
Description |
Constructor |
Syntax |
inline const TDesC& Text() |
Parameters |
None |
Returns |
Text to display for the WML service options |
Description |
Displays the text for the WML service options |
Syntax |
inline TUint ElemID() |
Parameters |
None |
Returns |
Element ID employed when the user selects this command |
Description |
Gets the command ID to use when the user selects this command |
Syntax |
inline TUint ActualElemID() |
Parameters |
None |
Returns |
Actual element ID |
Description |
Gets the actual element ID defined in the WML page. |
Note |
This parameter is internal to the Browser Control. The host application should not modify this parameter. |
The TBrCtlSelectOptionData class represents a list of elements to display in the list box. This class is used for the List Selection Dialog.
Syntax:
class TBrCtlSelectOptionData |
This section describes the functions contained in the BrCtlSelectOptionData class.
Syntax |
inline TBrCtlSelectOptionData() |
Parameters |
None |
Returns |
TBrCtlSelectOptionData object |
Description |
Default Constructor |
Syntax |
inline TBrCtlSelectOptionData(const TDesC& aText, TBool aIsSelected, TBool aIsOptGroup, TBool aHasOnPick ) |
Parameters |
aText Text to display for the option aIsSelected ETrue if the option is selected EFalse if the option is not selected aIsOptGroup ETrue if the listed item is the title of an option group EFalse if the listed item is one of the options from which to select aHasOnPick ETrue if the dialog should close when the element is selected EFalse if the dialog does not close when the element is selected |
Returns |
TbrCtlSelectOptionData object |
Description |
Constructor |
Syntax |
inline const TDesC& Text() |
Parameters |
None |
Returns |
A reference to a Symbian TDesC object that contains the text associated with this option. |
Description |
Gets the display text associated with a specified option. |
Syntax |
inline TBool IsSelected() |
Parameters |
None |
Returns |
ETrue if the option is selected EFalse if the option is not selected |
Description |
Indicates whether or not an option is selected. |
Syntax |
inline TBool IsOptGroup() |
Parameters |
None |
Returns |
ETrue if the listed item is the title of an option group EFalse if the listed item is one of the options from which to select |
Description |
Indicates whether an option group member variable is a group title or a selectable option. |
Syntax |
Inline TBool HasOnPick () |
Parameters |
None |
Returns |
ETrue if the dialog closes when the element is selected. This is known as having OnPick capability. EFalse if the dialog does not close when the element is selected |
Description |
Indicates whether or not the dialog closes when an option is selected. |
Syntax |
inline void SetText( TDesC& aText ) |
Parameters |
A reference to a TDesC object that contains the text to associate with a particular option. |
Returns |
None |
Description |
Sets the text of the option object. |
Syntax |
inline void SetIsSelected( TBool aIsSelected ) |
Parameters |
The state of the IsSelected member variable. Value: ETrue if the option is selected EFalse if the option is not selected |
Returns |
None |
Description |
Sets the selection state of an option. |
Syntax |
Inline void SetIsOptGroup(TBool aIsOptGroup) |
Parameters |
The state of the option group. Value: ETrue if the listed item is the title of an option group EFalse if the listed item is one of the options from which to select |
Returns |
None |
Description |
Sets the state of the option group member variable. Indicates whether an option group member variable is a group title or a selectable option. |
Syntax |
inline void SetHasOnPick (TBool aHasOnPick) |
Parameters |
ETrue if the dialog closes when the element is selected. This is known as having OnPick capability. EFalse if the dialog does not close when the element is selected |
Returns |
None |
Description |
Sets the state of the hasOnPick member variable. Indicates whether or not the dialog closes when an option is selected. |
This section presents the definitions of the enumerations for the Browser Control API.
The TBrCtlDefs class contains definitions of custom data types for the Browser Control API.
Syntax:
class TBrCtlDefs |
This section defines the enumerations that are within the scope of the TBrCtlDefs class.
Syntax |
enum TBrCtlCommandId { ECommandIdBrowserBase = 0, ECommandIdPluginBase = 100, ECommandIdWMLBase = 300, ECommandIdRange = 600, ECommandIdBase = 15000 }; |
Parameters |
ECommandIdBrowser Base
|
Description |
The Browser Control uses 600 command IDs, whose default range is from 15000 − 15600. The host application can specify any desired range through the API. |
Syntax |
enum TBrCtlCacheMode { ECacheModeNormal = 0, ECacheModeHistory, ECacheModeNoCache, ECacheModeOnlyCache, }; |
Parameters |
ECacheModeNormal
|
Description |
Rules that determine in which mode the cache operates. |
Syntax |
enum TBrCtlCommands { ECommandDisconnect = 0, ECommandCancelFetch, ECommandOpen, ECommandReload, ECommandBack, ECommandForward, ECommandClearHistory, ECommandShowHistory, ECommandAccept, ECommandCancel, ECommandOpenToViewer, ECommandAddToPhoneBook, ECommandMakeCall, ECommandRemoveFileName, ECommandShowImages, ECommandLoadImages, ECommandGainFocus, ECommandLoseFocus, EComandFindItem, ECommandFindItemPhoneNumber, ECommandFindItemEMail, ECommandFindItemAddress, ECommandFindKeyword, ECommandClearFind, ECommandShowThumbnailView, ECommandShowDownloads, ECommandSaveLaunchParams, ECommandOneStepBack }; |
Parameters |
ECommandDisconnect Unloads the HTTP Framework ECommandCancelFetch Cancels all outstanding requests ECommandOpen Activates the focused element ECommandReload Reloads the current page ECommandBack Loads the previous page, if available ECommandForward
|
Parameters |
ECommandAccept
|
Parameters |
ECommandFindItem EMail
|
Description |
The host application can send these commands to the Browser Control by calling the HandleCommandL function. |
Notes |
The host application should define the base for the command IDs and add that base to the enum value of each command. |
Syntax |
enum TBrCtlDownloadCmd { EDownloadCmdPause, EDownloadCmdResume, EDownloadCmdCancel, EDownloadCmdMarkAsProgressive, EDownloadCmdMarkAsNotProgressive }; |
Parameters |
EDownloadCmdPause Pauses the download identified by the aTransId parameter of the HandleDownloadCommandL function. EDownloadCmdResume Resumes the download identified by the aTransId parameter of the HandleDownloadCommandL function. EDownloadCmdCancel Cancels the download identified by the aTransId parameter of the HandleDownloadCommandL function. EDownloadCmdMarkAs Progressive Notifies the Download Manager that the download is progressive. This means that the file can be played while the download is in progress. EDownloadCmdMarkAs NotProgressive Notifies the Download Manager that the download is not progressive. This means that the file cannot be played while the download is in progress. |
Description |
Commands sent by the host application to the Browser Control by calling the HandleDownloadCommandL function. |
Syntax |
enum TBrCtlLoadEvent { EEventNone = 0, EEventNewContentStart, EEventUrlLoadingStart, EEventNewUrlContentArrived, EEventMoreUrlContentArrived, EEventNewContentDisplayed, EEventMoreContentDisplayed, EEventUrlLoadingFinished, EEventLoadFinished, EEventContentFinished, EEventTitleAvailable, EEventLoadError, EEventEnteringSecurePage, EEventExitingSecurePage, EEventSomeItemsNotSecure, EEventSubmittingToNonSecurePage, EEventRedirectConfirmation, EEventRepostConfirmation, EEventSecureItemInNonSecurePage, EEventAuthenticationFailed, EEventUploadStart, EEventUploadFinished, EEventUploadIncrement }; |
Parameters |
EEventNone Not used. EEventNewContentStart A page is beginning to load. This includes images, scripts, style sheets, and anything else embedded in the page as a single load event. EEventUrlLoadingStart A URL is beginning to load. This notifies the observer of a separate load event for each image or other element embedded in the page. EEventNewUrlContent Arrived The first data chunk has arrived. This occurs when the response headers are received. EEventMoreUrlContent Arrived Another data chunk has arrived. This occurs for each chunk of data that is loaded, including the first chunk. EEventNewContent Displayed The first chunk of content is displayed. The previous page is destroyed at this time. This occurs once per page. |
Parameters |
EEventMoreContent Displayed Another chunk of content is displayed. This occurs for each chunk of content that is displayed, except for the first chunk. EEventUrlLoading Finished A URL has finished loading. EEventLoadingFinished The page has finished loading. If the host application draws a progress bar, it can be removed when this event is received. EEventContentFinished The content has finished loading. EEventTitleAvailable A page title was encountered. After receiving this event, the host application can call PageInfoLC to receive the page title. EEventLoadError An error occurred while loading the page. EEventEnteringSecure Page The user is navigating from a non-secure page to a secure page. The host application displays a secure icon, if needed. EEventExitingSecure Page The user is navigating from a secure page to a non-secure page. If the host application displays a secure icon, that icon should be removed. EEventSomeItemsNot Secure The user is entering a secure page that contains non-secure items. EEventSubmittingTo NonSecurePage The user is submitting information to a non-secure page. |
Parameters |
EEventRedirect Confirmation User confirmation is required to redirect the browser. EEventRepost Confirmation User confirmation is required to repost a page that has been viewed previously. EEventSecureItemIn NonSecurePage The user is entering a non-secure page that contains secure items. EEventAuthentication Failed Authentication failed or was cancelled. EEventUploadStart A file is beginning to upload. EEventUploadFinished A file has finished uploading; the last chunk of data has been transmitted. EEventUploadIncrement Length of the data transmitted and the cumulative size of the uploaded file. |
Description |
The load event that occurred. |
Syntax |
enum TBrCtlSettings { ESettingsUnknown = -1, ESettingsSmallScreen = 0, ESettingsAutoLoadImages, ESettingsFontSize, ESettingsEmbedded, ESettingsTextWrapEnabled, ESettingsCookiesEnabled, ESettingsCSSFetchEnabled, ESettingsECMAScriptEnabled, ESettingsIMEINotifyEnabled, ESettingsCharacterSet, ESettingsSendRefererHeader, ESettingSecurityWarnings, ESettingsApId, ESettingsCurrentZoomLevelIndex, ESettingsPageOverview, ESettingsNumOfDownloads, ESettingsLaunchAppUid, ESettingsLaunchViewId, ESettingsLaunchCustomMessageId, ESettingsBackList, ESettingsAutoRefresh, ESettingsMaxEnum, ESettingsBrowserUtf8Encoding }; |
Parameters |
ESettingsUnknown Not used ESettingsSmallScreen If set to On, large pages are optimized for display on a small screen. If set to Off, all pages display in their original format. |
Parameters |
ESettingsAutoLoad Images If set to On, images automatically load when a page is downloaded. If set to Off, images are not loaded. Default: On ESettingsFontSize If set to All.Large, all text is shown 40% larger than its declared size. If set to Larger, all text is shown 20% larger than its declared size. If set to Normal, all text is shown as its declared size. If set to Smaller, all text is shown 20% smaller than its declared size. If set to All.Small, all text is shown 40% smaller than its declared size. ESettingsEmbedded If set to On, the host application is embedded within another application. If set to Off, the host application is not embedded within another application. ESettingsTextWrap Enabled If set to On, paragraphs are automatically wrapped to fit into the display width. If set to Off, paragraphs are not automatically wrapped. NOTE: This parameter is not shown if ESettingsSmallScreen is set to On. ESettingsCookies Enabled If set to Allow, the user can send and receive cookie information. If set to Reject, the user cannot send or receive cookie information. |
Parameters |
ESettingsCSSFetch Enabled If set to Finest, external style sheets are downloaded when Small Screen Layout is used. If set to Fastest, external style sheets are not downloaded when Small Screen Layout is used. Default value: Fastest ESettingsECMAScript Enabled If set to Enable, ECMA Script is enabled. If set to Disable, ECMA Script is disabled. Default value: Enable ESettingsIMEINotify Enabled Device unique identification number sent to a server for billing purposes in e-commerce. If set to Enable, the Browser Control sends the International Mobile Equipment Identity (IMEI) to the server. If set to Disable, the Browser Control does not send the IMEI to the server. Default value: Disable ESettingsCharacter Set Character coding If set to Automatic, the character set is automatically selected according to the following criteria, in order or priority: 1. Detected from the Byte Order Mark (BOM) 2. Detected from XML Document Type Definition (DTD) |
Parameters |
3. Declared in <meta> element 4. Detected from HTTP headers 5. Variant-specific default character set for automatic detection. Possible character codings are:
|
Parameters |
ESettingsSecurityWarnings One of the following:
|
ESettingsBrowser Utf8Encoding If set, the browser encodes URLs using UTF-8 instead of the original content encoding. NOTE: This is recommended only for the APAC region. |
|
Description |
The setting to manipulate. |
Syntax |
enum TBrCtlFontSizeLevel { EFontSizeLevelAllSmall = 0, EFontSizeLevelSmaller, EFontSizeLevelNormal, EFontSizeLevelLarger, EFontSizeLevelAllLarge }; |
Parameters |
EFontSizeLevelAllSmall Text is shown 40% smaller than its declared size. EFontSizeLevelSmaller Text is shown 20% smaller than its declared size. EFontSizeLevelNormal Text is shown as its declared size. EFontSizeLevelLarger Text is shown 20% larger than its declared size. EFontSizeLevelAllLarge Text is shown 40% larger than its declared size. |
Description |
The size of the font selected. |
Syntax |
enum TBrCtlCapabilities { ECapabilityDisplayScrollBar = 0x01, ECapabilityClientResolveEmbeddedURL = 0x02, ECapabilityClientNotifyURL = 0x04, ECapabilityDisableInputAndPlugins = 0x08, ECapabilityFindItem = 0x10, ECapabilityLoadHttpFw = 0x20, ECapabilityUseDlMgr = 0x00040, ECapabilityLaunchViewer 0x0080, ECapabilityGraphicalHistory = 0x0100, ECapabilitySavedPage = 0x0200, ECapabilityConfirmDownloads = 0x0400 }; |
Parameters |
ECapabilityDisplay ScrollBar Displays horizontal and vertical scroll bars. ECapabilityClient ResolveEmbeddedURL Sends request to load embedded content to the host application. The host application indicates whether or not the load request should proceed. ECapabilityClient NotifyURL Sends request to load a URL to the host application. The host application indicates whether or not the load request should proceed. ECapabilityDisable InputAndPlugins Disables input boxes and Netscape plug-ins. ECapabilityFindItem Adds Find Item to the Options menu. ECapabilityLoadHttpFw Allows network access for HTTP requests.
|
Description |
Configuration options for the Browser Control |
Syntax |
enum TBrCtlPageInfo { EPageInfoTitle = 0, EPageInfoUrl, EPageInfoContent, EPageInfoSavedPage }; |
Parameters |
EPageInfoTitle Page title, if a title was specified EPageInfoUrl URL of the current page EPageInfoContent Page content as a text buffer EPageInfoSavedPage Page content, including all embedded content, as a buffer |
Description |
Gets the requested page information. |
Syntax |
enum TBrCtlState { EStateImageMapView = 0, EStateHistoryView, EStateThumbnailView }; |
Parameters |
EStateImageMapView Currently, the only state change that can be observed is in and out of Image Map view. EStateHistoryView For future use EStateThumbnailView For future use |
Description |
Indicates whether the browser is in Image Map view. |
Syntax |
enum TBrCtlElementType { EElementNone, EElementImageBox, EElementAnchor, EElementTelAnchor, EElementMailtoAnchor, EElementInputBox, EElementActivatedInputBox, EElementSelectBox, EElementButton, EElementTextAreaBox, EElementRootBox, EElementObjectBox, EElementActivatedObjectBox, EElementDownloadedObjectBox, EElementFileSelectionBoxNoContent, EElementFileSelectionBoxWithContent, EElementAreaBox, EElementCheckBoxChecked, EElementCheckBoxUnchecked, EElementRadioButtonSelected, EElementRadioButtonUnSelected }; |
Parameters |
EElementNone No element is present. EElementImageBox Box containing an image. EElementAnchor Element used to create either of the following:
|
Parameters |
EElementTextAreaBox Input box that contains more than one line. EElementRootBox Root of the document. EElementObjectBox Placeholder for a plug-in that has not yet been downloaded. EElementActivated ObjectBox Box containing a plug-in that the user can manipulate; for example, by navigating links. EElementDownloaded ObjectBox Plug-in that is present but is not being manipulated. EElementFileSelectionBoxNoContent File-browsing box in which no file is selected. |
EElementFileSelectionBoxWithContent File-browsing box in which a file was selected previously. EElementAreaBox Image map. EElementCheckBox Checked A check box that was selected. EElementCheckBox Unchecked A check box that was not selected. EElementRadioButton Selected A radio button that was selected. EElementRadioButton UnSelected A radio button that was not selected. |
|
Description |
Type of the focused element. |
Syntax |
enum TBrCtlNavigationDirection { ENavigationBack, ENavigationForward }; |
Parameters |
ENavigationBack Navigate to the previous page ENavigationForward Navigate to the next page |
Description |
Identifies the navigation direction |
Syntax |
enum TBrCtlVersionInfo { EVersionInfoName = 0, EVersionInfoVersion, EVersionInfoBuild }; |
Parameters |
EVersionInfoName Name of the Browser Control EVersionInfoVersion Version of the Browser Control EVersionInfoBuild Build of the Browser Control |
Description |
Returns information about the version of the Browser Control. |
Syntax |
enum TBrCtlParams { EParamsUnknown = -1, EParamsSelfDownloadableTypes = 0, EParamsRequestHeaders, EParamsMax }; |
Parameters |
EParamsUnknown Not used EParamsSelfDownloadableTypes List of content types that do not use the Download Manager EParamsRequestHeaders List of headers that the Browser Control should add to each request EParamsMax Not used |
Description |
Returns information about the version of the Browser Control. |
Syntax |
enum TBrCtlFindResponse { EFindNoMatches = 0, EFindWrapAround, EFindAllMatches, EFindMatch }; |
Parameters |
EFindNoMatches Reserved for future use EFindWrapAround Reserved for future use EFindAllMatches Reserved for future use EFindMatch Reserved for future use |
Description |
Reserved for future use |
Syntax |
enum TBrCtlMethod { EMethodGet, EMethodPost }; |
Parameters |
EMethodGet Get method should be used to fetch content from a URL EMethodPost POST method should be used to fetch content from a URL |
Description |
Specifies the type of method to call to fetch a URL. The MbrCtlWindowObserver employs this method. |
This section presents the enumerations that are defined in the BrCtlDialogsProvider.h header file.
Syntax |
enum TBrCtlSelectOptionType { ESelectTypeMultiple, ESelectTypeSingle, ESelectTypeNone, ESelectTypeOkOnly }; |
Parameters |
ESelectTypeMultiple Check boxes (multiple selections allowed) ESelectTypeSingle Radio buttons (single selection only) ESelectTypeNone No buttons (single selection only) ESelectTypeOkOnly No buttons (single selection only) OK softkey is available Cancel button is not available |
Description |
Type of selection list |
Syntax |
enum TBrCtlImageType { EImageTypeAny, EImageTypeWbmp, EImageTypeOta }; |
Parameters |
EImageTypeAny Automatically recognized by the image converter EImageTypeWbmp Wireless Bitmap (WBMP) image EImageTypeOta Over The Air (OTA) image |
Description |
Defines the type of image if it cannot be recognized by the Symbian image conversion library. |
This section presents the enumerations defined in the BrCtlDownloadObserver.h header file.
Syntax |
enum TBrCtlDownloadEvent { EDownloadEventStarted, EDownloadEventCompleted, EDownloadEventProgress, EDownloadEventCanceled, EDownloadEventError, EDownloadEventPaused, EDownloadEventResumed, EDownloadEventPausable }; |
Parameters |
EDownloadEventStarted A download has started. The aValue associated with this event is the total size of the file to be downloaded. For more information on aValue, see HandleDownloadEventL. EDownloadEventCompleted A download has completed. The aValue associated with this event is the total size of the file that was downloaded. EDownloadEventProgress A download is in progress. The aValue associated with this event is the size of the file that was downloaded so far. |
Parameters |
EDownloadEventCanceled A download was canceled by the HandleDownloadCommandL function. EDownloadEventError An error occurred in the Download Manager during a download operation. EDownloadEventPaused A download was paused. The aValue associated with this event is the size of the file that was downloaded before the pause occurred. |
EDownloadEventResumed A paused download was resumed. The aValue associated with this event is the size of the file that was downloaded so far. EDownloadEventPausable Notifies the host application as to whether or not a particular download can be paused. The aValue associated with this event is one of the following: ETrue if the download can be paused EFalse if the download cannot be paused |
|
Description |
Defines the download events sent to the host application by the Download Manager. |
Notes |
For more information on aValue, see the HandleDownloadEventL function. |
This section presents the enumerations defined in the BrCtlLayoutObserver.h header file.
Syntax |
enum TBrCtlLayout { EOriginTopLeft, EOriginTopRight }; |
Parameters |
EOriginTopLeft Page is to be read from left-to-right EOriginTopRight Page is to be read from right-to-left |
Description |
Defines whether a page is to be read from left-to-right or from right-to-left. |
This section presents the definitions of the enumerations defined in the BrCtlLinkResolver.h header file.
Syntax |
enum TBrCtlLoadContentType { ELoadContentTypeAny, ELoadContentTypeMarkup, ELoadContentTypeImage, ELoadContentTypeCss, ELoadContentTypeJavascript }; |
Parameters |
ELoadContentTypeAny The content type is unknown ELoadContentTypeMarkup The content is one of the following:
|
Description |
The browser guesses the expected content type from the HTML element in which the content was defined. |
This section presents enumerations that are defined in the BrCtlSoftkeyObserver.h header file.
Syntax |
enum TBrCtlKeySoftkey { EKeyRight, EKeyLeft }; |
Parameters |
EKeyRight Use the right softkey EKeyLeft Use the left softkey |
Description |
Identifies which softkey is to be used |
This section presents the enumerations defined in the BrCtlSpecialLoadObserver.h header file.
Syntax |
enum TBrCtlDownloadParam { EParamRequestUrl, EParamRealm, EParamUsername, EParamPassword, EParamProxyUsername, EParamProxyPassword, EParamProxyRealm, EParamRawRequestHeader, EParamReceivedContentType, EParamExpectedContentType, EParamTotalContentLength, EParamReceivedContentLength, EParamReceivedContent, EParamRawResponseHeader, EParamLocalFileName, EParamCharset, EParamRefererHeader }; |
Parameters |
EParamRequestUrl URL requested EParamRealm Realm (if www) EParamUsername User name (if www authentication) EParamPassword Password (if www authentication) EParamProxyRealm Realm in the case of proxy authentication EParamProxyUsername User name (if proxy authentication) EParamProxyPassword Password (if proxy authentication) EParamRawRequestHeader Request header in the form: Header:Value EParamReceivedContent Type Type of content received EParamExpectedContent Type Type of content expected to appear in the markup <object> tag. EParamTotalContent Length Expected length of the content |
Parameters |
EParamReceivedContent Length Length of the content already received EParamReceivedContent Body of the content received EParamRawResponse Header Response header in the form: Header: Value EParamLocalFileName Name of the file containing the content to be downloaded EParamCharset Character set of the content to be downloaded EParamRefererHeader Referrer header used in the download request, if applicable |
Description |
Defines the parameters passed to the Special Load Observer. The Observer should use these parameters when calling the Download Manager. |
This section lists the commands that the Browser Control can add to the host application's options menu for each currently selected element.
Currently Selected Element | Command |
EElementAnchor |
TBrCtlDefs::ECommandOpen |
EElementTelAnchor |
TBrCtlDefs::ECommandMakeCall TBrCtlDefs::ECommandAddToPhoneBook |
EElementMailtoAnchor |
TBrCtlDefs::ECommandAddToPhoneBook |
EElementInputBox |
TBrCtlDefs::ECommandOpen |
EElementActivatedInputBox |
TBrCtlDefs::ECommandAccept |
EElementSelectBox |
TBrCtlDefs::ECommandOpen |
EElementButton |
TBrCtlDefs::ECommandOpen |
EElementObjectBox |
TBrCtlDefs::ECommandOpen |
EElementActivatedObjectBox |
TBrCtlDefs::ECommandOpenToViewer |
EElementDownloadedObjectBox |
TBrCtlDefs::ECommandOpenToViewer |
EElementFileSelectionBoxNoContent |
TBrCtlDefs::ECommandOpen |
EElementFileSelectionBoxWithContent |
TBrCtlDefs::ECommandOpen |
EElementCheckBoxChecked |
TBrCtlDefs::ECommandRemoveFileName |
EElementCheckBoxUnchecked |
TBrCtlDefs::ECommandOpen |
EElementRadioButtonUnSelected |
TBrCtlDefs::ECommandOpen |