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