epoc32/include/mw/brctlwindowobserver.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     1 /*
     2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     5 * under the terms of the License "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:  Handle multiple windows events such as open/close/etc
    15 *
    16 */
    17 
    18 
    19 #ifndef BRCTLWINDOWOBSERVER_H
    20 #define BRCTLWINDOWOBSERVER_H
    21 
    22 //  INCLUDES
    23 #include <e32std.h>
    24 #include <e32base.h>
    25 #include <brctldefs.h>
    26 
    27 // CONSTANTS
    28 
    29 // MACROS
    30 
    31 // DATA TYPES
    32 enum TBrCtlWindowCommand
    33     {
    34     EFocusWindow,
    35     EUnfocusWindow,
    36     EShowWindow,
    37     ECloseWindow
    38     };
    39 
    40 // FUNCTION PROTOTYPES
    41 
    42 // FORWARD DECLARATIONS
    43 class CBrCtlInterface;
    44 
    45 /**
    46 * The MBrCtlWindowObserver class handles window events such open/close/etc
    47 *
    48 * Usage:
    49 *
    50 * @code
    51 *  #include <brctlwindowobserver.h>
    52 *
    53 * @see S60 Platform: Browser Control API Developer's Guide Version 2.0
    54 * @lib BrowserEngine.lib
    55 * @since 3.0
    56 * @file brctlwindowobserver.h
    57 * @endcode     *
    58 */
    59 class MBrCtlWindowObserver
    60     {
    61     public: // New functions
    62         /**
    63         * Request the host applicaion to open the URL in a new window
    64         * @since 3.0
    65         * @param aUrl The Url of the request to be done in the new window
    66         * @param aTargetName The name of the new window
    67         * @param aUserInitiated ETrue if the new window is initiated by a user event (click)
    68         * @param aMethod The method to be used for fetching the supplied url
    69         * @param aContentType If the method is POST, this is the content type of the data to be posted 
    70         * @param aPostData If the method is POST, this is the data to be posted 
    71         * @param aBoundary The boundary used if the content is multipart/form-data
    72         * @param aReserved For future use
    73         * @return Return Value is the new browser control associated with the new window
    74         */
    75         virtual CBrCtlInterface* OpenWindowL(TDesC& aUrl, TDesC* aTargetName, TBool aUserInitiated, 
    76              TAny* aReserved) = 0;
    77 
    78         /**
    79         * Find a window by target name
    80         * @since 3.0
    81         * @param aTargetName name of the window to find
    82         * @return Return Value is the browser control associated with the window name
    83         */
    84         virtual CBrCtlInterface* FindWindowL( const TDesC& aTargetName ) const = 0;             
    85 
    86         /**
    87         * Handle window events such as close/focus etc
    88         * @since 3.0
    89         * @param aTargetName name of the window to send the event to
    90         * @param aCommand Command to pass to the window
    91         * @return void
    92         */
    93         virtual void HandleWindowCommandL( const TDesC& aTargetName, TBrCtlWindowCommand aCommand ) = 0;
    94     };
    95 
    96 #endif      // BRCTLWINDOWOBSERVER_H
    97             
    98 // End of File