2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Handle multiple windows events such as open/close/etc
19 #ifndef BRCTLWINDOWOBSERVER_H
20 #define BRCTLWINDOWOBSERVER_H
25 #include <brctldefs.h>
32 enum TBrCtlWindowCommand
40 // FUNCTION PROTOTYPES
42 // FORWARD DECLARATIONS
43 class CBrCtlInterface;
46 * The MBrCtlWindowObserver class handles window events such open/close/etc
51 * #include <brctlwindowobserver.h>
53 * @see S60 Platform: Browser Control API Developer's Guide Version 2.0
54 * @lib BrowserEngine.lib
56 * @file brctlwindowobserver.h
59 class MBrCtlWindowObserver
61 public: // New functions
63 * Request the host applicaion to open the URL in a new window
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
75 virtual CBrCtlInterface* OpenWindowL(TDesC& aUrl, TDesC* aTargetName, TBool aUserInitiated,
79 * Find a window by target name
81 * @param aTargetName name of the window to find
82 * @return Return Value is the browser control associated with the window name
84 virtual CBrCtlInterface* FindWindowL( const TDesC& aTargetName ) const = 0;
87 * Handle window events such as close/focus etc
89 * @param aTargetName name of the window to send the event to
90 * @param aCommand Command to pass to the window
93 virtual void HandleWindowCommandL( const TDesC& aTargetName, TBrCtlWindowCommand aCommand ) = 0;
96 #endif // BRCTLWINDOWOBSERVER_H