FreeWRL/FreeX3D  3.0.0
nsIPluginManager.idl
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4  *
5  * The contents of this file are subject to the Mozilla Public License Version
6  * 1.1 (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  * http://www.mozilla.org/MPL/
9  *
10  * Software distributed under the License is distributed on an "AS IS" basis,
11  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12  * for the specific language governing rights and limitations under the
13  * License.
14  *
15  * The Original Code is mozilla.org code.
16  *
17  * The Initial Developer of the Original Code is
18  * Netscape Communications Corporation.
19  * Portions created by the Initial Developer are Copyright (C) 1998
20  * the Initial Developer. All Rights Reserved.
21  *
22  * Contributor(s):
23  *
24  * Alternatively, the contents of this file may be used under the terms of
25  * either the GNU General Public License Version 2 or later (the "GPL"), or
26  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27  * in which case the provisions of the GPL or the LGPL are applicable instead
28  * of those above. If you wish to allow use of your version of this file only
29  * under the terms of either the GPL or the LGPL, and not to allow others to
30  * use your version of this file under the terms of the MPL, indicate your
31  * decision by deleting the provisions above and replace them with the notice
32  * and other provisions required by the GPL or the LGPL. If you do not delete
33  * the provisions above, a recipient may use your version of this file under
34  * the terms of any one of the MPL, the GPL or the LGPL.
35  *
36  * ***** END LICENSE BLOCK ***** */
37 
48 #include "nsISupports.idl"
49 #include "nspluginroot.idl"
50 
51 %{C++
52 #include "nsplugindefs.h"
53 %}
54 
55 // CLSID for the browser's global plugin manager object.
56 %{C++
57 #define NS_PLUGINMANAGER_CID \
58 { /* ce768990-5a4e-11d2-8164-006008119d7a */ \
59  0xce768990, \
60  0x5a4e, \
61  0x11d2, \
62  {0x81, 0x64, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
63 }
64 %}
65 
66 interface nsIPluginStreamListener;
67 
68 [scriptable, uuid(da58ad80-4eb6-11d2-8164-006008119d7a)]
69 
70 /*
71  * The nsIPluginManager interface defines the minimum set of functionality that
72  * the browser will support if it allows plugins. Plugins can call QueryInterface
73  * to determine if a plugin manager implements more specific APIs or other
74  * browser interfaces for the plugin to use (e.g. nsINetworkManager).
75  */
76 
77 interface nsIPluginManager : nsISupports
78 {
88  [noscript] void GetValue(in nsPluginManagerVariable variable, in nativeVoid value);
89 
99  void reloadPlugins(in boolean reloadPages);
100 
108  [noscript] void UserAgent(in nativeChar resultingAgentString);
109 
131 %{C++
132  NS_IMETHOD
133  GetURL(nsISupports* pluginInst,
134  const char* url,
135  const char* target = NULL,
136  nsIPluginStreamListener* streamListener = NULL,
137  const char* altHost = NULL,
138  const char* referrer = NULL,
139  PRBool forceJSEnabled = PR_FALSE) = 0;
140 %}
141 
173 %{C++
174  NS_IMETHOD
175  PostURL(nsISupports* pluginInst,
176  const char* url,
177  PRUint32 postDataLen,
178  const char* postData,
179  PRBool isFile = PR_FALSE,
180  const char* target = NULL,
181  nsIPluginStreamListener* streamListener = NULL,
182  const char* altHost = NULL,
183  const char* referrer = NULL,
184  PRBool forceJSEnabled = PR_FALSE,
185  PRUint32 postHeadersLength = 0,
186  const char* postHeaders = NULL) = 0;
187 %}
188 
208  [noscript] void RegisterPlugin(in REFNSIID aCID,
209  in string aPluginName,
210  in string aDescription,
211  in nativeChar aMimeTypes,
212  in nativeChar aMimeDescriptions,
213  in nativeChar aFileExtensions,
214  in long aCount);
215 
222  [noscript] void UnregisterPlugin(in REFNSIID aCID);
223 
224 %{C++
236  NS_IMETHOD
237  GetURLWithHeaders(nsISupports* pluginInst,
238  const char* url,
239  const char* target = NULL,
240  nsIPluginStreamListener* streamListener = NULL,
241  const char* altHost = NULL,
242  const char* referrer = NULL,
243  PRBool forceJSEnabled = PR_FALSE,
244  PRUint32 getHeadersLength = 0,
245  const char* getHeaders = NULL) = 0;
246 %}
247 };
NS_IMETHOD GetURL(nsISupports *pluginInst, const char *url, const char *target=NULL, nsIPluginStreamListener *streamListener=NULL, const char *altHost=NULL, const char *referrer=NULL, PRBool forceJSEnabled=PR_FALSE)=0
Fetches a URL.
void RegisterPlugin(in REFNSIID aCID, in string aPluginName, in string aDescription, in nativeChar aMimeTypes, in nativeChar aMimeDescriptions, in nativeChar aFileExtensions, in long aCount)
Persistently register a plugin with the plugin manager.
void UserAgent(in nativeChar resultingAgentString)
Returns the user agent string for the browser.
void GetValue(in nsPluginManagerVariable variable, in nativeVoid value)
Returns the value of a variable associated with the plugin manager.
NS_IMETHOD GetURLWithHeaders(nsISupports *pluginInst, const char *url, const char *target=NULL, nsIPluginStreamListener *streamListener=NULL, const char *altHost=NULL, const char *referrer=NULL, PRBool forceJSEnabled=PR_FALSE, PRUint32 getHeadersLength=0, const char *getHeaders=NULL)=0
Fetches a URL, with Headers.
void UnregisterPlugin(in REFNSIID aCID)
Unregister a plugin from the plugin manager.
void reloadPlugins(in boolean reloadPages)
Causes the plugins directory to be searched again for new plugin libraries.
NS_IMETHOD PostURL(nsISupports *pluginInst, const char *url, PRUint32 postDataLen, const char *postData, PRBool isFile=PR_FALSE, const char *target=NULL, nsIPluginStreamListener *streamListener=NULL, const char *altHost=NULL, const char *referrer=NULL, PRBool forceJSEnabled=PR_FALSE, PRUint32 postHeadersLength=0, const char *postHeaders=NULL)=0
Posts to a URL with post data and/or post headers.
nsIPluginStreamListener