|
1 /* |
|
2 * Copyright (c) 2002-2004 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 "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: The plugin can use this interface to communicate with the browser. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CPLUGINCONTROLADAPTER_H |
|
21 #define CPLUGINCONTROLADAPTER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <PluginAdapterInterface.h> |
|
25 |
|
26 // CLASS DECLARATION |
|
27 |
|
28 /** |
|
29 * @ingroup group_xnnppluginfactory |
|
30 * |
|
31 * The plugin can use this interface to communicate with the browser. |
|
32 * |
|
33 * @lib xn3nppluginfactory.lib |
|
34 * @since Series 60 3.1 |
|
35 */ |
|
36 /* Note that inheritance order must be MPluginAdapter, CBase don't change it */ |
|
37 class CXnNPPluginControlAdapter : public MPluginAdapter, public CBase |
|
38 { |
|
39 public: // Functions from base classes |
|
40 |
|
41 /** |
|
42 * Gets the pointer to the minor version number of the plugin. |
|
43 * @since Series 60 3.1 |
|
44 * @return 1. |
|
45 */ |
|
46 TUint16 GetVersion() { return 1; }; |
|
47 |
|
48 /** |
|
49 * Called when the plug-in has completed its creation. |
|
50 * This function is called from the constructL function of the plug-in. |
|
51 * @since Series 60 3.1 |
|
52 * @param aPluginControl A pointer to the plug-in control window |
|
53 * @return None |
|
54 */ |
|
55 void PluginConstructedL( CCoeControl* aPluginControl ); |
|
56 |
|
57 /** |
|
58 * Called after the plug-in has been deleted. |
|
59 * This function is called from the destructor of the plug-in. |
|
60 * @since Series 60 3.1 |
|
61 * @return None |
|
62 */ |
|
63 void PluginFinishedL(); |
|
64 |
|
65 #ifndef __SERIES60_30__ |
|
66 |
|
67 /** |
|
68 * Called by the plug-in to open a URL in the parent frame. |
|
69 * This function is not implemented in Series 60. |
|
70 * @since Series 60 3.1 |
|
71 * @param aUrl Name of the URL to open |
|
72 * @return None |
|
73 */ |
|
74 inline void OpenUrlL( const TDesC& /*aUrl*/ ) {}; |
|
75 |
|
76 /** |
|
77 * Called by the plug-in to open a URL in a named window or frame. |
|
78 * This function is not implemented in Series 60. |
|
79 * @since Series 60 3.1 |
|
80 * @param aUrl Name of the URL to open |
|
81 * @param aNewTargetWindowName The name of the target window or frame |
|
82 * @return None |
|
83 */ |
|
84 inline void OpenUrlInTargetWindowL( const TDesC& /*aUrl*/, |
|
85 const TDesC& /*aNewTargetWindowName*/ ) {}; |
|
86 |
|
87 /** |
|
88 * Specifies whether or not the frame has a previous navigation history item. |
|
89 * This function is not implemented in Series 60. |
|
90 * @since Series 60 3.1 |
|
91 * @return true if the frame has a previous navigation history item false otherwise |
|
92 */ |
|
93 inline TBool HasNavigationHistoryPrevious() const { return EFalse; }; |
|
94 |
|
95 /** |
|
96 * Informs the browser to load the next navigation history URL in its parent frame. |
|
97 * This function is not implemented in Series 60. |
|
98 * @since Series 60 3.1 |
|
99 * @return None |
|
100 */ |
|
101 inline void LoadNavigationHistoryPreviousL() {}; |
|
102 |
|
103 /** |
|
104 * Returns whether the frame has a next navigation history item. |
|
105 * This function is not implemented in Series 60. |
|
106 * @since Series 60 3.1 |
|
107 * @return Returns whether the frame has a next navigation history item. |
|
108 */ |
|
109 inline TBool HasNavigationHistoryNext() const { return EFalse; }; |
|
110 |
|
111 /** |
|
112 * Informs the browser to load the next navigation history URL in its parent frame. |
|
113 * This function is not implemented in Series 60. |
|
114 * @since Series 60 3.1 |
|
115 * @return None |
|
116 */ |
|
117 inline void LoadNavigationHistoryNextL() {}; |
|
118 |
|
119 #endif // __SERIES60_30__ |
|
120 /** |
|
121 * Returns the window system level control object for the plug-in. |
|
122 * @since Series 60 3.1 |
|
123 * @return A pointer to the parent control window. |
|
124 */ |
|
125 CCoeControl* GetParentControl(); |
|
126 |
|
127 /** |
|
128 * Returns the observer for the plug-in control. |
|
129 * @since Series 60 3.1 |
|
130 * @return Observer that the plug-in can use to send events to the browser. |
|
131 */ |
|
132 MCoeControlObserver* GetParentControlObserver(); |
|
133 |
|
134 /** |
|
135 * Sets the plug-in notifier allowing the plug-in to control portions of the browser. |
|
136 * @since Series 60 3.1 |
|
137 * @param aNotifier Pointer to an interface that the browser can use to send |
|
138 * events to the plug-in. |
|
139 * @return None |
|
140 */ |
|
141 void SetPluginNotifier( MPluginNotifier *aNotifier ); |
|
142 /** |
|
143 * Tells the plugin adapter if plugin content can accept user interaction. This function |
|
144 * is called from the plugin. |
|
145 * @since Series 60 3nd Edition |
|
146 * @param None |
|
147 * @return None |
|
148 */ |
|
149 void SetContentInteractive(TBool /*aInteractive*/ ); |
|
150 |
|
151 |
|
152 public: // Data |
|
153 // Pointer to Browser Plugins control adapter, not owned |
|
154 CCoeControl* iNPPControlAdapter; |
|
155 // Pointer to parent control adapter, not owned |
|
156 CCoeControl* iParentControlAdapter; |
|
157 // Set by plugin. Notifies plugin through MPluginNotifier functions |
|
158 MPluginNotifier* iPluginNotifier; |
|
159 }; |
|
160 |
|
161 #endif // CPLUGINCONTROLADAPTER_H |
|
162 |
|
163 // End of File |