williamr@2: /* williamr@2: * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). williamr@2: * All rights reserved. williamr@2: * This component and the accompanying materials are made available williamr@2: * under the terms of the License "Eclipse Public License v1.0" williamr@2: * which accompanies this distribution, and is available williamr@2: * at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@2: * williamr@2: * Initial Contributors: williamr@2: * Nokia Corporation - initial contribution. williamr@2: * williamr@2: * Contributors: williamr@2: * williamr@2: * Description: Handle multiple windows events such as open/close/etc williamr@2: * williamr@2: */ williamr@2: williamr@2: williamr@2: #ifndef BRCTLWINDOWOBSERVER_H williamr@2: #define BRCTLWINDOWOBSERVER_H williamr@2: williamr@2: // INCLUDES williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: williamr@2: // CONSTANTS williamr@2: williamr@2: // MACROS williamr@2: williamr@2: // DATA TYPES williamr@2: enum TBrCtlWindowCommand williamr@2: { williamr@2: EFocusWindow, williamr@2: EUnfocusWindow, williamr@2: EShowWindow, williamr@2: ECloseWindow williamr@2: }; williamr@2: williamr@2: // FUNCTION PROTOTYPES williamr@2: williamr@2: // FORWARD DECLARATIONS williamr@2: class CBrCtlInterface; williamr@2: williamr@2: /** williamr@2: * The MBrCtlWindowObserver class handles window events such open/close/etc williamr@2: * williamr@2: * Usage: williamr@2: * williamr@2: * @code williamr@2: * #include williamr@2: * williamr@2: * @see S60 Platform: Browser Control API Developer's Guide Version 2.0 williamr@2: * @lib BrowserEngine.lib williamr@2: * @since 3.0 williamr@2: * @file BrCtlWindowObserver.h williamr@2: * @endcode * williamr@2: */ williamr@2: class MBrCtlWindowObserver williamr@2: { williamr@2: public: // New functions williamr@2: /** williamr@2: * Request the host applicaion to open the URL in a new window williamr@2: * @since 3.0 williamr@2: * @param aUrl The Url of the request to be done in the new window williamr@2: * @param aTargetName The name of the new window williamr@2: * @param aUserInitiated ETrue if the new window is initiated by a user event (click) williamr@2: * @param aMethod The method to be used for fetching the supplied url williamr@2: * @param aContentType If the method is POST, this is the content type of the data to be posted williamr@2: * @param aPostData If the method is POST, this is the data to be posted williamr@2: * @param aBoundary The boundary used if the content is multipart/form-data williamr@2: * @param aReserved For future use williamr@2: * @return Return Value is the new browser control associated with the new window williamr@2: */ williamr@2: virtual CBrCtlInterface* OpenWindowL(TDesC& aUrl, TDesC* aTargetName, TBool aUserInitiated, williamr@2: TAny* aReserved) = 0; williamr@2: williamr@2: /** williamr@2: * Find a window by target name williamr@2: * @since 3.0 williamr@2: * @param aTargetName name of the window to find williamr@2: * @return Return Value is the browser control associated with the window name williamr@2: */ williamr@2: virtual CBrCtlInterface* FindWindowL( const TDesC& aTargetName ) const = 0; williamr@2: williamr@2: /** williamr@2: * Handle window events such as close/focus etc williamr@2: * @since 3.0 williamr@2: * @param aTargetName name of the window to send the event to williamr@2: * @param aCommand Command to pass to the window williamr@2: * @return void williamr@2: */ williamr@2: virtual void HandleWindowCommandL( const TDesC& aTargetName, TBrCtlWindowCommand aCommand ) = 0; williamr@2: }; williamr@2: williamr@2: #endif // BRCTLWINDOWOBSERVER_H williamr@2: williamr@2: // End of File