1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
|
/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM d:/projects/mozilla_1_8_0_branch/mozilla/modules/plugin/base/public/nsIPluginManager2.idl
*/
#ifndef __gen_nsIPluginManager2_h__
#define __gen_nsIPluginManager2_h__
#ifndef __gen_nsIPluginManager_h__
#include "nsIPluginManager.h"
#endif
/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsIPlugin; /* forward declaration */
class nsIEventHandler; /* forward declaration */
/* starting interface: nsIPluginManager2 */
#define NS_IPLUGINMANAGER2_IID_STR "d2962dc0-4eb6-11d2-8164-006008119d7a"
#define NS_IPLUGINMANAGER2_IID \
{0xd2962dc0, 0x4eb6, 0x11d2, \
{ 0x81, 0x64, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a }}
/**
* Plugin Manager 2 Interface
* These extensions to nsIPluginManager are only available in Communicator 5.0.
*/
class NS_NO_VTABLE nsIPluginManager2 : public nsIPluginManager {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPLUGINMANAGER2_IID)
/**
* Puts up a wait cursor.
*
* @result - NS_OK if this operation was successful
*/
/* void beginWaitCursor (); */
NS_IMETHOD BeginWaitCursor(void) = 0;
/**
* Restores the previous (non-wait) cursor.
*
* @result - NS_OK if this operation was successful
*/
/* void endWaitCursor (); */
NS_IMETHOD EndWaitCursor(void) = 0;
/**
* Returns true if a URL protocol (e.g. "http") is supported.
*
* @param aProtocol - the protocol name
* @param aResult - true if the protocol is supported
* @result - NS_OK if this operation was successful
*/
/* void supportsURLProtocol (in string aProtocol, out boolean aResult); */
NS_IMETHOD SupportsURLProtocol(const char *aProtocol, PRBool *aResult) = 0;
/**
* This method may be called by the plugin to indicate that an error
* has occurred, e.g. that the plugin has failed or is shutting down
* spontaneously. This allows the browser to clean up any plugin-specific
* state.
*
* @param aPlugin - the plugin whose status is changing
* @param aStatus - the error status value
* @result - NS_OK if this operation was successful
*/
/* void notifyStatusChange (in nsIPlugin aPlugin, in nsresult aStatus); */
NS_IMETHOD NotifyStatusChange(nsIPlugin *aPlugin, nsresult aStatus) = 0;
/**
* Returns the proxy info for a given URL. The caller is required to
* free the resulting memory with nsIMalloc::Free. The result will be in the
* following format
*
* i) "DIRECT" -- no proxy
* ii) "PROXY xxx.xxx.xxx.xxx" -- use proxy
* iii) "SOCKS xxx.xxx.xxx.xxx" -- use SOCKS
* iv) Mixed. e.g. "PROXY 111.111.111.111;PROXY 112.112.112.112",
* "PROXY 111.111.111.111;SOCKS 112.112.112.112"....
*
* Which proxy/SOCKS to use is determined by the plugin.
*/
/* void findProxyForURL (in string aURL, out string aResult); */
NS_IMETHOD FindProxyForURL(const char *aURL, char **aResult) = 0;
/**
* Registers a top-level window with the browser. Events received by that
* window will be dispatched to the event handler specified.
*
* @param aHandler - the event handler for the window
* @param aWindow - the platform window reference
* @result - NS_OK if this operation was successful
*/
/* void registerWindow (in nsIEventHandler aHandler, in nsPluginPlatformWindowRef aWindow); */
NS_IMETHOD RegisterWindow(nsIEventHandler *aHandler, nsPluginPlatformWindowRef aWindow) = 0;
/**
* Unregisters a top-level window with the browser. The handler and window pair
* should be the same as that specified to RegisterWindow.
*
* @param aHandler - the event handler for the window
* @param aWindow - the platform window reference
* @result - NS_OK if this operation was successful
*/
/* void unregisterWindow (in nsIEventHandler aHandler, in nsPluginPlatformWindowRef aWindow); */
NS_IMETHOD UnregisterWindow(nsIEventHandler *aHandler, nsPluginPlatformWindowRef aWindow) = 0;
/**
* Allocates a new menu ID (for the Mac).
*
* @param aHandler - the event handler for the window
* @param aIsSubmenu - whether this is a sub-menu ID or not
* @param aResult - the resulting menu ID
* @result - NS_OK if this operation was successful
*/
/* void allocateMenuID (in nsIEventHandler aHandler, in boolean aIsSubmenu, out short aResult); */
NS_IMETHOD AllocateMenuID(nsIEventHandler *aHandler, PRBool aIsSubmenu, PRInt16 *aResult) = 0;
/**
* Deallocates a menu ID (for the Mac).
*
* @param aHandler - the event handler for the window
* @param aMenuID - the menu ID
* @result - NS_OK if this operation was successful
*/
/* void deallocateMenuID (in nsIEventHandler aHandler, in short aMenuID); */
NS_IMETHOD DeallocateMenuID(nsIEventHandler *aHandler, PRInt16 aMenuID) = 0;
/**
* Indicates whether this event handler has allocated the given menu ID.
*
* @param aHandler - the event handler for the window
* @param aMenuID - the menu ID
* @param aResult - returns PR_TRUE if the menu ID is allocated
* @result - NS_OK if this operation was successful
*/
/* void hasAllocatedMenuID (in nsIEventHandler aHandler, in short aMenuID, out boolean aResult); */
NS_IMETHOD HasAllocatedMenuID(nsIEventHandler *aHandler, PRInt16 aMenuID, PRBool *aResult) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIPLUGINMANAGER2 \
NS_IMETHOD BeginWaitCursor(void); \
NS_IMETHOD EndWaitCursor(void); \
NS_IMETHOD SupportsURLProtocol(const char *aProtocol, PRBool *aResult); \
NS_IMETHOD NotifyStatusChange(nsIPlugin *aPlugin, nsresult aStatus); \
NS_IMETHOD FindProxyForURL(const char *aURL, char **aResult); \
NS_IMETHOD RegisterWindow(nsIEventHandler *aHandler, nsPluginPlatformWindowRef aWindow); \
NS_IMETHOD UnregisterWindow(nsIEventHandler *aHandler, nsPluginPlatformWindowRef aWindow); \
NS_IMETHOD AllocateMenuID(nsIEventHandler *aHandler, PRBool aIsSubmenu, PRInt16 *aResult); \
NS_IMETHOD DeallocateMenuID(nsIEventHandler *aHandler, PRInt16 aMenuID); \
NS_IMETHOD HasAllocatedMenuID(nsIEventHandler *aHandler, PRInt16 aMenuID, PRBool *aResult);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIPLUGINMANAGER2(_to) \
NS_IMETHOD BeginWaitCursor(void) { return _to BeginWaitCursor(); } \
NS_IMETHOD EndWaitCursor(void) { return _to EndWaitCursor(); } \
NS_IMETHOD SupportsURLProtocol(const char *aProtocol, PRBool *aResult) { return _to SupportsURLProtocol(aProtocol, aResult); } \
NS_IMETHOD NotifyStatusChange(nsIPlugin *aPlugin, nsresult aStatus) { return _to NotifyStatusChange(aPlugin, aStatus); } \
NS_IMETHOD FindProxyForURL(const char *aURL, char **aResult) { return _to FindProxyForURL(aURL, aResult); } \
NS_IMETHOD RegisterWindow(nsIEventHandler *aHandler, nsPluginPlatformWindowRef aWindow) { return _to RegisterWindow(aHandler, aWindow); } \
NS_IMETHOD UnregisterWindow(nsIEventHandler *aHandler, nsPluginPlatformWindowRef aWindow) { return _to UnregisterWindow(aHandler, aWindow); } \
NS_IMETHOD AllocateMenuID(nsIEventHandler *aHandler, PRBool aIsSubmenu, PRInt16 *aResult) { return _to AllocateMenuID(aHandler, aIsSubmenu, aResult); } \
NS_IMETHOD DeallocateMenuID(nsIEventHandler *aHandler, PRInt16 aMenuID) { return _to DeallocateMenuID(aHandler, aMenuID); } \
NS_IMETHOD HasAllocatedMenuID(nsIEventHandler *aHandler, PRInt16 aMenuID, PRBool *aResult) { return _to HasAllocatedMenuID(aHandler, aMenuID, aResult); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIPLUGINMANAGER2(_to) \
NS_IMETHOD BeginWaitCursor(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->BeginWaitCursor(); } \
NS_IMETHOD EndWaitCursor(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->EndWaitCursor(); } \
NS_IMETHOD SupportsURLProtocol(const char *aProtocol, PRBool *aResult) { return !_to ? NS_ERROR_NULL_POINTER : _to->SupportsURLProtocol(aProtocol, aResult); } \
NS_IMETHOD NotifyStatusChange(nsIPlugin *aPlugin, nsresult aStatus) { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyStatusChange(aPlugin, aStatus); } \
NS_IMETHOD FindProxyForURL(const char *aURL, char **aResult) { return !_to ? NS_ERROR_NULL_POINTER : _to->FindProxyForURL(aURL, aResult); } \
NS_IMETHOD RegisterWindow(nsIEventHandler *aHandler, nsPluginPlatformWindowRef aWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterWindow(aHandler, aWindow); } \
NS_IMETHOD UnregisterWindow(nsIEventHandler *aHandler, nsPluginPlatformWindowRef aWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->UnregisterWindow(aHandler, aWindow); } \
NS_IMETHOD AllocateMenuID(nsIEventHandler *aHandler, PRBool aIsSubmenu, PRInt16 *aResult) { return !_to ? NS_ERROR_NULL_POINTER : _to->AllocateMenuID(aHandler, aIsSubmenu, aResult); } \
NS_IMETHOD DeallocateMenuID(nsIEventHandler *aHandler, PRInt16 aMenuID) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeallocateMenuID(aHandler, aMenuID); } \
NS_IMETHOD HasAllocatedMenuID(nsIEventHandler *aHandler, PRInt16 aMenuID, PRBool *aResult) { return !_to ? NS_ERROR_NULL_POINTER : _to->HasAllocatedMenuID(aHandler, aMenuID, aResult); }
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class nsPluginManager2 : public nsIPluginManager2
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIPLUGINMANAGER2
nsPluginManager2();
private:
~nsPluginManager2();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS1(nsPluginManager2, nsIPluginManager2)
nsPluginManager2::nsPluginManager2()
{
/* member initializers and constructor code */
}
nsPluginManager2::~nsPluginManager2()
{
/* destructor code */
}
/* void beginWaitCursor (); */
NS_IMETHODIMP nsPluginManager2::BeginWaitCursor()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void endWaitCursor (); */
NS_IMETHODIMP nsPluginManager2::EndWaitCursor()
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void supportsURLProtocol (in string aProtocol, out boolean aResult); */
NS_IMETHODIMP nsPluginManager2::SupportsURLProtocol(const char *aProtocol, PRBool *aResult)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void notifyStatusChange (in nsIPlugin aPlugin, in nsresult aStatus); */
NS_IMETHODIMP nsPluginManager2::NotifyStatusChange(nsIPlugin *aPlugin, nsresult aStatus)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void findProxyForURL (in string aURL, out string aResult); */
NS_IMETHODIMP nsPluginManager2::FindProxyForURL(const char *aURL, char **aResult)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void registerWindow (in nsIEventHandler aHandler, in nsPluginPlatformWindowRef aWindow); */
NS_IMETHODIMP nsPluginManager2::RegisterWindow(nsIEventHandler *aHandler, nsPluginPlatformWindowRef aWindow)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void unregisterWindow (in nsIEventHandler aHandler, in nsPluginPlatformWindowRef aWindow); */
NS_IMETHODIMP nsPluginManager2::UnregisterWindow(nsIEventHandler *aHandler, nsPluginPlatformWindowRef aWindow)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void allocateMenuID (in nsIEventHandler aHandler, in boolean aIsSubmenu, out short aResult); */
NS_IMETHODIMP nsPluginManager2::AllocateMenuID(nsIEventHandler *aHandler, PRBool aIsSubmenu, PRInt16 *aResult)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void deallocateMenuID (in nsIEventHandler aHandler, in short aMenuID); */
NS_IMETHODIMP nsPluginManager2::DeallocateMenuID(nsIEventHandler *aHandler, PRInt16 aMenuID)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void hasAllocatedMenuID (in nsIEventHandler aHandler, in short aMenuID, out boolean aResult); */
NS_IMETHODIMP nsPluginManager2::HasAllocatedMenuID(nsIEventHandler *aHandler, PRInt16 aMenuID, PRBool *aResult)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* End of implementation class template. */
#endif
#endif /* __gen_nsIPluginManager2_h__ */
|