web_pub/browser_control_api/inc/BrCtlWindowObserver.h
changeset 0 dd21522fd290
child 36 0ed94ceaa377
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     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