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: The plug-in can use this interface to communicate with the browser.
|
williamr@2
|
15 |
*
|
williamr@2
|
16 |
*/
|
williamr@2
|
17 |
|
williamr@2
|
18 |
|
williamr@2
|
19 |
#ifndef MPLUGINADAPTER_H
|
williamr@2
|
20 |
#define MPLUGINADAPTER_H
|
williamr@2
|
21 |
|
williamr@2
|
22 |
// INCLUDES
|
williamr@2
|
23 |
#include "coecntrl.h"
|
williamr@2
|
24 |
#include "coecobs.h"
|
williamr@2
|
25 |
#include "npupp.h"
|
williamr@2
|
26 |
|
williamr@2
|
27 |
// FORWARD DECLARATIONS
|
williamr@2
|
28 |
class MPluginNotifier;
|
williamr@2
|
29 |
|
williamr@2
|
30 |
|
williamr@2
|
31 |
class MOptionMenuHandler;
|
williamr@2
|
32 |
class CEikMenuPane;
|
williamr@2
|
33 |
|
williamr@2
|
34 |
// CLASS DECLARATION
|
williamr@2
|
35 |
|
williamr@2
|
36 |
/**
|
williamr@2
|
37 |
* The plug-in can use this interface to communicate with the browser.
|
williamr@2
|
38 |
*
|
williamr@2
|
39 |
* @lib PluginAdapterUtil in Series 80 Platforms and the Nokia 7710 smartphone
|
williamr@2
|
40 |
* @since Series 60 2nd Edition, Feature Pack 2 and Series 80 Platforms and the Nokia 7710 smartphone
|
williamr@2
|
41 |
*/
|
williamr@2
|
42 |
class MPluginAdapter
|
williamr@2
|
43 |
{
|
williamr@2
|
44 |
public: // New functions
|
williamr@2
|
45 |
|
williamr@2
|
46 |
/**
|
williamr@2
|
47 |
* Gets the pointer to the minor version number of the plug-in version number of the Browser Plug-in API.
|
williamr@2
|
48 |
* @since Series 60 2nd Edition, Feature Pack 2 and Series 80 Platforms and the Nokia 7710 smartphone
|
williamr@2
|
49 |
* @return Series 60 returns 1. Series 80 and the Nokia 7710 smartphone return 101.
|
williamr@2
|
50 |
*/
|
williamr@2
|
51 |
virtual TUint16 GetVersion()=0;
|
williamr@2
|
52 |
|
williamr@2
|
53 |
/**
|
williamr@2
|
54 |
* Called when the plug-in has completed its creation.
|
williamr@2
|
55 |
* This function is called from the constructL function of the plug-in.
|
williamr@2
|
56 |
* @since Series 60 2nd Edition, Feature Pack 2 and Series 80 Platforms and the Nokia 7710 smartphone
|
williamr@2
|
57 |
* @param aPluginControl A pointer to the plug-in control window
|
williamr@2
|
58 |
* @return None
|
williamr@2
|
59 |
*/
|
williamr@2
|
60 |
virtual void PluginConstructedL(CCoeControl* aPluginControl)=0;
|
williamr@2
|
61 |
|
williamr@2
|
62 |
/**
|
williamr@2
|
63 |
* Called after the plug-in has been deleted.
|
williamr@2
|
64 |
* This function is called from the destructor of the plug-in.
|
williamr@2
|
65 |
* @since Series 60 2nd Edition, Feature Pack 2 and Series 80 Platforms and the Nokia 7710 smartphone
|
williamr@2
|
66 |
* @return None
|
williamr@2
|
67 |
*/
|
williamr@2
|
68 |
virtual void PluginFinishedL()=0;
|
williamr@2
|
69 |
|
williamr@2
|
70 |
/**
|
williamr@2
|
71 |
* Returns the window system level control object for the plug-in.
|
williamr@2
|
72 |
* @since Series 60 2nd Edition, Feature Pack 2 and Series 80 Platforms and the Nokia 7710 smartphone
|
williamr@2
|
73 |
* @return A pointer to the parent control window.
|
williamr@2
|
74 |
*/
|
williamr@2
|
75 |
virtual CCoeControl* GetParentControl()=0;
|
williamr@2
|
76 |
|
williamr@2
|
77 |
/**
|
williamr@2
|
78 |
* Returns the observer for the plug-in control.
|
williamr@2
|
79 |
* @since Series 60 2nd Edition, Feature Pack 2 and Series 80 Platforms and the Nokia 7710 smartphone
|
williamr@2
|
80 |
* @return Observer that the plug-in can use to send events to the browser.
|
williamr@2
|
81 |
*/
|
williamr@2
|
82 |
virtual MCoeControlObserver* GetParentControlObserver()=0;
|
williamr@2
|
83 |
|
williamr@2
|
84 |
/**
|
williamr@2
|
85 |
* Sets the plug-in notifier allowing the plug-in to control portions of the browser.
|
williamr@2
|
86 |
* @since Series 60 2nd Edition, Feature Pack 2 and Series 80 Platforms and the Nokia 7710 smartphone
|
williamr@2
|
87 |
* @param aNotifier Pointer to an interface that the browser can use to send events to the plug-in.
|
williamr@2
|
88 |
* @return None
|
williamr@2
|
89 |
*/
|
williamr@2
|
90 |
virtual void SetPluginNotifier(MPluginNotifier *aNotifier)=0;
|
williamr@2
|
91 |
|
williamr@2
|
92 |
|
williamr@2
|
93 |
/**
|
williamr@2
|
94 |
* Sets the plug-in option menu handler allowing the plug-in to handle the custom menu commands
|
williamr@2
|
95 |
* from the browser.
|
williamr@2
|
96 |
* @since Series 60 3nd Edition
|
williamr@2
|
97 |
* @param aOptionMenuHandler Pointer to an interface that the browser can use to send option menu
|
williamr@2
|
98 |
* commands to the plug-in.
|
williamr@2
|
99 |
* @return None
|
williamr@2
|
100 |
*/
|
williamr@2
|
101 |
virtual void SetOptionMenuHandler(MOptionMenuHandler* /*aOptionMenuHandler*/) {};
|
williamr@2
|
102 |
};
|
williamr@2
|
103 |
|
williamr@2
|
104 |
|
williamr@2
|
105 |
/**
|
williamr@2
|
106 |
* Contains notification ability for plug-ins.
|
williamr@2
|
107 |
* These methods are implemented in the plugin.
|
williamr@2
|
108 |
*
|
williamr@2
|
109 |
* @lib
|
williamr@2
|
110 |
* @since Series 60 2nd Edition, Feature Pack 2 and Series 80 Platforms and the Nokia 7710 smartphone
|
williamr@2
|
111 |
*/
|
williamr@2
|
112 |
class MPluginNotifier
|
williamr@2
|
113 |
{
|
williamr@2
|
114 |
public: // Data
|
williamr@2
|
115 |
// Types of notifications which can be passed to the plugin.
|
williamr@2
|
116 |
enum TNotificationType {
|
williamr@2
|
117 |
EEditCut,
|
williamr@2
|
118 |
EEditCopy,
|
williamr@2
|
119 |
EEditPaste,
|
williamr@2
|
120 |
EEditDelete,
|
williamr@2
|
121 |
EApplicationFocusChanged,
|
williamr@2
|
122 |
ESystemNotification,
|
williamr@2
|
123 |
EPluginInvisible,
|
williamr@2
|
124 |
EPluginActivated,
|
williamr@2
|
125 |
EPluginDeactivated,
|
williamr@2
|
126 |
EMenuOptionEnableDecider,
|
williamr@2
|
127 |
EPluginPause
|
williamr@2
|
128 |
};
|
williamr@2
|
129 |
|
williamr@2
|
130 |
|
williamr@2
|
131 |
public: // New functions
|
williamr@2
|
132 |
|
williamr@2
|
133 |
/**
|
williamr@2
|
134 |
* Notifies the plugin of an event.
|
williamr@2
|
135 |
* @since Series 60 2nd Edition, Feature Pack 2 and Series 80 Platforms and the Nokia 7710 smartphone
|
williamr@2
|
136 |
* @param aCallType The event type that is passed to the plug-in
|
williamr@2
|
137 |
* @param aParam The parameter associated with the event
|
williamr@2
|
138 |
* @return Not used
|
williamr@2
|
139 |
*/
|
williamr@2
|
140 |
virtual TInt NotifyL (TNotificationType aCallType, TAny *aParam)=0;
|
williamr@2
|
141 |
|
williamr@2
|
142 |
};
|
williamr@2
|
143 |
|
williamr@2
|
144 |
|
williamr@2
|
145 |
/**
|
williamr@2
|
146 |
* Contains the ability for plug-ins to handle the menu option commands.
|
williamr@2
|
147 |
* These methods are implemented in the plugin.
|
williamr@2
|
148 |
*
|
williamr@2
|
149 |
* @lib
|
williamr@2
|
150 |
* @since Series 60 3rd Edition
|
williamr@2
|
151 |
*/
|
williamr@2
|
152 |
class MOptionMenuHandler
|
williamr@2
|
153 |
{
|
williamr@2
|
154 |
public: // New functions
|
williamr@2
|
155 |
|
williamr@2
|
156 |
/**
|
williamr@2
|
157 |
* AddPluginOptionMenuItemsL
|
williamr@2
|
158 |
* Add the Option Menu items to the menuPane, these will be handled by plugin.
|
williamr@2
|
159 |
*
|
williamr@2
|
160 |
* @since 3.1
|
williamr@2
|
161 |
* @param aMenuPane handle of the menu that will contain the options
|
williamr@2
|
162 |
* @param aCommandBase base id that needs to be added to the command ID
|
williamr@2
|
163 |
* @param aAfter Plugin options should be added after this index
|
williamr@2
|
164 |
* @return void
|
williamr@2
|
165 |
*/
|
williamr@2
|
166 |
virtual void AddPluginOptionMenuItemsL(CEikMenuPane& aMenuPane, TInt aCommandBase, TInt aAfter)=0;
|
williamr@2
|
167 |
|
williamr@2
|
168 |
/**
|
williamr@2
|
169 |
* HandlePluginCommandL
|
williamr@2
|
170 |
* Handle the user command from the option menu to the plugin.
|
williamr@2
|
171 |
*
|
williamr@2
|
172 |
* @since 3.1
|
williamr@2
|
173 |
* @param aCommandId the command ID of the option
|
williamr@2
|
174 |
* @return void
|
williamr@2
|
175 |
*/
|
williamr@2
|
176 |
virtual void HandlePluginCommandL(TInt aCommandId)=0;
|
williamr@2
|
177 |
|
williamr@2
|
178 |
};
|
williamr@2
|
179 |
|
williamr@2
|
180 |
#endif // MPLUGINADAPTER_H
|
williamr@2
|
181 |
|
williamr@2
|
182 |
|
williamr@2
|
183 |
// End of File
|