PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFZWebBrowserControl
Responder which represents a simple web browser control.
#include <SFZWebBrowserControl.hpp>
class SFZWebBrowserControl : public SFYControl;
SFMTYPEDEFRESPONDER(SFZWebBrowserControl)

Inheritance diagram

 Inheritance diagram of SFZWebBrowserControlClass

Collaboration diagram

 Collaboration diagram of SFZWebBrowserControlClass

Description

The following functions are available in the SFZWebBrowserControl class:

  • HTTP Communication
  • rendering HTML document
  • displaying an inline image
  • hyper-link
  • access history

A simple web browser can be created easily by only pasting a SFZWebBrowserControl object.

The SFZWebBrowserControl class holds an internal SFYWebBrowserWidget instance. The SFYWebBrowserWidget class is implemented base on the IHtmlViewer of BREW API. The limitations of SFZWebBrowserControl class on rendering the HTML data are almost the same as that of IHtmlViewer.

[Note] Fatal Error

The SFZWebBrowserControl::HandleError function is invoked when an fatal error occurs.

[Caution] Privilege setting of mif file

To use the SFZWebBrowserControl class, "Web Access" privilege must be checked by mif editor. To load an own root certificate file for SSL connection, "File" privilege must be also checked.

Sample Code

The following code displays a HTML document in a window by using the simple browser (the SFYWebBrowserWidget class).

SFMTYPEDEFRESPONDER(MyWindow)
class MyWindow : public SFZWindow{
    SFMSEALRESPONDER(MyWindow)
    SFMRESPONDERINSTANTIATEFOUR(MyWindow, SFZWindow, SFYContainer, SFYWidget, SFYResponder)
public:
    // Type of MyWindow
    enum CodeEnum {
        CODE_TYPE = four_char_code('M', 'W', 'N', 'D')
    };
    SFMTYPEDEFTYPE(CodeEnum)
public:
    static MyWindowSmp NewInstance(SFCErrorPtr exception = null);
    // Create and initialize a simple browser
    SFCError Make(Void);

protected:
    explicit MyWindow(Void) static_throws;
    virtual ~MyWindow(Void);

    // Simple browser
    SFZWebBrowserControlSmp _browser;

};

// Constructor
MyWindow::MyWindow(Void) static_throws
{
    if (static_try()) {
        // Set the responder type
        SetType(CODE_TYPE);
   }
}

// Destructor
MyWindow::~MyWindow(Void)
{
}

// Create and initialize a simple browser
SFCError MyWindow::Make(Void)
{
    SFCError error;

    // A HTML document to display
    SFXAnsiString buffer(
         "BrowserControl<br /><br />"
         "<a href=\"/example/tabbrowser/\">Sophia Craedle</a><br /><br />"
    );

    // Create an instance of the simple browser
    if ((_browser = SFZWebBrowserControl::NewInstance(&error)) != null) {

        if ((error = _browser->SetParent(GetThis())) == SFERR_NO_ERROR) {

            _browser->SetRealBound(GetLocalBound());

            _browser->SetState(true, true, true, true);

            // Open browser
            _browser->Open();

            // Load a HTML document
            _browser->Load(buffer);

            _browser->ToFront();
        }
    }
    return error;
}

Figure 408. Execution result

Execution result

Reference

SFYControl | SFBHTMLViewer | SFYWebBrowserWidget::SetRequestHeader | SFYWebBrowserWidget::SetTimeoutCallback | SFYWebBrowserWidget::SetTimeoutMillisecond | BREW API IHtmlViewer | BREW API IWeb

Member

Constructor/Destructor
SFZWebBrowserControl( Void )
Constructor of the SFZWebBrowserControl class.
~SFZWebBrowserControl( Void )
Destructor of the SFZWebBrowserControl class.
Public Functions
Bool AdjustViewer( Void )
Adjust the region of the internal IHTMLViewer instance.
Void Cancel( Void )
Cancel to connect to the Web server.
Void ClearHistory( Void )
Clear the history list.
Void Close( Void )
Close the HTTP connection.
SInt32 FindElement( ACharConstPtr element , SInt32 no )
Find the specified element in the current page.
SFXAnsiStringConstRef GetBaseUrl( Void )
Get the base URL of HTTP basic authentication.
SFXAnsiStringConstRef GetContentEncoding( Void )
Get the value of the Content-Encoding field of the HTTP response header.
SInt32 GetContentLength( Void )
Get the value of the Content-Length field of the HTTP response header.
SFXAnsiStringConstRef GetContentType( Void )
Get the value of the Content-Type field of the HTTP response header.
SFXAnsiStringConstRef GetCurrentTitle( Void )
Get the title of the current page.
SFXAnsiStringConstRef GetCurrentURL( Void )
Get the URL of the current page.
SFXDate GetDate( Void )
Get the value of the Date field of the HTTP response header.
SFXAnsiString GetElementText( SInt32 elementIndex )
Get the text of the specified element.
SFXDate GetExpires( Void )
Get the value of the Expires field of the HTTP response header.
SInt32 GetIndent( Void )
Get the width of indent.
SFXDate GetLastModified( Void )
Get the value of the Last-Modified field of the HTTP response header.
SFXRGBColor GetLinkColor( Void )
Get the color of link text.
SFXAnsiStringConstRef GetMethod( Void )
Get the HTTP request method.
SInt32 GetParagraphSpacing( Void )
Get the spacing between paragraphs.
SFXAnsiStringConstRef GetPassword( Void )
Get the password of HTTP basic authentication.
SFXSocketAddressConstRef GetProxyServer( Void )
Get the proxy server.
SFBSourceSmpConstRef GetRequestContent( Void )
Get the SFBSource instance that manages the HTTP request body.
UInt32 GetRequestFlag( Void )
Get the HTTP request flag.
SFXAnsiStringConstRef GetRequestHeader( SFXAnsiStringConstRef key )
Get the HTTP request header.
SFXPropertyConstRef GetRequestHeader( Void )
Get the HTTP request header.
SFBSourceSmpConstRef GetResponseContent( Void )
Get the SFBSource instance that manages the HTTP response body.
UInt32 GetResponseFlag( Void )
Get the HTTP response flag.
SFXAnsiStringConstRef GetResponseHeader( SFXAnsiStringConstRef key )
Get the HTTP response header.
SFXPropertyConstRef GetResponseHeader( Void )
Get the HTTP response header.
SInt32 GetResultCode( Void )
Get the HTTP status code.
SFBWebSmpConstRef GetSFBWeb( Void )
Get the SFBWeb instance managed internally by the HTTP connection.
SFBWebRespSmpConstRef GetSFBWebResp( Void )
Get the SFBWebResp instance managed internally by the HTTP connection.
SInt32 GetScrollbarWidth( Void )
Get the width of scroll bar.
SFCError GetStreamReader( UInt32 size , SFXStreamReaderPtr result )
Get the input stream for reading data from the HTTP response body.
SFCError GetStreamReader( SFXStreamReaderPtr result )
Get the input stream for reading data from the HTTP response body.
SFCError GetStreamWriter( UInt32 size , SFXStreamWriterPtr result )
Get the output stream for writing data onto the HTTP request body.
SFCError GetStreamWriter( SFXStreamWriterPtr result )
Get the output stream for writing data onto the HTTP request body.
SFXRGBColor GetTextColor( Void )
Get the text color.
UInt32 GetTimeoutMillisecond( Void )
Get the connection timeout period. [in milliseconds]
UInt32 GetTrustMode( Void )
Get the SSL trust mode.
SFXAnsiStringConstRef GetUser( Void )
Get the user name of HTTP basic authentication.
SFXAnsiStringConstRef GetUserAgent( Void )
Get the user agent of the HTTP request header.
AEECLSID GetWebClassId( Void )
Get the web class ID to open the HTTP/HTTPS connection.
Bool IsBusy( Void )
Check whether or not the browser control is busy in accessing the network, or rendering.
Bool IsInlineEditEnable( Void )
Check whether the text is edited in some part of screen or not.
Bool IsScrollbarEnable( Void )
Check whether the scroll bar is enabled or not.
SFCError Load( SFBSourceSmpConstRef source , SFXAnsiStringConstRef url )
Start to render the data in the HTML format.
SFCError Load( SFBAStreamSmpConstRef stream , SFXAnsiStringConstRef url )
Start to render the data in the HTML format.
SFCError Load( SFXAnsiStringConstRef data , SFXAnsiStringConstRef url )
Start to render the data in the HTML format.
SFCError LoadCertificate( SInt32 kind , SFXPathConstRef path )
Load a ASN.1/DER form certificate file or buffer.
SFCError LoadCertificate( SInt32 kind , SFXBufferConstRef buffer )
Load a ASN.1/DER form certificate file or buffer.
SFCError Navigate( SFXAnsiStringConstRef url )
Get a page which is specified as url, and start to render the page.
SFCError Next( SInt32 n = 1 )
Move to the next page in specified history, get and render the page again.
SFCError Open( AEECLSID id = AEECLSID_WEB )
Open the HTTP connection.
SFCError Previous( SInt32 n = 1 )
Move to the previous page in specified history, get and render the page again.
Void Reload( Void )
Reload and render the current page.
SFCError SetAuthorizeData( SFXAnsiStringConstRef user , SFXAnsiStringConstRef passwd , SFXAnsiStringConstRef url )
Set the information of HTTP basic authentication.
SFCError SetIndent( SInt32 pixel )
Set the width of indent in pixels.
Void SetInlineEditEnable( Bool enable )
Set whether the text is edited in some part of screen or not.
SFCError SetLinkColor( SFXRGBColorConstRef color )
Set the color of link text.
SFCError SetMethod( SFXAnsiStringConstRef param )
Set the HTTP request method.
SFCError SetParagraphSpacing( SInt32 pixel )
Set the spacing between paragraphs in pixels.
SFCError SetProxyServer( SFXSocketAddressConstRef param )
Set the proxy server.
SFCError SetRequestContent( SFXFileConstRef file )
Set the HTTP request body of the HTTP connection to the specified storage or source.
SFCError SetRequestContent( SFXMemoryConstRef memory )
Set the HTTP request body of the HTTP connection to the specified storage or source.
SFCError SetRequestContent( SFXStorageConstRef storage , SInt32 length )
Set the HTTP request body of the HTTP connection to the specified storage or source.
SFCError SetRequestContent( SFBSourceSmpConstRef source , SInt32 length )
Set the HTTP request body of the HTTP connection to the specified storage or source.
SFCError SetRequestFlag( UInt32 param )
Set the HTTP request flag.
SFCError SetRequestHeader( SFXAnsiStringConstRef key , SFXAnsiStringConstRef value )
Set the HTTP request header.
Void SetScrollbarEnable( Bool enable )
Enable or disable the scroll bar.
SFCError SetScrollbarWidth( SInt32 pixel )
Set the width of scroll bar in pixels.
SFCError SetTextColor( SFXRGBColorConstRef color )
Set the text color.
Void SetTimeoutCallback( SFXCallback::CallbackSPP spp , VoidPtr reference )
Set the connection timeout callback.
Void SetTimeoutMillisecond( UInt32 msec )
Set the connection timeout period to the specified value. [in milliseconds]
SFCError SetTrustMode( UInt32 param )
Set the SSL trust mode.
SFCError SetUserAgent( SFXAnsiStringConstRef param )
Set the user agent.
Void SetWebClassId( AEECLSID id )
Set the web class ID to open the HTTP/HTTPS connection.
Void Stop( Void )
Stop rendering.
Void ClearHandler( Void ) (inherits from SFYResponder)
Unregister all handlers from this responder.
Void ClearTracer( Void ) (inherits from SFYResponder)
Unregister all dispatching rules from the tracer of this responder.
SFCError Distribute( SFXEventConstRef event , BoolPtr result = null ) (inherits from SFYResponder)
Distribute the specified event.
SFXRGBColorConstRef GetBackgroundColor( Void ) (inherits from SFYWidget)
Get the background color.
SFYResponderSmp GetChildBack( Void ) (inherits from SFYResponder)
Get the backmost child responder of this responder, which matches the specified search condition.
SFYResponderSmp GetChildBack( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the backmost child responder of this responder, which matches the specified search condition.
SFYResponderSmp GetChildBack( UInt32 id ) (inherits from SFYResponder)
Get the backmost child responder of this responder, which matches the specified search condition.
SFYResponderSmp GetChildBack( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the backmost child responder of this responder, which matches the specified search condition.
SFYResponderSmp GetChildBackward( SInt32 index ) (inherits from SFYResponder)
Get the child responder of this responder at the specified position from the back side, which matches the specified search condition.
SFYResponderSmp GetChildBackward( SInt32 index , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the child responder of this responder at the specified position from the back side, which matches the specified search condition.
SFYResponderSmp GetChildBackward( SInt32 index , UInt32 id ) (inherits from SFYResponder)
Get the child responder of this responder at the specified position from the back side, which matches the specified search condition.
SFYResponderSmp GetChildBackward( SInt32 index , UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the child responder of this responder at the specified position from the back side, which matches the specified search condition.
SInt32 GetChildCount( Void ) (inherits from SFYResponder)
Get the number of child responders of this responder, which match the specified search condition.
SInt32 GetChildCount( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the number of child responders of this responder, which match the specified search condition.
SInt32 GetChildCount( UInt32 id ) (inherits from SFYResponder)
Get the number of child responders of this responder, which match the specified search condition.
SInt32 GetChildCount( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the number of child responders of this responder, which match the specified search condition.
SFYResponderSmp GetChildForward( SInt32 index ) (inherits from SFYResponder)
Get the child responder of this responder at the specified position from the front side, which matches the specified search condition.
SFYResponderSmp GetChildForward( SInt32 index , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the child responder of this responder at the specified position from the front side, which matches the specified search condition.
SFYResponderSmp GetChildForward( SInt32 index , UInt32 id ) (inherits from SFYResponder)
Get the child responder of this responder at the specified position from the front side, which matches the specified search condition.
SFYResponderSmp GetChildForward( SInt32 index , UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the child responder of this responder at the specified position from the front side, which matches the specified search condition.
SFYResponderSmp GetChildFront( Void ) (inherits from SFYResponder)
Get the foremost child responder of this responder, which matches the specified search condition.
SFYResponderSmp GetChildFront( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the foremost child responder of this responder, which matches the specified search condition.
SFYResponderSmp GetChildFront( UInt32 id ) (inherits from SFYResponder)
Get the foremost child responder of this responder, which matches the specified search condition.
SFYResponderSmp GetChildFront( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the foremost child responder of this responder, which matches the specified search condition.
SInt32 GetCurrentValue( Void ) (inherits from SFYControl)
Get the current value of this control.
SFYDistributerPtr GetDistributer( Void ) (inherits from SFYResponder)
Get the distributer bound with this responder.
SFYResponderSmp GetFrame( Void ) (inherits from SFYResponder)
Get the frame which has been attached to this responder.
SFXRectangle GetGlobalBound( Void ) (inherits from SFYResponder)
Get the globle region of this responder.
UInt32 GetID( Void ) (inherits from SFYResponder)
Get the ID of this responder instance.
SFXRectangle GetLocalBound( Void ) (inherits from SFYResponder)
Get the local region of this responder.
SInt32 GetMaximumValue( Void ) (inherits from SFYControl)
Get the maximum value of this control.
SInt32 GetMinimumValue( Void ) (inherits from SFYControl)
Get the minimum value of this control.
SInt32 GetNthBackward( Void ) (inherits from SFYResponder)
Get the position counted from the back side of this responder among a group of sibling responders, which match the specified search condition.
SInt32 GetNthBackward( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the position counted from the back side of this responder among a group of sibling responders, which match the specified search condition.
SInt32 GetNthBackward( UInt32 id ) (inherits from SFYResponder)
Get the position counted from the back side of this responder among a group of sibling responders, which match the specified search condition.
SInt32 GetNthBackward( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the position counted from the back side of this responder among a group of sibling responders, which match the specified search condition.
SInt32 GetNthForward( Void ) (inherits from SFYResponder)
Get the position counted from the front side of this responder among a group of sibling responders, which match the specified search condition.
SInt32 GetNthForward( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the position counted from the front side of this responder among a group of sibling responders, which match the specified search condition.
SInt32 GetNthForward( UInt32 id ) (inherits from SFYResponder)
Get the position counted from the front side of this responder among a group of sibling responders, which match the specified search condition.
SInt32 GetNthForward( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Get the position counted from the front side of this responder among a group of sibling responders, which match the specified search condition.
SFYResponderSmp GetParent( Void ) (inherits from SFYResponder)
Get the parent responder of this responder.
Bool GetPropertyTransparent( Void ) (inherits from SFYResponder)
Get the transparency attribute of this responder.
SFXRectangleConstRef GetRealBound( Void ) (inherits from SFYResponder)
Get the real region of this responder.
VoidPtr GetReference( Void ) (inherits from SFYResponder)
Get the reference of this responder.
SFYRendererPtr GetRenderer( Void ) (inherits from SFYResponder)
Get the renderer bound with this responder.
SFYResponderSmp GetRoot( Void ) (inherits from SFYResponder)
Get the root responder.
Bool GetStateActive( Bool inherit = false ) (inherits from SFYResponder)
Get the active state of this responder.
Bool GetStateEnable( Bool inherit = false ) (inherits from SFYResponder)
Get the enable state of this responder.
Bool GetStateFocus( Bool inherit = false ) (inherits from SFYResponder)
Get the focus state of this responder.
Bool GetStateValid( Bool inherit = false ) (inherits from SFYResponder)
Get the valid state of this responder.
Bool GetStateVisible( Bool inherit = false ) (inherits from SFYResponder)
Get the visible state of this responder.
SFXRectangle GetSuitableBound( Void ) (inherits from SFYResponder)
Get the suitable region of this responder.
SFXRectangle GetSuitableBound( SFXRectangleConstRef rectangle ) (inherits from SFYResponder)
Get the suitable region of this responder.
SFXRectangle GetSuitableBound( SFXRectangleConstRef param , HorizontalEnum horizontal , VerticalEnum vertical ) (inherits from SFYResponder)
Get the suitable region of this responder.
SFXMargin GetSuitableMargin( Void ) (inherits from SFYResponder)
Get the suitable frame margin region of this responder.
SFCType GetType( Void ) (inherits from SFYResponder)
Get the type of this responder class.
SFXRectangleConstRef GetVirtualBound( Void ) (inherits from SFYResponder)
Get the virtual region of this responder.
Bool HasFrame( Void ) (inherits from SFYResponder)
Check whether or not this responder is a content-responder.
Void Initialize( Void ) (inherits from SFYResponder)
Initialize this responder.
Bool IsBack( Void ) (inherits from SFYResponder)
Check whether or not this responder is the backmost responder among a group of the sibling responders which match the specified search condition.
Bool IsBack( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Check whether or not this responder is the backmost responder among a group of the sibling responders which match the specified search condition.
Bool IsBack( UInt32 id ) (inherits from SFYResponder)
Check whether or not this responder is the backmost responder among a group of the sibling responders which match the specified search condition.
Bool IsBack( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Check whether or not this responder is the backmost responder among a group of the sibling responders which match the specified search condition.
Bool IsFrame( Void ) (inherits from SFYResponder)
Check whether or not this responder is an attachment-frame.
Bool IsFront( Void ) (inherits from SFYResponder)
Check whether or not this responder is the foremost responder among a group of the sibling responders which match the specified search condition.
Bool IsFront( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Check whether or not this responder is the foremost responder among a group of the sibling responders which match the specified search condition.
Bool IsFront( UInt32 id ) (inherits from SFYResponder)
Check whether or not this responder is the foremost responder among a group of the sibling responders which match the specified search condition.
Bool IsFront( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Check whether or not this responder is the foremost responder among a group of the sibling responders which match the specified search condition.
Bool IsNthBackward( SInt32 index ) (inherits from SFYResponder)
Check whether or not this responder is at the specified position from the back side among a group of the sibling responders which match the specified search condition.
Bool IsNthBackward( SInt32 index , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Check whether or not this responder is at the specified position from the back side among a group of the sibling responders which match the specified search condition.
Bool IsNthBackward( SInt32 index , UInt32 id ) (inherits from SFYResponder)
Check whether or not this responder is at the specified position from the back side among a group of the sibling responders which match the specified search condition.
Bool IsNthBackward( SInt32 index , UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Check whether or not this responder is at the specified position from the back side among a group of the sibling responders which match the specified search condition.
Bool IsNthForward( SInt32 index ) (inherits from SFYResponder)
Check whether or not this responder is at the specified position from the front side among a group of the sibling responders which match the specified search condition.
Bool IsNthForward( SInt32 index , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Check whether or not this responder is at the specified position from the front side among a group of the sibling responders which match the specified search condition.
Bool IsNthForward( SInt32 index , UInt32 id ) (inherits from SFYResponder)
Check whether or not this responder is at the specified position from the front side among a group of the sibling responders which match the specified search condition.
Bool IsNthForward( SInt32 index , UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Check whether or not this responder is at the specified position from the front side among a group of the sibling responders which match the specified search condition.
Bool IsRoot( Void ) (inherits from SFYResponder)
Check whether or not this responder is the root responder.
SFCError Recover( Void ) (inherits from SFYResponder)
Recover the intersection region between this responder and the responder space by using the saved bitmap to restore the device bitmap.
SFCError RegisterHandler( SFXEventRangeConstRef range , SFYHandler::RuleRecConstRef rule ) (inherits from SFYResponder)
Register specified handlers into this responder.
SFCError RegisterHandler( SFXEventRangeConstRef range , SFYHandler::HandlerSPP spp , VoidPtr reference ) (inherits from SFYResponder)
Register specified handlers into this responder.
SFCError RegisterHandler( SFXEventRangeConstPtr range , SFYHandler::RuleRecConstPtr rule , SInt32 length ) (inherits from SFYResponder)
Register specified handlers into this responder.
SFCError RegisterHandler( SFXEventRangeConstPtr range , SFYHandler::HandlerSPPConstPtr spp , VoidPtrConstPtr reference , SInt32 length ) (inherits from SFYResponder)
Register specified handlers into this responder.
SFCError RegisterTracer( SFXEventRangeConstRef range , SFYTracer::RuleRecConstRef rule ) (inherits from SFYResponder)
Register specified dispatching rules into the tracer of this responder.
SFCError RegisterTracer( SFXEventRangeConstRef range , SFYTracer::OrderEnum order , SFYTracer::StateEnum state , Bool overload ) (inherits from SFYResponder)
Register specified dispatching rules into the tracer of this responder.
SFCError RegisterTracer( SFXEventRangeConstPtr range , SFYTracer::RuleRecConstPtr rule , SInt32 length ) (inherits from SFYResponder)
Register specified dispatching rules into the tracer of this responder.
SFCError RegisterTracer( SFXEventRangeConstPtr range , SFYTracer::OrderEnumConstPtr order , SFYTracer::StateEnumConstPtr state , BoolConstPtr overload , SInt32 length ) (inherits from SFYResponder)
Register specified dispatching rules into the tracer of this responder.
SFCError Render( Bool force = false ) (inherits from SFYResponder)
Boot up the renderer for redrawing this responder and its descendant responders.
Void SetBackgroundColor( SFXRGBColorConstRef param ) (inherits from SFYWidget)
Set the background color to the specified value.
Void SetCurrentValue( SInt32 param ) (inherits from SFYControl)
Set the current value of this control to the specified value.
Void SetDistributer( SFYDistributerPtr param ) (inherits from SFYResponder)
Bind this responder with the specified distributer.
SFCError SetFrame( SFYResponderSmpConstRef param ) (inherits from SFYResponder)
Attach the specified frame to this frame.
Void SetID( UInt32 param ) (inherits from SFYResponder)
Set the ID value of this responder to the specified value.
Void SetMaximumValue( SInt32 param ) (inherits from SFYControl)
Set the maximum value of the control to the specified value.
Void SetMinimumValue( SInt32 param ) (inherits from SFYControl)
Set the minimum value of the control to the specified value.
SFCError SetParent( SFYResponderSmpConstRef param ) (inherits from SFYResponder)
Set the parent responder of this responder to the specified responder.
Void SetProperty( Bool transparent ) (inherits from SFYResponder)
Set the property of this responder to the specified value.
Void SetPropertyTransparent( Bool param ) (inherits from SFYResponder)
Set the transparency attribute of this responder to the specified value.
Void SetRealBound( SFXRectangleConstRef param ) (inherits from SFYResponder)
Set the real region of this responder to the specified region.
Void SetReference( VoidPtr param ) (inherits from SFYResponder)
Set the reference value of this responder to the specified value.
Void SetRenderer( SFYRendererPtr param ) (inherits from SFYResponder)
Bind this responder with the specified renderer.
Void SetState( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Set all states of this responder to specified values together.
Void SetStateActive( Bool param ) (inherits from SFYResponder)
Set the active state of this responder to the specified value.
Void SetStateEnable( Bool param ) (inherits from SFYResponder)
Set the enable state of this responder to the specified value.
Void SetStateFocus( Bool param ) (inherits from SFYResponder)
Set the focus state of this responder to the specified value.
Void SetStateVisible( Bool param ) (inherits from SFYResponder)
Set the visible state of this responder to the specified value.
Void SetVirtualBound( SFXRectangleConstRef param ) (inherits from SFYResponder)
Set the virtual region of this responder to the specified value.
SFCError Snapshot( SFBBitmapSmpConstRef bitmap ) (inherits from SFYResponder)
Get a snapshot image of the intersection region between this responder and the responder space by using the saved bitmap.
Void Terminate( Void ) (inherits from SFYResponder)
Terminate this responder.
Void ToBack( Void ) (inherits from SFYResponder)
Move this responder to the backmost position among a group of the sibling responders which match the specified search condition.
Void ToBack( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Move this responder to the backmost position among a group of the sibling responders which match the specified search condition.
Void ToBack( UInt32 id ) (inherits from SFYResponder)
Move this responder to the backmost position among a group of the sibling responders which match the specified search condition.
Void ToBack( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Move this responder to the backmost position among a group of the sibling responders which match the specified search condition.
Void ToFront( Void ) (inherits from SFYResponder)
Move this responder to the foremost position among a group of the sibling responders which match the specified search condition.
Void ToFront( Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Move this responder to the foremost position among a group of the sibling responders which match the specified search condition.
Void ToFront( UInt32 id ) (inherits from SFYResponder)
Move this responder to the foremost position among a group of the sibling responders which match the specified search condition.
Void ToFront( UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Move this responder to the foremost position among a group of the sibling responders which match the specified search condition.
Void ToNthBackward( SInt32 index ) (inherits from SFYResponder)
Move this responder to the specified position from the back side among a group of the sibling responders which match the specified search condition.
Void ToNthBackward( SInt32 index , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Move this responder to the specified position from the back side among a group of the sibling responders which match the specified search condition.
Void ToNthBackward( SInt32 index , UInt32 id ) (inherits from SFYResponder)
Move this responder to the specified position from the back side among a group of the sibling responders which match the specified search condition.
Void ToNthBackward( SInt32 index , UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Move this responder to the specified position from the back side among a group of the sibling responders which match the specified search condition.
Void ToNthForward( SInt32 index ) (inherits from SFYResponder)
Move this responder to the specified position from the front side among a group of the sibling responders which match the specified search condition.
Void ToNthForward( SInt32 index , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Move this responder to the specified position from the front side among a group of the sibling responders which match the specified search condition.
Void ToNthForward( SInt32 index , UInt32 id ) (inherits from SFYResponder)
Move this responder to the specified position from the front side among a group of the sibling responders which match the specified search condition.
Void ToNthForward( SInt32 index , UInt32 id , Bool visible , Bool active , Bool enable , Bool focus ) (inherits from SFYResponder)
Move this responder to the specified position from the front side among a group of the sibling responders which match the specified search condition.
Void UnregisterHandler( SFXEventRangeConstRef range , SFYHandler::RuleRecConstRef rule ) (inherits from SFYResponder)
Unregister the handler from this responder which matches the specified condition.
Void UnregisterHandler( SFXEventRangeConstRef range , SFYHandler::HandlerSPP spp , VoidPtr reference ) (inherits from SFYResponder)
Unregister the handler from this responder which matches the specified condition.
Void UnregisterHandler( SFXEventRangeConstPtr range , SFYHandler::RuleRecConstPtr rule , SInt32 length ) (inherits from SFYResponder)
Unregister the handler from this responder which matches the specified condition.
Void UnregisterHandler( SFXEventRangeConstPtr range , SFYHandler::HandlerSPPConstPtr spp , VoidPtrConstPtr reference , SInt32 length ) (inherits from SFYResponder)
Unregister the handler from this responder which matches the specified condition.
Void UnregisterTracer( SFXEventRangeConstRef range ) (inherits from SFYResponder)
Unregister the dispatching rule from the tracer of this responder which matches the specified condition.
Void UnregisterTracer( SFXEventRangeConstPtr range , SInt32 length ) (inherits from SFYResponder)
Unregister the dispatching rule from the tracer of this responder which matches the specified condition.
T const & static_catch( Void ) (inherits from static_exception)
Get the current exception.
Protected Functions
Void DoneNotifyHandler( NotifyRef notify )
[Handler] Notify the end of rendering.
Void FocusNotifyHandler( NotifyRef notify )
[Handler] Notify the movement of the cursor.
Void HandleBoundVirtual( Void )
This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) event is received. [Perform the processing when the virtual region is changed.]
Void HandleError( SFCError error )
Called when a fatal error occurs.
Void HandleRenderRequest( SFXGraphicsPtr graphics )
This function will be called when the (SFEVT_RESPONDER_RENDER, SFP16_RENDER_REQUEST) event is received. [Draw this responder.]
Void JumpNotifyHandler( NotifyRef notify )
[Handler] Notify when the link is pressed.
Void ResponseNotifyHandler( NotifyRef notify )
[Handler] Notify that the server connection completes.
static
SFYResponderSmp
Factory( SFYResponderPtr responder , SFCErrorPtr exception = null ) (inherits from SFYResponder)
This function is used to implement the NewInstance function.
SFYResponderSmp GetThis( Void ) (inherits from SFYResponder)
Get the smart pointer of this responder.
Void HandleBoundGlobal( SFXRectangleConstRef rectangle ) (inherits from SFYWidget)
This function will be called when the global region is changed.
Void HandleBoundOptimize( SFXRectanglePtr rectangle ) (inherits from SFYWidget)
This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_OPTIMIZE) event is received. [Calculate the suitable rectangle size of this responder within the specified hint rectangle.]
Void HandleBoundReal( Void ) (inherits from SFYControl)
This function will be called when the real region is changed.
Void HandleBoundRequest( SFXRectanglePtr rectangle ) (inherits from SFYWidget)
This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_REQUEST) event is received. [Calculate the suitable rectangle size of this responder.]
Void Invalidate( Void ) (inherits from SFYResponder)
Register the specified redraw region of this responder.
Void Invalidate( SFXRectangleConstRef param ) (inherits from SFYResponder)
Register the specified redraw region of this responder.
Void InvokeBackward( SFXEventConstRef event , Bool overload , BoolPtr result = null ) (inherits from SFYResponder)
Call the handlers for the specified event from the end of the handler list registered into this responder.
Void InvokeForward( SFXEventConstRef event , Bool overload , BoolPtr result = null ) (inherits from SFYResponder)
Call the handlers for the specified event from the head of the handler list registered into this responder.
Void SetType( SFCType param ) (inherits from SFYResponder)
Set the Type value of this responder to the specified 4-character value.
Void static_throw( static_exception< T > const & param ) (inherits from static_exception)
Set an exception.
Void static_throw( T const & param ) (inherits from static_exception)
Set an exception.
Bool static_try( Void ) (inherits from static_exception)
Confirm whether or not the exception is retained.
Types
CodeEnum
Constant that represents the SFZWebBrowserControl class.
Notify
Browser notification struct.
HorizontalEnum (inherits from SFYResponder)
Constants that represent the horizontal alignment.
VerticalEnum (inherits from SFYResponder)
Constants that represent the vertical alignment.

SFZWebBrowserControl::SFZWebBrowserControl
Constructor of the SFZWebBrowserControl class.
[ protected, explicit ]
SFZTabControl(Void);

Internal Implementation

Internal implementation of this constructor is as follows:

/*protected */SFZWebBrowserControl::SFZWebBrowserControl(Void) static_throws
{
    static SFXEventRange::AtomRecConst          range[] = {
        { SFEVT_RESPONDER_BROWSER_NOTIFY, SFEVT_RESPONDER_BROWSER_NOTIFY, SFP16_BEGIN, SFP16_END }
    };
    SFYHandler::RuleRec                         rule[lengthof(range)];
    SFCError                                    error;

    if (static_try()) {
        SetType(CODE_TYPE);
        if ((_widget = SFYWebBrowserWidget::NewInstance(&error)) != null) {
            static_throw(_widget->SetParent(GetThis()));
            if (static_try()) {
                rule[0].spp = XANDLER_FUNCTION(OnNotify);
                rule[0].reference = this;
                static_throw(_widget->RegisterHandler(atomic_cast(range), rule, lengthof(range)));
                if (static_try()) {
                    _widget->SetState(true, true, true, true);
                }
            }
        }
        else {
            static_throw(error);
        }
    }
}// SFZWebBrowserControl::SFZWebBrowserControl //

/*private */XANDLER_IMPLEMENT_VOIDBROWSERNOTIFY(SFZWebBrowserControl, OnNotify, invoker, reason, notify)
{
    switch (reason) {
        case SFYWebBrowserWidget::NOTIFY_RESPONSE:
            ResponseNotifyHandler(*notify);
            break;
        case SFYWebBrowserWidget::NOTIFY_DONE:
            DoneNotifyHandler(*notify);
            break;
        case SFYWebBrowserWidget::NOTIFY_JUMP_SUBMIT:
            JumpNotifyHandler(*notify);
            break;
        case SFYWebBrowserWidget::NOTIFY_FOCUS:
            FocusNotifyHandler(*notify);
            break;
        case SFYWebBrowserWidget::NOTIFY_PAGE_DONE:
            break;
        case SFYWebBrowserWidget::NOTIFY_CONTENT_DONE:
            break;
        case SFYWebBrowserWidget::NOTIFY_FATAL_ERROR:
            HandleError(notify->u.nDone);
            break;
    }
    return;
}// XANDLER_IMPLEMENT_VOIDBROWSERNOTIFY(OnNotify) //

Reference

SFYWebBrowserWidget | SFYWebBrowserWidget::NotifyEnum | SFZWebBrowserControl::ResponseNotifyHandler | SFZWebBrowserControl::DoneNotifyHandler | SFZWebBrowserControl::JumpNotifyHandler | SFZWebBrowserControl::FocusNotifyHandler | SFZWebBrowserControl::HandleError


SFZWebBrowserControl::~SFZWebBrowserControl
Destructor of the SFZWebBrowserControl class.
[ public, virtual ]
~SFZWebBrowserControl(Void);

Description

Nothing is done.


SFZWebBrowserControl::AdjustViewer
Adjust the region of the internal IHTMLViewer instance.
[ public ]
Bool AdjustViewer(Void);

Return value

  • If the region is changed: true
  • Otherwise: false

Description

This function adjusts the region of the internal IHTMLViewer instance.

This function is automatically called when the real region or the virtual region of this responder is changed.

When the global region of this responder is changed by other factors, explicit calling is necessary.


SFZWebBrowserControl::Cancel
Cancel to connect to the Web server.
[ public ]
Void Cancel(Void);

Description

This function cancels to connect to the Web server.

The registered callback and the connection timeout timer will be canceled, and the state of the HTTP connection will be restored before connecting, if called.

In general, this function is effective in the SFXHTTPConnection::STATE_CONNECT state.

This function is called in the SFZWebBrowserControl::Close function.

Reference

SFZWebBrowserControl::Close | SFZWebBrowserControl::SetTimeoutMillisecond | SFZWebBrowserControl::SetTimeoutCallback


SFZWebBrowserControl::ClearHistory
Clear the history list.
[ public ]
Void ClearHistory(Void);

Description

This function clears the history list.


SFZWebBrowserControl::Close
Close the HTTP connection.
[ public ]
Void Close(Void);

Description

This function closes the HTTP connection.

This HTTP connection transits into the SFXHTTPConnection::STATE_CLOSE state.

Concretely, the following processings will be performed.

  1. Initialize the content of the HTTP request.
  2. Release the SFBWeb / SFBWebResp instance that this HTTP connection contains internally.
  3. Cancel the callback registered into this HTTP connection.
  4. Initialize the content of the HTTP response.
  5. Transit into the SFXHTTPConnection::STATE_CLOSE state.
[Note] Note

This function is called in the SFZWebBrowserControl::~SFZWebBrowserControl destructor.

This function calls the SFZWebBrowserControl::Cancel function internally.

Reference

SFZWebBrowserControl::~SFZWebBrowserControl | SFZWebBrowserControl::Open | SFZWebBrowserControl::Cancel | SFZWebBrowserControl::GetSFBWeb | SFZWebBrowserControl::GetSFBWebResp


SFZWebBrowserControl::DoneNotifyHandler
[Handler] Notify the end of rendering.
[ protected, virtual ]
Void DoneNotifyHandler(
    NotifyRef notify   // the notify
);

Argument

notify

BREW error code is notified as "notify.u.nDone".

Description

By default nothing happens when the SFZWebBrowserControl::DoneNotifyHandler function is called.

To do something through this function, it is necessary to override the SFZWebBrowserControl::DoneNotifyHandler function.

Example

The code below is to override this function.

#include <SFZResponder/SFZControl/SFZBrowserControl/SFZWebBrowserControl.hpp>

SFMTYPEDEFRESPONDER(MyBrowserControl)
class MyBrowserControl : public SFZWebBrowserControl {
    SFBSEALRESPONDER(MyBrowserControl)
    SFMRESPONDERINSTANTIATEFOUR(MyBrowserControl, SFZWebBrowserControl, SFYControl, SFYWidget, SFYResponder)
public:
    static MyBrowserControlSmp NewInstance(SFCErrorPtr exception = null);
protected:
    explicit MyBrowserControl(Void) static_throws;
    virtual ~MyBrowserControl(Void);
    virtual Void DoneNotifyHandler(NotifyRef notify) {
        if (notify.u.nDone != SFERR_NO_ERROR) {
            // handle error
        }
    }
};

Internal Implementation

Internal implementation of this function is as follows:

/*protected virtual */Void SFZWebBrowserControl::DoneNotifyHandler(NotifyRef notify)
{
    unused(notify);
    return;
}// SFZWebBrowserControl::DoneNotifyHandler //

Reference

SFZWebBrowserControl::Notify | SFZWebBrowserControl::FocusNotifyHandler | SFZWebBrowserControl::JumpNotifyHandler | SFZWebBrowserControl::ResponseNotifyHandler


SFZWebBrowserControl::FindElement
Find the specified element in the current page.
[ public, const ]
SInt32 FindElement(
    ACharConstPtr element   // name of the element
    SInt32 no               // number of the element
);

Argument

element

Specify the name of the element to find.

no

Specify the index of the element to find.

If set to 0, the first matching element is returned. If set to n, the (n+1)th matching element is returned.

Return value

Return the index of specified element when found. Return a minus value when not found.

Description

The SFZWebBrowserControl::FindElement function is used to search the specified element in the current page. The index of specified element that is found can be used in the SFZWebBrowserControl::GetElementText function.

Reference

SFZWebBrowserControl::GetElementText


SFZWebBrowserControl::FocusNotifyHandler
[Handler] Notify the movement of the cursor.
[ protected, virtual ]
Void FocusNotifyHandler(
    NotifyRef notify   // notification
);

Argument

notify

This argument is the notification. It gets the current position, type and status of the tag that the cursor is pointing to.

Description

It does nothing in a standard implement.

If does something outside the standard, users need to override the SFZWebBrowserControl::FocusNotifyHandler function.

Internal Implementation

Internal implementation of this function is as follows:

/*protected virtual */Void SFZWebBrowserControl::FocusNotifyHandler(NotifyRef notify)
{
    unused(notify);
    return;
}// SFZWebBrowserControl::FocusNotifyHandler //

Reference

SFZWebBrowserControl::Notify | SFZWebBrowserControl::DoneNotifyHandler | SFZWebBrowserControl::JumpNotifyHandler | SFZWebBrowserControl::ResponseNotifyHandler


SFZWebBrowserControl::GetBaseUrl
Get the base URL of HTTP basic authentication.
[ public, const ]
SFXAnsiStringConstRef GetBaseUrl(Void);

Return value

Base URL of HTTP basic authentication

Description

Get the base URL of HTTP basic authentication.

The value which is set by the SFZWebBrowserControl::SetAuthorizeData function is gotten.

Reference

SFZWebBrowserControl::SetAuthorizeData


SFZWebBrowserControl::GetContentEncoding
Get the value of the Content-Encoding field of the HTTP response header.
[ public, const ]
SFXAnsiStringConstRef GetContentEncoding(Void);

Return value

Value of the Content-Encoding field of the HTTP response header

Description

This function gets the value of the Content-Encoding field of the HTTP response header.

If the HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state, the empty string(SFXAnsiString::EmptyInstance()) will be returned.

Reference

SFXAnsiString


SFZWebBrowserControl::GetContentLength
Get the value of the Content-Length field of the HTTP response header.
[ public, const ]
SInt32 GetContentLength(Void);

Return value

Value of the Content-Length field of the HTTP response header

Description

This function gets the value of the Content-Length field of the HTTP response header.

If the Content-Length field of the HTTP response header does not exist or the HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state, -1 will be returned.


SFZWebBrowserControl::GetContentType
Get the value of the Content-Type field of the HTTP response header.
[ public, const ]
SFXAnsiStringConstRef GetContentType(Void);

Return value

Value of the Content-Type field of the HTTP response header

Description

This function gets the value of the Content-Type field of the HTTP response header of the HTTP connection.

If the HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state, the empty string(SFXAnsiString::EmptyInstance()) will be returned.

Reference

SFXAnsiString


SFZWebBrowserControl::GetCurrentTitle
Get the title of the current page.
[ public, const ]
SFXAnsiStringConstRef GetCurrentTitle(Void);

Return value

Tite of the current page

Description

This function gets the title of the current page.

Reference

SFZWebBrowserControl::GetCurrentURL


SFZWebBrowserControl::GetCurrentURL
Get the URL of the current page.
[ public, const ]
SFXAnsiStringConstRef GetCurrentURL(Void);

Return value

URL of the current page

Description

This function gets the URL of the current page.

Reference

SFZWebBrowserControl::GetCurrentTitle


SFZWebBrowserControl::GetDate
Get the value of the Date field of the HTTP response header.
[ public, const ]
SFXDate GetDate(Void);

Return value

Value of the Date field of the HTTP response header as the SFXDate) instance

Description

This function gets the value of the Date field of the HTTP response header as the SFXDate) instance.

If the Date field of the HTTP response header does not exist or the HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state, SFXDate(0) will be returned.

Reference

SFXDate


SFZWebBrowserControl::GetElementText
Get the text of the specified element.
[ public, const ]
SFXAnsiString GetElementText(
    SInt32 elementIndex   // index of the element
);

Argument

elementIndex

Specify the index of the element returned by the SFZWebBrowserControl::FindElement function.

Return value

Content of the element. If the specified element is empty, an empty string is returned.

Description

Get the text of the specified element in the current page.

Reference

SFZWebBrowserControl::FindElement


SFZWebBrowserControl::GetExpires
Get the value of the Expires field of the HTTP response header.
[ public, const ]
SFXDate GetExpires(Void);

Return value

Value of the Expires field of the HTTP response header as the SFXDate) instance

Description

This function gets the value of the Expires field of the HTTP response header as the SFXDate) instance.

If the Expires field of the HTTP response header does not exist or the HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state, SFXDate(0) will be returned.

Reference

SFXDate


SFZWebBrowserControl::GetIndent
Get the width of indent.
[ public, const ]
SInt32 GetIndent(Void);

Return value

Width of specified indent in pixels.

Reference

SFZWebBrowserControl::SetIndent


SFZWebBrowserControl::GetLastModified
Get the value of the Last-Modified field of the HTTP response header.
[ public, const ]
SFXDate GetLastModified(Void);

Return value

Value of the Last-Modified field of the HTTP response header as the SFXDate) instance

Description

This function gets the value of the Last-Modified field of the HTTP response header as the SFXDate) instance.

If the Last-Modified field of the HTTP response header does not exist or the HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state, SFXDate(0) will be returned.

Reference

SFXDate


SFZWebBrowserControl::GetLinkColor
Get the color of link text.
[ public, const ]
SFXRGBColor GetLinkColor(Void);

Return value

Color of the link text.

Reference

SFZWebBrowserControl::SetLinkColor | SFZWebBrowserControl::GetTextColor


SFZWebBrowserControl::GetMethod
Get the HTTP request method.
[ public, const ]
SFXAnsiStringConstRef GetMethod(Void);

Return value

HTTP request method of this HTTP connection

Description

This function gets the HTTP request method of this HTTP connection set with the SFZWebBrowserControl::SetMethod function.

If this HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state, the empty string(SFXAnsiString::EmptyInstance()) will be returned.

Reference

SFZWebBrowserControl::SetMethod | SFZWebBrowserControl::Open | SFXAnsiString


SFZWebBrowserControl::GetParagraphSpacing
Get the spacing between paragraphs.
[ public, const ]
SInt32 GetParagraphSpacing(Void);

Return value

Space between paragraphs in pixels.

Reference

SFZWebBrowserControl::SetParagraphSpacing


SFZWebBrowserControl::GetPassword
Get the password of HTTP basic authentication.
[ public, const ]
SFXAnsiStringConstRef GetPassword(Void);

Return value

Password of HTTP basic authentication

Description

Get the password of HTTP basic authentication.

The value which is set by the SFZWebBrowserControl::SetAuthorizeData function is gotten.

Reference

SFZWebBrowserControl::SetAuthorizeData


SFZWebBrowserControl::GetProxyServer
Get the proxy server.
[ public, const ]
SFXSocketAddressConstRef GetProxyServer(Void);

Return value

Proxy server of this HTTP connection

Description

This function gets the proxy server of this HTTP connection set with the SFZWebBrowserControl::SetProxyServer function.

If this HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state, or the proxy server of the HTTP connection has not been set, SFXSocketAddress::EmptyInstance() will be returned.

Reference

SFZWebBrowserControl::SetProxyServer | SFXSocketAddress


SFZWebBrowserControl::GetRequestContent
Get the SFBSource instance that manages the HTTP request body.
[ public, const ]
SFBSourceSmpConstRef GetRequestContent(Void);

Return value

SFBSource instance that manages the HTTP request body of the HTTP connection

Description

This function gets the SFBSource instance that manages the HTTP request body of the HTTP connection, which is set with the SFZWebBrowserControl::SetRequestContent function.

If the HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state, or the SFBSource instance has not been set, &SFBSourceSmp::EmptyInstance() will be returned.

Reference

SFZWebBrowserControl::SetRequestContent | SFBSource


SFZWebBrowserControl::GetRequestFlag
Get the HTTP request flag.
[ public, const ]
UInt32 GetRequestFlag(Void);

Return value

HTTP request flag of this HTTP connection

Description

This function gets the HTTP request flag set with the SFZWebBrowserControl::SetRequestFlag function.

If the HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state, 0 will be returned.

Reference

SFZWebBrowserControl::SetRequestFlag | SFZWebBrowserControl::Open | BREW API IWEB_GetResponse


SFZWebBrowserControl::GetRequestHeader
Get the HTTP request header.
[ public, const ]
SFXAnsiStringConstRef GetRequestHeader(
    SFXAnsiStringConstRef key   // field name
);
[ public, const ]
SFXPropertyConstRef GetRequestHeader(Void);

Return value

HTTP request header of this HTTP connection

Description

This function gets the HTTP request header of the HTTP connection set with the SFZWebBrowserControl::SetRequestHeader function. It is possible to get the value of the field specified in the argument. If nothing is specified, all of the HTTP request header will be obtained.

If the HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state, or the specified field of the HTTP request header or itself has not been set, the empty string(SFXAnsiString::EmptyInstance()) or the empty property(SFXProperty::EmptyInstance()) will be returned.

Reference

SFZWebBrowserControl::SetRequestHeader | SFXProperty | SFXAnsiString


SFZWebBrowserControl::GetResponseContent
Get the SFBSource instance that manages the HTTP response body.
[ public, const ]
SFBSourceSmpConstRef GetResponseContent(Void);

Return value

SFBSource instance that manages the HTTP response body

Description

This function gets the SFBSource instance that manages the HTTP response body of the HTTP connection.

If the HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state, SFBSourceSmp::EmptyInstance() will be returned.

[Tip] Tip
After the HTTP connection is established, the HTTP response body can be obtained using this function.
[Note] Note

The SFZWebBrowserControl::GetStreamReader function gets the stream from the SFBSource instance, return value of the SFZWebBrowserControl::GetResponseContent function.

[Caution] Reading the HTTP response body

If the HTTP response body is read by using the SFZWebBrowserControl::GetResponseContent function, the SFZWebBrowserControl::GetStreamReader function cannot be used.

On the contrary, if the HTTP response body is read by using the SFZWebBrowserControl::GetStreamReader function, the SFZWebBrowserControl::GetResponseContent function cannot be used.

Reference

SFZWebBrowserControl::GetStreamReader | SFBSource


SFZWebBrowserControl::GetResponseFlag
Get the HTTP response flag.
[ public, const ]
UInt32 GetResponseFlag(Void);

Return value

HTTP response flag of this HTTP connection

Description

This function gets the HTTP response flag of the HTTP connection.

The HTTP response flag can be represented as logical sum of the following flags:

  • WEBRESPONSE_REDIRECTED: redirection was handled by IWeb (Unimplemented by BREW's HTTP protocol engine)
  • WEBRESPONSE_COOKIES:cookies were sent in the request (Unimplemented by BREW's HTTP protocol engine)
  • WEBRESPONSE_CACHED: retrieved from local cache (no network activity)
  • WEBRESPONSE_KEEPALIVE: connection kept alive
  • WEBRESPONSE_HTTP09: got an HTTP0.9 response (so there were no HTTP headers; and the WebRespInfo. nCode == 200 was fabricated
  • WEBRESPONSE_LOCAL: locally-generated content (no network activity)
  • WEBRESPONSE_PROXIED: gotten through a proxy
  • WEBRESPONSE_AUTHBASIC: basic authentication info was sent. (Unimplemented by BREW's HTTP protocol engine)

If this HTTP connection is not in the STATE_OPEN_ESTABLISHED state, 0 will be returned.

Reference

SFZWebBrowserControl::SetRequestFlag | SFBWebResp | BREW API IWEBRESP_GetOpt


SFZWebBrowserControl::GetResponseHeader
Get the HTTP response header.
[ public, const ]
SFXAnsiStringConstRef GetResponseHeader(
    SFXAnsiStringConstRef key   // field name
);
[ public, const ]
SFXPropertyConstRef GetResponseHeader(Void);

Return value

HTTP response header of this HTTP connection

Description

This function gets the HTTP response header of the HTTP connection set with the SFZWebBrowserControl::SetRequestHeader function. It is possible to get the value of the field specified in the argument. If nothing is specified, all of the HTTP response header will be obtained.

If the HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state, or the specified field of the HTTP response header or itself has not been set, the empty string(SFXAnsiString::EmptyInstance()) or the empty property(SFXProperty::EmptyInstance()) will be returned.

Reference

SFXProperty | SFXAnsiString


SFZWebBrowserControl::GetResultCode
Get the HTTP status code.
[ public, const ]
SInt32 GetResultCode(Void);

Return value

HTTP status code of this HTTP connection.

Description

This function gets the HTTP status code of the HTTP connection.

If the HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state, -1 will be returned.

If the HTTP connection has been established, the return value of this function is same as the nCode field of BREW API's WebRespInfo.

nCode represents either a protocol error code or a *negative* WEB_ERROR (see AEEError.h for codes), use WEB_ERROR_MAP(nCode) to map to AEE error, and WEB_ERROR_SUCCEEDED(nCode) to test for success. A positive number is one that was returned by the server, negative error codes are system errors.

[Note] Note
For more details on WEB_ERROR, see AEEError.h.

Reference

BREW API WebRespInfo | BREW API WEB_ERROR_MAP | BREW API WEB_ERROR_SUCCEEDED


SFZWebBrowserControl::GetSFBWeb
Get the SFBWeb instance managed internally by the HTTP connection.
[ public, const ]
SFBWebSmpConstRef GetSFBWeb(Void);

Return value

SFBWeb instance managed internally by the HTTP connection.

Description

This function gets the SFBWeb instance managed internally by the HTTP connection.

Reference

SFBWeb | BREW API IWeb


SFZWebBrowserControl::GetSFBWebResp
Get the SFBWebResp instance managed internally by the HTTP connection.
[ public, const ]
SFBWebRespSmpConstRef GetSFBWebResp(Void);

Return value

SFBWebResp instance managed internally by the HTTP connection.

Description

This function gets the SFBWebResp instance managed internally by the HTTP connection.

Reference

SFBWebResp | BREW API IWebResp


SFZWebBrowserControl::GetScrollbarWidth
Get the width of scroll bar.
[ public, const ]
SInt32 GetScrollbarWidth(Void);

Return value

Width of scroll bar in pixels.

Reference

SFZWebBrowserControl::SetScrollbarWidth


SFZWebBrowserControl::GetStreamReader
Get the input stream for reading data from the HTTP response body.
[ public ]
SFCError GetStreamReader(
    UInt32 size                 // buffer size
    SFXStreamReaderPtr result   // pointer to the input stream
);
[ public ]
SFCError GetStreamReader(
    SFXStreamReaderPtr result   // pointer to the input stream
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the result argument is null: SFERR_INVALID_PARAM
  • If this HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state: SFERR_INVALID_STATE
  • If insufficient memory: SFERR_NO_MEMORY

Description

This function gets the input stream for reading data from the HTTP response body of this HTTP connection.

If the size argument is specified, the buffer size of the input stream will be fixed with the specified value. Otherwise, the buffer size will be variable and the SFXElasticStreamReader class will be used internally.

[Tip] Tip
You have to use the SFXBinaryStreamReader, SFXAnsiStringStreamReader, or SFXWideStringStreamReader class for the input stream properly depending on the type of data to be read.
[Caution] Reading the HTTP response body

If the HTTP response body is read by using the SFZWebBrowserControl::GetResponseContent function, the SFZWebBrowserControl::GetStreamReader function cannot be used.

On the contrary, if the HTTP response body is read by using the SFZWebBrowserControl::GetStreamReader function, the SFZWebBrowserControl::GetResponseContent function cannot be used.

[Note] Note
This function is valid if and only if the HTTP connection is in the SFXHTTPConnection::STATE_OPEN state.

Reference

SFZWebBrowserControl::GetResponseContent | SFXBinaryStreamReader | SFXAnsiStringStreamReader | SFXWideStringStreamReader | Stream Buffer


SFZWebBrowserControl::GetStreamWriter
Get the output stream for writing data onto the HTTP request body.
[ public ]
SFCError GetStreamWriter(
    UInt32 size                 // buffer size
    SFXStreamWriterPtr result   // pointer to the output stream
);
[ public ]
SFCError GetStreamWriter(
    SFXStreamWriterPtr result   // pointer to the output stream
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the result argument is null: SFERR_INVALID_PARAM
  • If the HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state: SFERR_INVALID_STATE
  • If insufficient memory: SFERR_NO_MEMORY

Description

This function gets the output stream for writing data onto the HTTP request body of the HTTP connection.

If the size argument is specified, the buffer size of the output stream will be fixed with the specified value. Otherwise, the buffer size will be variable and the SFXElasticStreamWriter class will be used internally.

[Tip] Tip
You have to use the SFXBinaryStreamWriter, SFXAnsiStringStreamWriter, or SFXWideStringStreamWriter class for the output stream properly depending on the type of data to write.
[Caution] Writing the HTTP response body

If the HTTP response body is set with the SFZWebBrowserControl::SetRequestContent function, the SFZWebBrowserControl::GetStreamWriter function cannot be used.

On the contrary, if the HTTP response body is written by using the SFZWebBrowserControl::GetStreamWriter function, the SFZWebBrowserControl::SetRequestContent function cannot be used.

[Note] Note
This function is valid if and only if the HTTP connection is in the SFXHTTPConnection::STATE_OPEN state.

Reference

SFZWebBrowserControl::GetStreamReader | SFZWebBrowserControl::SetRequestContent | SFZWebBrowserControl::Open | SFXBinaryStreamWriter | SFXAnsiStringStreamWriter | SFXWideStringStreamWriter | Stream Buffer


SFZWebBrowserControl::GetTextColor
Get the text color.
[ public, const ]
SFXRGBColor GetTextColor(Void);

Return value

Text color of HTML.

Reference

SFZWebBrowserControl::SetTextColor | SFZWebBrowserControl::GetLinkColor


SFZWebBrowserControl::GetTimeoutMillisecond
Get the connection timeout period. [in milliseconds]
[ public, const ]
UInt32 GetTimeoutMillisecond(Void);

Return value

Connection timeout period [in milliseconds]

Description

This function gets the connection timeout period. [in milliseconds]

Reference

SFZWebBrowserControl::SetTimeoutMillisecond | SFZWebBrowserControl::SetTimeoutCallback


SFZWebBrowserControl::GetTrustMode
Get the SSL trust mode.
[ public, const ]
UInt32 GetTrustMode(Void);

Return value

SSL trust mode

Description

This function gets the SSL trust mode of this HTTP connection set with the SFZWebBrowserControl::SetTrustMode function.

If the HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state, 0 will be returned.

Reference

SFZWebBrowserControl::SetTrustMode | SFZWebBrowserControl::Open | BREW API ISSL_NegotiateV


SFZWebBrowserControl::GetUser
Get the user name of HTTP basic authentication.
[ public, const ]
SFXAnsiStringConstRef GetUser(Void);

Return value

User name of HTTP basic authentication

Description

Get the user name of HTTP basic authentication.

The value which is set by the SFZWebBrowserControl::SetAuthorizeData function is gotten.

Reference

SFZWebBrowserControl::SetAuthorizeData


SFZWebBrowserControl::GetUserAgent
Get the user agent of the HTTP request header.
[ public, const ]
SFXAnsiStringConstRef GetUserAgent(Void);

Return value

User agent of this HTTP connection

Description

This function gets the user agent of the HTTP request header of this HTTP connection set with the SFZWebBrowserControl::SetUserAgent function.

If the HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state, the empty string(SFXAnsiString::EmptyInstance()) will be returned.

Reference

SFZWebBrowserControl::SetUserAgent | SFZWebBrowserControl::Open | SFXAnsiString


SFZWebBrowserControl::GetWebClassId
Get the web class ID to open the HTTP/HTTPS connection.
[ public, const ]
AEECLSID GetWebClassId(Void);

Return value

Web class ID

Description

This function gets the web class ID to open the HTTP/HTTPS connection.

Default value is AEECLSID_WEB.

Reference

SFZWebBrowserControl::SetWebClassId


SFZWebBrowserControl::HandleBoundVirtual
This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) event is received. [Perform the processing when the virtual region is changed.]
[ protected, virtual ]
Void HandleBoundVirtual(Void);

Description

This function will be called when the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) event is received.

In case you want to perform your own processing when the virtual region is changed, override this virtual function.

The default implementation sets real region of the internal SFYWebBrowserWidget instance to the region which is deflated about SFXMargin(2, 2) size from the local region.

[Note] Sending the (SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) event

The (SFEVT_RESPONDER_BOUND, SFP16_BOUND_VIRTUAL) event will occur when the virtual region is changed by calling the SFYResponder::SetRealBound or SFYResponder::SetVirtualBound function.

[Note] Another method when the virtual region is changed

Other than overriding this virtual function, it is possible to define and implement the handler for region event[XANDLER_DECLARE_VOIDBOUND], and register it into the responder.

In the processing when the virtual region is updated, this virtual function is executed first, and next the handlers for region event are executed in the registered order.

In almost all cases, the method to override this virtual function is adopted since defining, implementing and registering the handler for region event can be omitted.

Internal Implementation

Internal implementation of the SFZWebBrowserControl::HandleBoundVirtual function is as follows:

/*protected virtual */Void SFZWebBrowserControl::HandleBoundVirtual(Void)
{
    SFXRectangle                                rx;

    rx.Set(GetLocalBound());
    rx.Deflate(2, 2);
    _widget->SetRealBound(rx);
    return;
}// SFZWebBrowserControl::HandleBoundVirtual //

Reference

SFYResponder::SetRealBound | SFYResponder::SetVirtualBound | Real Region | Virtual Region | Region Event[SFEVT_RESPONDER_BOUND] | Handler for the Region Event[XANDLER_DECLARE_VOIDBOUND]


SFZWebBrowserControl::HandleError
Called when a fatal error occurs.
[ protected, virtual ]
Void HandleError(
    SFCError error   // error
);

Description

This function is called when a fatal error occurs in the SFZWebBrowserControl class.

Default does nothing.


SFZWebBrowserControl::HandleRenderRequest
This function will be called when the (SFEVT_RESPONDER_RENDER, SFP16_RENDER_REQUEST) event is received. [Draw this responder.]
[ protected, virtual, const ]
Void HandleRenderRequest(
    SFXGraphicsPtr graphics   // graphic object
);

Description

This function will be called when the (SFEVT_RESPONDER_RENDER, SFP16_RENDER_REQUEST) event is received.

In case you want to perform your own drawing of this responder, override this function.

The default implementation is to draw this responder.

[Note] The method to darw a responder

In addition to overriding this virtual function, it is possible to define and implement the handler for drawing event(drawing handler)[XANDLER_DECLARE_VOIDRENDER], and register it into the responder.

Then, the overridden virtual function will be called first, and next the drawing handlers registered into the responder will be booted up in the registered order.

In almost all cases, the method to override this function is used to draw the responder since there is no need to declare and register the drawing handler.

[Note] Procedure of drawing a responder

The drawing handler will be booted up when the drawing event(SFEVT_RESPONDER_RENDER) occurs. And then the drawing handler draw the responder actually.

The drawing event will be sent to only the responders including the region to be redrawn out of the redraw regions registered into the renderer using the SFYResponder::InvokeBackward function after the SFYResponder::Render function boots up the renderer.

Here, the SFYResponder::Render function will be called at the following situations:

  1. At the end of the event loop
  2. At the applet start / resume or the end of a highest priority event handler
  3. In the callback, which is outside the event loop.

If calling the SFYResponder::Render function with specifying "true" as an argument, the drawing event will be sent to all the responders to be actually displayed on the screen which are located below the responder in the responder tree, regardless of the registration of redraw region.

Internal Implementation

Internal implementation of the SFZWebBrowserControl::HandleRenderRequest function is as follows:

/*protected virtual */Void SFZWebBrowserControl::HandleRenderRequest(SFXGraphicsPtr graphics) const
{
    static SFXBevelColor::AtomRecConst          frameRgb = {
        {{{0x00, 0xAA, 0xAA, 0xAA}}}, {{{0x00, 0xFF, 0xFF, 0xFF}}}, {{{0x00, 0xFF, 0xFF, 0xFF}}}
    };
    static SFXRGBColor::AtomRecConst            theme[] = {
        {{{0x00, 0x00, 0x00, 0x00}}},
        {{{0x00, 0xDD, 0x99, 0x99}}},
        {{{0x00, 0xFF, 0xFF, 0xFF}}}
    };
    SFBDisplaySmp                               display;
    SFXRectangle                                rx;

    rx.Set(GetLocalBound());
    graphics->DrawBevelRectangle(rx, frameRgb);
    rx.Deflate(1, 1);
    graphics->DrawRectangle(rx, theme[0]);
    rx.Deflate(1, 1);
    if (GetStateFocus(true)) {
        graphics->DrawRectangle(rx, theme[1]);
    }
    else {
        graphics->DrawRectangle(rx, theme[2]);
    }
    return;
}// SFZWebBrowserControl::HandleRenderRequest //

Reference

SFYResponder::Invalidate | SFYResponder::Render | SFYResponder::InvokeBackward | Drawing Event[SFEVT_RESPONDER_RENDER] | Handler for the Drawing Event[XANDLER_DECLARE_VOIDRENDER] | Rendering | Event Loop | Responder Tree


SFZWebBrowserControl::IsBusy
Check whether or not the browser control is busy in accessing the network, or rendering.
[ public, const ]
Bool IsBusy(Void);

Return value

  • If the browser control is busy in accessing the network, or rendering: true
  • Otherwise: false

SFZWebBrowserControl::IsInlineEditEnable
Check whether the text is edited in some part of screen or not.
[ public, const ]
Bool IsInlineEditEnable(Void);

Return value

  • If the text is edited in some part of screen: true
  • Otherwise ( i.e., the text is edited in the full screen ): false

Reference

SFZWebBrowserControl::SetInlineEditEnable


SFZWebBrowserControl::IsScrollbarEnable
Check whether the scroll bar is enabled or not.
[ public, const ]
Bool IsScrollbarEnable(Void);

Return value

  • If the scroll bar is enabled: true
  • Otherwise: false

Reference

SFZWebBrowserControl::SetScrollbarEnable


SFZWebBrowserControl::JumpNotifyHandler
[Handler] Notify when the link is pressed.
[ protected, virtual ]
Void JumpNotifyHandler(
    NotifyRef notify   // notification
);

Argument

notify
  • notify.u.jump.pszURL: link URL
  • notify.u.jump.pszMethod: HTTP method
  • notify.u.jump.pszData: POST data
  • notify.ex.absoluteURL: [Extension] absolute link URL

Description

Open the linked URL automatically.

The SFZWebBrowserControl::JumpNotifyHandler function do nothing except the http://, https://, file://, and res:// streams.

To do something other than default settings, it is necessary to override the SFZWebBrowserControl::JumpNotifyHandler function.

Example

The code below is to override the SFZWebBrowserControl::JumpNotifyHandler function.

#include <SFZResponder/SFZControl/SFZBrowserControl/SFZWebBrowserControl.hpp>

SFMTYPEDEFRESPONDER(MyBrowserControl)
class MyBrowserControl : public SFZWebBrowserControl {
    SFBSEALRESPONDER(MyBrowserControl)
    SFMRESPONDERINSTANTIATEFOUR(MyBrowserControl, SFZWebBrowserControl, SFYControl, SFYWidget, SFYResponder)
public:
    static MyBrowserControlSmp NewInstance(SFCErrorPtr exception = null);
protected:
    explicit MyBrowserControl(Void) static_throws;
    virtual ~MyBrowserControl(Void);
    virtual Void JumpNotifyHandler(NotifyRef notify) {
        if (notify.GetUrl().StartWith("mailto:")) {
            // if it's "mailto:", call the mailer
            Mailer(notify.GetUrl());
        }
        else {
            // or just call the standard handler
     SFZWebBrowserControl::JumpNotifyHandler(notify);
        }

        if (notify.ex.absoluteURL.StartWith("mailto:")) {
            // if it's "mailto:", call the mailer
            Mailer(notify.ex.absoluteURL);
        }
        else {
            // or just call the standard handler
            SFZWebBrowserControl::JumpNotifyHandler(notify);
        }

    }
};

Internal Implementation

Internal implementation of this function is as follows:

/*protected virtual */Void SFZWebBrowserControl::JumpNotifyHandler(NotifyRef notify)
{
    Navigate(notify.ex.absoluteURL);
    return;
}// SFZWebBrowserControl::JumpNotifyHandler //

Reference

SFZWebBrowserControl::Notify | SFZWebBrowserControl::Navigate | SFZWebBrowserControl::DoneNotifyHandler | SFZWebBrowserControl::FocusNotifyHandler | SFZWebBrowserControl::ResponseNotifyHandler


SFZWebBrowserControl::Load
Start to render the data in the HTML format.
[ public ]
SFCError Load(
    SFBSourceSmpConstRef source   // HTML source
    SFXAnsiStringConstRef url     // URL
);
[ public ]
SFCError Load(
    SFBAStreamSmpConstRef stream   // HTML stream
    SFXAnsiStringConstRef url      // URL
);
[ public ]
SFCError Load(
    SFXAnsiStringConstRef data   // HTML data
    SFXAnsiStringConstRef url    // URL
);

Argument

source

the source in the HTML format

stream

the stream in the HTML format

data

the string in the HTML format

url

URL ( All the URLs in the HTML data are relative URLs from this "url" argument.)

Return value

  • If succeeds: SFERR_NO_ERROR
  • If insufficient memory: SFERR_NO_MEMORY
  • If the argument is invalid: SFERR_INVALID_PARAM
  • If the HTTP/HTTPS connection is not in the SFXHTTPConnection::STATE_OPEN state: SFERR_INVALID_STATE
  • If failed: SFERR_FAILED

Description

Immediately after the inline image is received, it is displayed.

[Important] About communication error:

The communication errors cannot be gotten from the return value of SFZWebBrowserControl::Load function.

To get the communication errors, it is necessary to handle the (SFEVT_RESPONDER_BROWSER_NOTIFY, NOTIFY_RESPONSE) event.

Reference

SFZWebBrowserControl::Navigate


SFZWebBrowserControl::LoadCertificate
Load a ASN.1/DER form certificate file or buffer.
[ public ]
SFCError LoadCertificate(
    SInt32 kind            // kind of certificate
    SFXPathConstRef path   // file path of certificate
);
[ public ]
SFCError LoadCertificate(
    SInt32 kind                // kind of certificate
    SFXBufferConstRef buffer   // buffer of certificate
);

Argument

kind

kind of certificate: any one of WEBOPT_X509_ROOT_CERT, WEBOPT_X509_LEAF_CERT, and WEBOPT_X509_BRANCH_CERT

path

file path of ASN.1/DER form certificate

buffer

buffer of ASN.1/DER form certificate

Return value

  • If succeed: SFERR_NO_ERROR
  • If the HTTP connection is not in the STATE_CLOSE: SFERR_INVALID_STATE
  • If insuffcient memory: SFERR_NO_MEMORY
  • If unsupported: SFERR_UNSUPPORTED
  • Otherwise: SFERR_FAILED

Description

This function loads a file or buffer of ASN.1/DER form certificate.

This function is valid if and only if the HTTP connection is in the STATE_CLOSE.

Example

Load a root certificate file

SFZWebBrowserControl http;
SFCError error;

// Load a root certificate before open.
if ((error = http.LoadCertificate(WEBOPT_X509_ROOT_CERT, SFXPath("scradle.der"))) == SFERR_NO_ERROR) {
    if ((error = http.Open()) == SFERR_NO_ERROR) {
        error = http.Connect("https://www.s-cradle.com/example/tabbrowser/", XALLBACK_INTERNAL(OnConnect));
    }
}

Reference

SFBX509Chain::AddCert


SFZWebBrowserControl::Navigate
Get a page which is specified as url, and start to render the page.
[ public ]
SFCError Open(
    SFXAnsiStringConstRef url   // URL to open
);

Argument

url

Specify the URL to access. Render the HTML data of specified URL.

The schemes of http, https, file, and res are supported.

Return value

  • If succeeds: SFERR_NO_ERROR
  • If insufficient memory: SFERR_NO_MEMOERY
  • If the argument is invalid: SFERR_INVALID_PARAM
  • If the HTTP/HTTPS connection is not in the SFXHTTPConnection::STATE_OPEN state: SFERR_INVALID_STATE
  • If failed: SFERR_FAILED

Description

This function gets a page which is specified by the argument, and starts to render it.

Immediately after the inline image is received, it is displayed.

Before calling this function, the connection must be opened by the SFZWebBrowserControl::Open function, and the HTML method must be set by the SFZWebBrowserControl::SetMethod function.

[Important] Abount communication error:

The communication errors cannot be gotten from the return value of SFZWebBrowserControl::Navigate function.

To get the communication errors, it is necessary to handle the (SFEVT_RESPONDER_BROWSER_NOTIFY, NOTIFY_RESPONSE) event.

Example

SFZWebBrowserControlSmp browser;
SFCError error;

if ((browser = SFZWebBrowserControl::NewInstance(&error)) != null) {
    if ((error = browser->Open()) == SFERR_NO_ERROR) {
        if ((error = browser->SetMethod("GET")) == SFERR_NO_ERRROR) {
            error = browser->Navigate("/example/tabbrowser/");
        }
    }
}

Reference

SFZWebBrowserControl::Load | SFZWebBrowserControl::Open | SFZWebBrowserControl::SetMethod


SFZWebBrowserControl::Next
Move to the next page in specified history, get and render the page again.
[ public ]
SFCError Next(
    SInt32 n = 1   // number of history to move ahead
);

Argument

n

Specify the number of history list to move ahead. If not specified, move one history entry ahead.

Return value

  • If succeeds: SFERR_NO_ERROR
  • If insufficient memory: SFERR_NO_MEMOERY
  • If the specified number is out of the history list: SFERR_INVALID_PARAM
  • If failed: SFERR_FAILED

Description

If the specified index number is negative, the history entry go back by its absolute value is displayed. If it is out of the history list, SFERR_INVALID_PARAM is returned as an error.

[Important] About communication error:

The communication errors cannot be gotten from the return value of SFZWebBrowserControl::Next function.

To get the communication errors, it is necessary to handle the (SFEVT_RESPONDER_BROWSER_NOTIFY, NOTIFY_RESPONSE) event.

Reference

SFZWebBrowserControl::Navigate | SFZWebBrowserControl::Previous | SFZWebBrowserControl::Reload


SFZWebBrowserControl::Open
Open the HTTP connection.
[ public ]
SFCError Open(
    AEECLSID id = AEECLSID_WEB   // ClassID
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the HTTP connection is not in the SFXHTTPConnection::STATE_CLOSE or SFXTHTTPConnection::STATE_OPEN: SFERR_INVALID_STATE
  • If insufficient memory: SFERR_NO_MEMORY

Description

This function opens this HTTP connection.

This HTTP connection transits into the SFXHTTPConnection::STATE_OPEN state.

Concretely, the following processings will be performed.

  1. Create the SFBWeb instance to be managed internally by this HTTP connection.
  2. Initialize the content of the HTTP request.
  3. Set the HTTP request method to "GET".
  4. Open the internal storage for the HTTP request body to be written.
  5. Initialize the content of the HTTP response.
  6. Transit into the STATE_OPEN state.

SFZWebBrowserControl::Previous
Move to the previous page in specified history, get and render the page again.
[ public ]
SFCError Previous(
    SInt32 n = 1   // number of history to move back
);

Argument

n

Specify the number of history to move back. If it is elided, move to 1 history previous.

Return value

  • If succeeds: SFERR_NO_ERROR
  • If insufficient memory: SFERR_NO_MEMOERY
  • If the specified number is out of the history list: SFERR_INVALID_PARAM
  • If failed: SFERR_FAILED

Description

If the specified index number is negative, the history entry go back by its absolute value is displayed. If it is out of the history list, SFERR_INVALID_PARAM is returned as an error.

[Important] About communication error:

The communication errors cannot be gotten from the return value of SFZWebBrowserControl::Previous function.

To get the communication errors, it is necessary to handle the (SFEVT_RESPONDER_BROWSER_NOTIFY, NOTIFY_RESPONSE) event.

Reference

SFZWebBrowserControl::Navigate | SFZWebBrowserControl::Next | SFZWebBrowserControl::Reload


SFZWebBrowserControl::Reload
Reload and render the current page.
[ public ]
Void Reload(Void);

Description

When the current page is displayed by the SFZWebBrowserControl::Load function or by the SFZWebBrowserControl::Navigate function with the argument of IAStream or ISource, the redrawing fails.

Reference

SFZWebBrowserControl::Load | SFZWebBrowserControl::Navigate


SFZWebBrowserControl::ResponseNotifyHandler
[Handler] Notify that the server connection completes.
[ protected, virtual ]
Void ResponseNotifyHandler(
    NotifyRef notify   // notification
);

Argument

notify

notify.u.nDone: HTTP response code

Description

This function is called before rendering.

The standard implement is to do nothing.

Example

The code below is to override this function.

#include <SFZResponder/SFZControl/SFZBrowserControl/SFZWebBrowserControl.hpp>

SFMTYPEDEFRESPONDER(MyBrowserControl)
class MyBrowserControl : public SFZWebBrowserControl {
    SFBSEALRESPONDER(MyBrowserControl)
    SFMRESPONDERINSTANTIATEFOUR(MyBrowserControl, SFZWebBrowserControl, SFYControl, SFYWidget, SFYResponder)
public:
    static MyBrowserControlSmp NewInstance(SFCErrorPtr exception = null);
protected:
    explicit MyBrowserControl(Void) static_throws;
    virtual ~MyBrowserControl(Void);
    virtual Void ResponseNotifyHandler(NotifyRef notify) {
        if (!WEB_ERROR_SUCCEEDED(notify.u.nDone)) {
            // if there is a HTTP error, show the warning dialog
            WarningDialog(notify.u.nDone);
        }
        return;
    }
};

Internal Implementation

Internal implementation of this function is as follows:

/*protected virtual */Void SFZWebBrowserControl::ResponseNotifyHandler(NotifyConstRef notify)
{
    unused(notify);
    return;
}// SFZWebBrowserControl::ResponseNotifyHandler //

Reference

SFZWebBrowserControl::Notify | SFZWebBrowserControl::DoneNotifyHandler | SFZWebBrowserControl::FocusNotifyHandler | SFZWebBrowserControl::JumpNotifyHandler


SFZWebBrowserControl::SetAuthorizeData
Set the information of HTTP basic authentication.
[ public ]
SFCError SetAuthorizeData(
    SFXAnsiStringConstRef user     // user name
    SFXAnsiStringConstRef passwd   // password
    SFXAnsiStringConstRef url      // base URL of HTTP basic authentication
);

Argument

user

Specify a user name.

passwd

Specify a password.

url

Specify a base URL. Pages which start with this URL will be authenticated.

Return value

  • If succeed: SFERR_NO_ERROR
  • If insufficient memory: SFERR_NO_MEMOERY
  • If the HTTP connection is not in the STATE_OPEN: SFERR_INVALID_STATE

Description

This function sets the information of HTTP basic authentication.

After calling this fuction, pages whose URL starts with specified url argument will be accessed with basic authentication header.

This function is valid if and only if the HTTP connection is in the STATE_OPEN.

To unset the basic authentication information, call this function with specifying empty strings.

[Note] Note

If a return value is not SFERR_NO_ERROR, the basic authentication is not performed.

Reference

SFZWebBrowserControl::Open


SFZWebBrowserControl::SetIndent
Set the width of indent in pixels.
[ public ]
SFCError SetIndent(
    SInt32 pixel   // width of indent
);

Argument

pixel

Specify the width of indent in pixels.

Return value

  • If succeeds: SFERR_NO_ERROR
  • If failed: some error code other than SFERR_NO_ERROR

Reference

SFZWebBrowserControl::GetIndent


SFZWebBrowserControl::SetInlineEditEnable
Set whether the text is edited in some part of screen or not.
[ public ]
Void SetInlineEditEnable(
    Bool enable   // inline editable
);

Argument

enable
  • the text is edited in some part of screen: true
  • the text is edited in the full screen: false

Reference

SFZWebBrowserControl::IsInlineEditEnable


SFZWebBrowserControl::SetLinkColor
Set the color of link text.
[ public ]
SFCError SetLinkColor(
    SFXRGBColorConstRef color   // link color
);

Argument

color

Specify the color of link text.

Return value

  • If succeeds: SFERR_NO_ERROR
  • If failed: SFERR_UNSUPPORTED

Reference

SFZWebBrowserControl::GetLinkColor | SFZWebBrowserControl::SetTextColor


SFZWebBrowserControl::SetMethod
Set the HTTP request method.
[ public ]
SFCError SetMethod(
    SFXAnsiStringConstRef param   // method (character string)
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the HTTP connection is not in the SFXHTTPConnection:STATE_OPEN state: SFERR_INVALID_STATE
  • If insufficient memory: SFERR_NO_MEMORY

Description

This function sets he HTTP request method of the HTTP connection.

As the method argument, the methods supported by the BREW IWeb interface such as "GET", "POST", "HEAD" can be specified.

Default: "GET"

The value set by the this function will be effective until the SFZWebBrowserControl::Close function is called.

[Note] Note
This function is valid if and only if this HTTP connection is in the STATE_OPEN state.

Reference

SFZWebBrowserControl::GetMethod | SFZWebBrowserControl::Open | SFZWebBrowserControl::Close | SFXAnsiString | BREW API IWeb


SFZWebBrowserControl::SetParagraphSpacing
Set the spacing between paragraphs in pixels.
[ public ]
SFCError SetParagraphSpacing(
    SInt32 pixel   // paragraph spacing
);

Argument

pixel

Set the spacing between paragraphs in pixels.

Return value

  • If succeeds: SFERR_NO_ERROR
  • If failed: SFERR_UNSUPPORTED

Reference

SFZWebBrowserControl::GetParagraphSpacing


SFZWebBrowserControl::SetProxyServer
Set the proxy server.
[ public ]
SFCError SetProxyServer(
    SFXSocketAddressConstRef param   // proxy server
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state: SFERR_INVALID_STATE
  • If insufficient memory: SFERR_NO_MEMORY

Description

This function sets the proxy server (SFXSocketAddress) of the HTTP connection to the specified value.

The value set by the this function will be effective until the SFZWebBrowserControl::Close function is called.

[Note] Note
This function is valid if and only if the HTTP connection is in the SFXHTTPConnection::STATE_OPEN state.

Reference

SFZWebBrowserControl::GetProxyServer | SFZWebBrowserControl::Open | SFZWebBrowserControl::Close SFXSocketAddress


SFZWebBrowserControl::SetRequestContent
Set the HTTP request body of the HTTP connection to the specified storage or source.
[ public ]
SFCError SetRequestContent(
    SFXFileConstRef file   // file storage to set to the HTTP request body
);
[ public ]
SFCError SetRequestContent(
    SFXMemoryConstRef memory   // memory storage to set to the HTTP request body
);
[ public ]
SFCError SetRequestContent(
    SFXStorageConstRef storage   // storage to set to the HTTP request body
    SInt32 length                // length of the storage
);
[ public ]
SFCError SetRequestContent(
    SFBSourceSmpConstRef source   // source to set to the HTTP request body
    SInt32 length                 // length of the source
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If argument is null: SFERR_INVALID_PARAM
  • If the HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state or the specified storage or SFBSource instance has not been opened: SFERR_INVALID_STATE
  • If insufficient memory: SFERR_NO_MEMORY

Description

This function sets the HTTP request body of the HTTP connection to the specified storage or source.

If only the file or memory storage is specified in the argument, its total storage length will be automatically set.

When the length argument is specified, data of the specified length from the current read / write pointer of the storage or source will be set to the HTTP request body of the HTTP connection.

[Tip] Tip

If a file storage(SFXFile) is set with the SFZWebBrowserControl::SetRequestContent function, data will be sent directly to the network from the file storage. As a result, big data can be sent.

When data is sent with the SFZWebBrowserControl::GetStreamWriter function, the HTTP request body is made in the heap befre sent. As a result, the data size that can be sent will depends on the memory size equipped with the handset device.

[Caution] Writing the HTTP response body

If the HTTP response body is set with the SFZWebBrowserControl::SetRequestContent function, the SFZWebBrowserControl::GetStreamWriter function cannot be used.

On the contrary, if the HTTP response body is written by using the SFZWebBrowserControl::GetStreamWriter function, the SFZWebBrowserControl::SetRequestContent function cannot be used.

The value set by the this function will be effective until the SFZWebBrowserControl::Close function is called.

[Note] Note
This function is valid if and only if the HTTP connection is in the SFXHTTPConnection::STATE_OPEN state.
[Note] Note

The SFZWebBrowserControl::SetRequestContent function is effective in SophiaFramework UNIVERSE 5.1.11 or above.

Reference

SFZWebBrowserControl::GetRequestContent | SFZWebBrowserControl::GetStreamWriter | SFZWebBrowserControl::Open | SFZWebBrowserControl::Close | SFBSource | SFXStorage


SFZWebBrowserControl::SetRequestFlag
Set the HTTP request flag.
[ public ]
SFCError SetRequestFlag(
    UInt32 param   // flag
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If this HTTP connection is not in the STATE_OPEN state: SFERR_INVALID_STATE

Description

This function sets the HTTP request flag of the HTTP connection to the specified value.

[Note] Note
This HTTP request flag will be internally passed to the IWEB_GetResponse function.

Concretely, the logical sum of the following flags are set as the flag argument.

  • WEBREQUEST_REDIRECT: handle redirection invisibly, if possible (Unimplemented by BREW's HTTP protocol engine)
  • WEBREQUEST_NOCOOKIES: do not process cookies; pass headers through to caller (Unimplemented by BREW's HTTP protocol engine, but it this behaviour is the default)
  • WEBREQUEST_NOCACHE: send "Pragma: no-cache" to proxy (if proxying) (Unimplemented by BREW's HTTP protocol engine)
  • WEBREQUEST_NOKEEPALIVE: disable keep-alives; By default, the HTTP engine sends a "Connection: Keep-Alive" header. If this flag is set, the header is not sent, nor will the HTTP engine keep the socket open even if the server sends Keep-Alive. Specifying a "Connection: " header of your own may have unpredictable results, since the HTTP engine does not parse headers passed in the request.
  • WEBREQUEST_FORCENEWCONN: force a new connection
  • WEBREQUEST_NOWAITCONN: don't wait for reusable connection, force new
  • WEBREQUEST_HTTPBOGUSCRLF: append an extra CRLF to HTTP request bodies to work around a CERN webserver bug

The value set by the this function will be effective until the SFZWebBrowserControl::Close function is called.

[Note] Note
This function is valid if and only if the HTTP connection is in the SFXHTTPConnection::STATE_OPEN state.

Reference

SFZWebBrowserControl::GetRequestFlag | SFZWebBrowserControl::Open | SFZWebBrowserControl::Close | BREW API IWEB_GetResponse


SFZWebBrowserControl::SetRequestHeader
Set the HTTP request header.
[ public ]
SFCError SetRequestHeader(
    SFXAnsiStringConstRef key     // header name
    SFXAnsiStringConstRef value   // header value
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If header name is User-Agent, or Content-Length, or Connection: SFERR_INVALID_PARAM
  • If the HTTP connection is not in the SFXHTTPConection::STATE_OPEN state: SFERR_INVALID_STATE
  • If insufficient memory: SFERR_NO_MEMORY

Description

This function sets the HTTP request header to the specified (key, value) pair.

If this function is called several times with the same key, all the requests are stored together and then will be sent at a time.

The values set by the SFZWebBrowserControl::SetRequestHeader function will be destroyed when the SFZWebBrowserControl::Close function is called or the connection to the Web server is established.

The value set by the this function will be effective until the SFZWebBrowserControl::Close function is called.

[Note] Note
This function is valid if and only if the HTTP connection is in the SFXHTTPConnection::STATE_OPEN state.

Reference

SFZWebBrowserControl::GetRequestHeader | SFZWebBrowserControl::Open | SFZWebBrowserControl::Close


SFZWebBrowserControl::SetScrollbarEnable
Enable or disable the scroll bar.
[ public ]
Void SetScrollbarEnable(
    Bool enable   // enable the scroll bar
);

Argument

enable
  • If enabled: true
  • Otherwise: false

Description

The scroll bar here is not of SophiaFramework UNIVERSE, but of the standard BREW.

Reference

SFZWebBrowserControl::IsScrollbarEnable


SFZWebBrowserControl::SetScrollbarWidth
Set the width of scroll bar in pixels.
[ public ]
SFCError SetScrollbarWidth(
    SInt32 pixel   // width of the scroll bar
);

Argument

pixel

Specify the width of the scroll bar in pixels.

Return value

  • If succeeds: SFERR_NO_ERROR
  • If failed: SFERR_UNSUPPORTED

Reference

SFZWebBrowserControl::GetScrollbarWidth


SFZWebBrowserControl::SetTextColor
Set the text color.
[ public ]
SFCError SetTextColor(
    SFXRGBColorConstRef color   // color
);

Argument

color

Specify the color of HTML text.

Return value

  • If succeeds: SFERR_NO_ERROR
  • If failed: SFERR_UNSUPPORTED

Reference

SFZWebBrowserControl::GetTextColor | SFZWebBrowserControl::SetLinkColor


SFZWebBrowserControl::SetTimeoutCallback
Set the connection timeout callback.
[ public ]
Void SetTimeoutCallback(
    SFXCallback::CallbackSPP spp   // callback
    VoidPtr reference              // data passed to callback
);

Description

This function sets the connection timeout callback, which will be called in case there is no response from the server when the connection timeout period elapses from the communication startup.

If no callback is set, by default, the SFXHTTPConnection::OnTimeoutDefault function will be registered as a connection timeout callback.

The SFXHTTPConnection::OnTimeoutDefault function cancels the communication by calling the SFXHTTPConnection::Cancel function as in the internal implementation code below.

/*private */XALLBACK_IMPLEMENT_SFXTIMER(SFXHTTPConnection, OnTimeoutDefault)
{
    Cancel();
    return;
}// XALLBACK_IMPLEMENT_SFXTIMER(SFXHTTPConnection, OnTimeoutDefault)
[Note] Note

The connection timeout period is set by using the SFZWebBrowserControl::SetTimeoutMillisecond function.

Reference

SFZWebBrowserControl::SetTimeoutMillisecond | SFZWebBrowserControl::Cancel | SFXHTTPConnection::Cancel


SFZWebBrowserControl::SetTimeoutMillisecond
Set the connection timeout period to the specified value. [in milliseconds]
[ public ]
Void SetTimeoutMillisecond(
    UInt32 msec   // value to set
);

Description

This function sets the connection timeout period to the specified value. [in milliseconds]

Defualt: 0 (Timeout processing will not be performed.)

In case there is no response from the server when the connection timeout period elapses from the communication startup, the connection timeout callback registered by calling the SFZWebBrowserControl::SetTimeoutCallback function will be called.

[Note] Note

If the connection timeout period is set to 0, timeout processing will not be performed.

Reference

SFZWebBrowserControl::GetTimeoutMillisecond | SFZWebBrowserControl::SetTimeoutCallback


SFZWebBrowserControl::SetTrustMode
Set the SSL trust mode.
[ public ]
SFCError SetTrustMode(
    UInt32 param   // SSL trust mode
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state: SFERR_INVALID_STATE

Description

This function sets the SSL trust mode of the HTTP connection to the specified value (effective only if this HTTP connection is HTTPS).

The value set by this function is effective until the SFZWebBrowserControl::Close function is called.

The SSL_RESULT_SERV_VERS error might occur on the handset device when calling the connecting function immediately after this value is changed.

To avoid this error, call the SFZWebBrowserControl::Close function once, set the SSL trust mode, and then call the connecting function.

One of the following values are available for the SSL trust mode:

  • SSL_TRUST_MODE_FAIL: Default, fail on trust errors.
  • SSL_TRUST_MODE_CHECK: Suspend on trust errors so they can be checked and ignored.
  • SSL_TRUST_MODE_IGNORE: Ignore all trust errors.
  • SSL_TRUST_MODE_ALWAYS: Always suspend so trust can always be checked.
[Note] Note
For more details, see BREW API ISSL_NegotiateV in the BREW API Reference
[Note] Note
This function is valid if and only if the HTTP connection is in the SFXHTTPConnection::STATE_OPEN state.

Reference

SFZWebBrowserControl::GetTrustMode | SFZWebBrowserControl::Open | SFZWebBrowserControl::Close | BREW API ISSL_NegotiateV


SFZWebBrowserControl::SetUserAgent
Set the user agent.
[ public ]
SFCError SetUserAgent(
    SFXAnsiStringConstRef param   // user agent
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the HTTP connection is not in the SFXHTTPConnection::STATE_OPEN state: SFERR_INVALID_STATE
  • If insufficient memory: SFERR_NO_MEMORY

Description

This function sets the user agent of the HTTP connection to the specified value.

The value set by the this function will be effective until the SFZWebBrowserControl::Close function is called.

[Note] Note
This function is valid if and only if the HTTP connection is in the SFXHTTPConnection::STATE_OPEN state.

Reference

SFZWebBrowserControl::GetUserAgent | SFZWebBrowserControl::Open | SFZWebBrowserControl::Close | SFXAnsiString


SFZWebBrowserControl::SetWebClassId
Set the web class ID to open the HTTP/HTTPS connection.
[ public ]
Void SetWebClassId(
    AEECLSID id   // web class ID
);

Description

This function sets the web class ID to open the HTTP/HTTPS connection.

Default value is AEECLSID_WEB.

Reference

SFZWebBrowserControl::GetWebClassId


SFZWebBrowserControl::Stop
Stop rendering.
[ public ]
Void Stop(Void);

Description

Nothing happens except under rendering. The content that has already been displayed takes no influence by calling the SFZWebBrowserControl::Stop function.


SFZWebBrowserControl::CodeEnum
Constant that represents the SFZWebBrowserControl class.
enum CodeEnum {
    CODE_TYPE = four_char_code('c', 'h', 't', 'm')
};
SFMTYPEDEFTYPE(CodeEnum)

Reference

SFYResponder::GetType | SFYResponder::SetType


SFZWebBrowserControl::Notify
Browser notification struct.
[ public ]
SFMTYPEDEFSTRUCT(Extension)
struct Extension {
    SFXAnsiString       absoluteURL;
};

SFMTYPEDEFSTRUCT(Notify)
class Notify : public HViewNotify {
public:
    Extension           ex;
                        Notify          (HViewNotify const& hvNotify);
                        Notify          (NotifyConstRef notify);
};

// HViewNotify:  notification data
//
typedef struct {
    HVNotifyCode        code;           // notification code
    IHtmlViewer*        phv;            // identifies IHtmlViewer that sent the notification

    union {
      HViewJump         jump;           // HVN_JUMP
      HViewJump         submit;         // HVN_SUBMIT
      int               nDone;          // HVN_DONE
      HViewFocus        focus;          // HVN_FOCUS
    } u;
} HViewNotify;

#ifdef _WIN32
typedef unsigned HVNotifyCode;
#else
typedef int8 HVNotifyCode;
#endif

Description

Reference

SFYWebBrowserWidget::NotifyEnum | BREW API HViewNotify | BREW API WEB_ERROR_SUCCEEDED | BREW API WEB_ERROR_MAP