Breaking out new plugin APIs into separate classes. Moving lib/plugin into a module.
git-svn-id: svn://10.0.0.236/trunk@5217 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
41
mozilla/modules/plugin/base/public/MANIFEST
Normal file
41
mozilla/modules/plugin/base/public/MANIFEST
Normal file
@@ -0,0 +1,41 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
#
|
||||
# This is a list of local files which get copied to the mozilla:dist directory
|
||||
#
|
||||
|
||||
nsIFileUtilities.h
|
||||
nsIJRILiveConnectPlugin.h
|
||||
nsIJRILiveConnectPluginInstancePeer.h
|
||||
nsILiveConnectPlugin.h
|
||||
nsILiveConnectPluginInstancePeer.h
|
||||
nsIPlugin.h
|
||||
nsIPluginInstance.h
|
||||
nsIPluginInstancePeer.h
|
||||
nsIPluginInstancePeer2.h
|
||||
nsIPluginManager.h
|
||||
nsIPluginManager2.h
|
||||
nsIPluginStream.h
|
||||
nsIPluginStreamPeer.h
|
||||
nsIPluginStreamPeer2.h
|
||||
nsIPluginTagInfo.h
|
||||
nsIPluginTagInfo2.h
|
||||
nsISeekablePluginStreamPeer.h
|
||||
nsIWindowlessPluginInstancePeer.h
|
||||
nsplugin.h
|
||||
nsplugindefs.h
|
||||
44
mozilla/modules/plugin/base/public/Makefile
Normal file
44
mozilla/modules/plugin/base/public/Makefile
Normal file
@@ -0,0 +1,44 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
#
|
||||
|
||||
DEPTH = ../../..
|
||||
|
||||
MODULE = plugin
|
||||
|
||||
EXPORTS = \
|
||||
nsIFileUtilities.h \
|
||||
nsIJRILiveConnectPlugin.h \
|
||||
nsIJRILiveConnectPluginInstancePeer.h \
|
||||
nsILiveConnectPlugin.h \
|
||||
nsILiveConnectPluginInstancePeer.h \
|
||||
nsIPlugin.h \
|
||||
nsIPluginInstance.h \
|
||||
nsIPluginInstancePeer.h \
|
||||
nsIPluginInstancePeer2.h \
|
||||
nsIPluginManager.h \
|
||||
nsIPluginManager2.h \
|
||||
nsIPluginStream.h \
|
||||
nsIPluginStreamPeer.h \
|
||||
nsIPluginStreamPeer2.h \
|
||||
nsIPluginTagInfo.h \
|
||||
nsIPluginTagInfo2.h \
|
||||
nsISeekablePluginStreamPeer.h \
|
||||
nsIWindowlessPluginInstancePeer.h \
|
||||
nsplugin.h \
|
||||
nsplugindefs.h
|
||||
|
||||
include $(DEPTH)/config/rules.mk
|
||||
47
mozilla/modules/plugin/base/public/makefile.win
Normal file
47
mozilla/modules/plugin/base/public/makefile.win
Normal file
@@ -0,0 +1,47 @@
|
||||
#!gmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
IGNORE_MANIFEST=1
|
||||
|
||||
DEPTH = ..\..\..
|
||||
|
||||
MODULE = plugin
|
||||
|
||||
EXPORTS = \
|
||||
nsIFileUtilities.h \
|
||||
nsIJRILiveConnectPlugin.h \
|
||||
nsIJRILiveConnectPluginInstancePeer.h \
|
||||
nsILiveConnectPlugin.h \
|
||||
nsILiveConnectPluginInstancePeer.h \
|
||||
nsIPlugin.h \
|
||||
nsIPluginInstance.h \
|
||||
nsIPluginInstancePeer.h \
|
||||
nsIPluginInstancePeer2.h \
|
||||
nsIPluginManager.h \
|
||||
nsIPluginManager2.h \
|
||||
nsIPluginStream.h \
|
||||
nsIPluginStreamPeer.h \
|
||||
nsIPluginStreamPeer2.h \
|
||||
nsIPluginTagInfo.h \
|
||||
nsIPluginTagInfo2.h \
|
||||
nsISeekablePluginStreamPeer.h \
|
||||
nsIWindowlessPluginInstancePeer.h \
|
||||
nsplugin.h \
|
||||
nsplugindefs.h
|
||||
|
||||
include <$(DEPTH)/config/rules.mak>
|
||||
|
||||
75
mozilla/modules/plugin/base/public/nsIFileUtilities.h
Normal file
75
mozilla/modules/plugin/base/public/nsIFileUtilities.h
Normal file
@@ -0,0 +1,75 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIFileUtilities_h___
|
||||
#define nsIFileUtilities_h___
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// File Utilities Interface
|
||||
// This interface reflects operations only available in Communicator 5.0.
|
||||
|
||||
class nsIFileUtilities : public nsISupports {
|
||||
public:
|
||||
|
||||
// QueryInterface on nsIPluginManager to get this.
|
||||
|
||||
NS_IMETHOD_(const char*)
|
||||
GetProgramPath(void) = 0;
|
||||
|
||||
NS_IMETHOD_(const char*)
|
||||
GetTempDirPath(void) = 0;
|
||||
|
||||
enum FileNameType { SIGNED_APPLET_DBNAME, TEMP_FILENAME };
|
||||
|
||||
NS_IMETHOD_(nsresult)
|
||||
GetFileName(const char* fn, FileNameType type,
|
||||
char* resultBuf, PRUint32 bufLen) = 0;
|
||||
|
||||
NS_IMETHOD_(nsresult)
|
||||
NewTempFileName(const char* prefix, char* resultBuf, PRUint32 bufLen) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_IFILEUTILITIES_IID \
|
||||
{ /* 89a31ce0-019a-11d2-815b-006008119d7a */ \
|
||||
0x89a31ce0, \
|
||||
0x019a, \
|
||||
0x11d2, \
|
||||
{0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIFileUtilities_h___ */
|
||||
77
mozilla/modules/plugin/base/public/nsIJRILiveConnectPlugin.h
Normal file
77
mozilla/modules/plugin/base/public/nsIJRILiveConnectPlugin.h
Normal file
@@ -0,0 +1,77 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIJRILiveConnectPlugin_h__
|
||||
#define nsIJRILiveConnectPlugin_h__
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// JRI-Based LiveConnect Classes
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// This stuff is here so that the browser can support older JRI-based
|
||||
// LiveConnected plugins (when using old plugin to new C++-style plugin
|
||||
// adapter code).
|
||||
//
|
||||
// Warning: Don't use this anymore, unless you're sure that you have to!
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "jri.h" // ancient
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// JRILiveConnect Plugin Interface
|
||||
// This interface defines additional entry points that a plugin developer needs
|
||||
// to implement in order for the plugin to support JRI-based LiveConnect,
|
||||
// i.e. be scriptable by Java or JavaScript.
|
||||
|
||||
class nsIJRILiveConnectPlugin : public nsIPlugin {
|
||||
public:
|
||||
|
||||
// (Corresponds to NPP_GetJavaClass.)
|
||||
NS_IMETHOD_(jref)
|
||||
GetJavaClass(void) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_IJRILIVECONNECTPLUGIN_IID \
|
||||
{ /* c94058e0-f772-11d1-815b-006008119d7a */ \
|
||||
0xc94058e0, \
|
||||
0xf772, \
|
||||
0x11d1, \
|
||||
{0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIJRILiveConnectPlugin_h__ */
|
||||
@@ -0,0 +1,86 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIJRILiveConnectPluginInstancePeer_h__
|
||||
#define nsIJRILiveConnectPluginInstancePeer_h__
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// JRI-Based LiveConnect Classes
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// This stuff is here so that the browser can support older JRI-based
|
||||
// LiveConnected plugins (when using old plugin to new C++-style plugin
|
||||
// adapter code).
|
||||
//
|
||||
// Warning: Don't use this anymore, unless you're sure that you have to!
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "jri.h" // ancient
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// JRILiveConnect Plugin Instance Peer Interface
|
||||
// Browsers that support JRI-based LiveConnect implement this subclass of
|
||||
// plugin instance peer.
|
||||
|
||||
class nsIJRILiveConnectPluginInstancePeer : public nsISupports {
|
||||
public:
|
||||
|
||||
// (Corresponds to NPN_GetJavaPeer.)
|
||||
NS_IMETHOD_(jref)
|
||||
GetJavaPeer(void) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_IJRILIVECONNECTPLUGININSTANCEPEER_IID \
|
||||
{ /* 25b63f40-f773-11d1-815b-006008119d7a */ \
|
||||
0x25b63f40, \
|
||||
0xf773, \
|
||||
0x11d1, \
|
||||
{0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
// QueryInterface for this IID on nsIPluginManager to get a JRIEnv
|
||||
// XXX change this
|
||||
#define NS_IJRIENV_IID \
|
||||
{ /* f9d4ea00-a1bc-11d1-85b1-00805f0e4dfe */ \
|
||||
0xf9d4ea00, \
|
||||
0xa1bc, \
|
||||
0x11d1, \
|
||||
{0x85, 0xb1, 0x00, 0x80, 0x5f, 0x0e, 0x4d, 0xfe} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIJRILiveConnectPluginInstancePeer_h__ */
|
||||
65
mozilla/modules/plugin/base/public/nsILiveConnectPlugin.h
Normal file
65
mozilla/modules/plugin/base/public/nsILiveConnectPlugin.h
Normal file
@@ -0,0 +1,65 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsILiveConnectPlugin_h__
|
||||
#define nsILiveConnectPlugin_h__
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
#include "jni.h" // standard JVM API
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// LiveConnect Plugin Interface
|
||||
// This interface defines additional entry points that a plugin developer needs
|
||||
// to implement in order for the plugin to support JNI-based LiveConnect,
|
||||
// i.e. be scriptable by Java or JavaScript.
|
||||
|
||||
class nsILiveConnectPlugin : public nsIPlugin {
|
||||
public:
|
||||
|
||||
// (New JNI-based entry point, roughly corresponds to NPP_GetJavaClass.)
|
||||
NS_IMETHOD_(jclass)
|
||||
GetJavaClass(void) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_ILIVECONNECTPLUGIN_IID \
|
||||
{ /* cf134df0-a1bc-11d1-85b1-00805f0e4dfe */ \
|
||||
0xcf134df0, \
|
||||
0xa1bc, \
|
||||
0x11d1, \
|
||||
{0x85, 0xb1, 0x00, 0x80, 0x5f, 0x0e, 0x4d, 0xfe} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsILiveConnectPlugin_h__ */
|
||||
@@ -0,0 +1,74 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsILiveConnectPluginInstancePeer_h___
|
||||
#define nsILiveConnectPluginInstancePeer_h___
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
#include "jni.h" // standard JVM API
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// LiveConnect Plugin Instance Peer Interface
|
||||
// Browsers that support JNI-based LiveConnect implement this subclass of
|
||||
// plugin instance peer.
|
||||
|
||||
class nsILiveConnectPluginInstancePeer : public nsISupports {
|
||||
public:
|
||||
|
||||
// (New JNI-based entry point, roughly corresponds to NPN_GetJavaPeer.)
|
||||
NS_IMETHOD_(jobject)
|
||||
GetJavaPeer(void) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_ILIVECONNECTPLUGININSTANCEPEER_IID \
|
||||
{ /* 1e3502a0-a1bd-11d1-85b1-00805f0e4dfe */ \
|
||||
0x1e3502a0, \
|
||||
0xa1bd, \
|
||||
0x11d1, \
|
||||
{0x85, 0xb1, 0x00, 0x80, 0x5f, 0x0e, 0x4d, 0xfe} \
|
||||
}
|
||||
|
||||
// QueryInterface for this IID on nsIPluginManager to get a JNIEnv
|
||||
// XXX change this
|
||||
#define NS_IJNIENV_IID \
|
||||
{ /* 04610650-a1bd-11d1-85b1-00805f0e4dfe */ \
|
||||
0x04610650, \
|
||||
0xa1bd, \
|
||||
0x11d1, \
|
||||
{0x85, 0xb1, 0x00, 0x80, 0x5f, 0x0e, 0x4d, 0xfe} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsILiveConnectPluginInstancePeer_h___ */
|
||||
97
mozilla/modules/plugin/base/public/nsIPlugin.h
Normal file
97
mozilla/modules/plugin/base/public/nsIPlugin.h
Normal file
@@ -0,0 +1,97 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIPlugin_h___
|
||||
#define nsIPlugin_h___
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
#include "nsIFactory.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Plugin Interface
|
||||
// This is the minimum interface plugin developers need to support in order to
|
||||
// implement a plugin. The plugin manager may QueryInterface for more specific
|
||||
// plugin types, e.g. nsILiveConnectPlugin.
|
||||
|
||||
struct nsIPlugin : public nsIFactory {
|
||||
public:
|
||||
|
||||
// This call initializes the plugin and will be called before any new
|
||||
// instances are created. It is passed browserInterfaces on which QueryInterface
|
||||
// may be used to obtain an nsIPluginManager, and other interfaces.
|
||||
NS_IMETHOD_(nsPluginError)
|
||||
Initialize(nsISupports* browserInterfaces) = 0;
|
||||
|
||||
// (Corresponds to NPP_Shutdown.)
|
||||
// Called when the browser is done with the plugin factory, or when
|
||||
// the plugin is disabled by the user.
|
||||
NS_IMETHOD_(nsPluginError)
|
||||
Shutdown(void) = 0;
|
||||
|
||||
// (Corresponds to NPP_GetMIMEDescription.)
|
||||
NS_IMETHOD_(const char*)
|
||||
GetMIMEDescription(void) = 0;
|
||||
|
||||
// (Corresponds to NPP_GetValue.)
|
||||
NS_IMETHOD_(nsPluginError)
|
||||
GetValue(nsPluginVariable variable, void *value) = 0;
|
||||
|
||||
// (Corresponds to NPP_SetValue.)
|
||||
NS_IMETHOD_(nsPluginError)
|
||||
SetValue(nsPluginVariable variable, void *value) = 0;
|
||||
|
||||
// The old NPP_New call has been factored into two plugin instance methods:
|
||||
//
|
||||
// CreateInstance -- called once, after the plugin instance is created. This
|
||||
// method is used to initialize the new plugin instance (although the actual
|
||||
// plugin instance object will be created by the plugin manager).
|
||||
//
|
||||
// nsIPluginInstance::Start -- called when the plugin instance is to be
|
||||
// started. This happens in two circumstances: (1) after the plugin instance
|
||||
// is first initialized, and (2) after a plugin instance is returned to
|
||||
// (e.g. by going back in the window history) after previously being stopped
|
||||
// by the Stop method.
|
||||
|
||||
};
|
||||
|
||||
#define NS_IPLUGIN_IID \
|
||||
{ /* df773070-0199-11d2-815b-006008119d7a */ \
|
||||
0xdf773070, \
|
||||
0x0199, \
|
||||
0x11d2, \
|
||||
{0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIPlugin_h___ */
|
||||
111
mozilla/modules/plugin/base/public/nsIPluginInstance.h
Normal file
111
mozilla/modules/plugin/base/public/nsIPluginInstance.h
Normal file
@@ -0,0 +1,111 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIPluginInstance_h___
|
||||
#define nsIPluginInstance_h___
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Plugin Instance Interface
|
||||
|
||||
// (Corresponds to NPP object.)
|
||||
class nsIPluginInstance : public nsISupports {
|
||||
public:
|
||||
|
||||
NS_IMETHOD_(nsPluginError)
|
||||
Initialize(nsIPluginInstancePeer* peer) = 0;
|
||||
|
||||
// Required backpointer to the peer.
|
||||
NS_IMETHOD_(nsIPluginInstancePeer*)
|
||||
GetPeer(void) = 0;
|
||||
|
||||
// See comment for nsIPlugin::CreateInstance, above.
|
||||
NS_IMETHOD_(nsPluginError)
|
||||
Start(void) = 0;
|
||||
|
||||
// The old NPP_Destroy call has been factored into two plugin instance
|
||||
// methods:
|
||||
//
|
||||
// Stop -- called when the plugin instance is to be stopped (e.g. by
|
||||
// displaying another plugin manager window, causing the page containing
|
||||
// the plugin to become removed from the display).
|
||||
//
|
||||
// Release -- called once, before the plugin instance peer is to be
|
||||
// destroyed. This method is used to destroy the plugin instance.
|
||||
|
||||
NS_IMETHOD_(nsPluginError)
|
||||
Stop(void) = 0;
|
||||
|
||||
NS_IMETHOD_(nsPluginError)
|
||||
Destroy(void) = 0;
|
||||
|
||||
// (Corresponds to NPP_SetWindow.)
|
||||
NS_IMETHOD_(nsPluginError)
|
||||
SetWindow(nsPluginWindow* window) = 0;
|
||||
|
||||
// (Corresponds to NPP_NewStream.)
|
||||
NS_IMETHOD_(nsPluginError)
|
||||
NewStream(nsIPluginStreamPeer* peer, nsIPluginStream* *result) = 0;
|
||||
|
||||
// (Corresponds to NPP_Print.)
|
||||
NS_IMETHOD_(void)
|
||||
Print(nsPluginPrint* platformPrint) = 0;
|
||||
|
||||
// (Corresponds to NPP_HandleEvent.)
|
||||
// Note that for Unix and Mac the nsPluginEvent structure is different
|
||||
// from the old NPEvent structure -- it's no longer the native event
|
||||
// record, but is instead a struct. This was done for future extensibility,
|
||||
// and so that the Mac could receive the window argument too. For Windows
|
||||
// and OS2, it's always been a struct, so there's no change for them.
|
||||
NS_IMETHOD_(PRInt16)
|
||||
HandleEvent(nsPluginEvent* event) = 0;
|
||||
|
||||
// (Corresponds to NPP_URLNotify.)
|
||||
NS_IMETHOD_(void)
|
||||
URLNotify(const char* url, const char* target,
|
||||
nsPluginReason reason, void* notifyData) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_IPLUGININSTANCE_IID \
|
||||
{ /* ebe00f40-0199-11d2-815b-006008119d7a */ \
|
||||
0xebe00f40, \
|
||||
0x0199, \
|
||||
0x11d2, \
|
||||
{0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIPluginInstance_h___ */
|
||||
80
mozilla/modules/plugin/base/public/nsIPluginInstancePeer.h
Normal file
80
mozilla/modules/plugin/base/public/nsIPluginInstancePeer.h
Normal file
@@ -0,0 +1,80 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIPluginInstancePeer_h___
|
||||
#define nsIPluginInstancePeer_h___
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Plugin Instance Peer Interface
|
||||
|
||||
enum nsPluginTagType {
|
||||
nsPluginTagType_Unknown,
|
||||
nsPluginTagType_Embed,
|
||||
nsPluginTagType_Object,
|
||||
nsPluginTagType_Applet
|
||||
};
|
||||
|
||||
class nsIPluginInstancePeer : public nsISupports {
|
||||
public:
|
||||
|
||||
// (Corresponds to NPP_New's MIMEType argument.)
|
||||
NS_IMETHOD_(nsMIMEType)
|
||||
GetMIMEType(void) = 0;
|
||||
|
||||
// (Corresponds to NPP_New's mode argument.)
|
||||
NS_IMETHOD_(nsPluginType)
|
||||
GetMode(void) = 0;
|
||||
|
||||
// (Corresponds to NPN_NewStream.)
|
||||
NS_IMETHOD_(nsPluginError)
|
||||
NewStream(nsMIMEType type, const char* target, nsIOutputStream* *result) = 0;
|
||||
|
||||
// (Corresponds to NPN_Status.)
|
||||
NS_IMETHOD_(void)
|
||||
ShowStatus(const char* message) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_IPLUGININSTANCEPEER_IID \
|
||||
{ /* 4b7cea20-019b-11d2-815b-006008119d7a */ \
|
||||
0x4b7cea20, \
|
||||
0x019b, \
|
||||
0x11d2, \
|
||||
{0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIPluginInstancePeer_h___ */
|
||||
79
mozilla/modules/plugin/base/public/nsIPluginInstancePeer2.h
Normal file
79
mozilla/modules/plugin/base/public/nsIPluginInstancePeer2.h
Normal file
@@ -0,0 +1,79 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIPluginInstancePeer2_h___
|
||||
#define nsIPluginInstancePeer2_h___
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Plugin Instance Peer 2 Interface
|
||||
// These extensions to nsIPluginManager are only available in Communicator 5.0.
|
||||
|
||||
class nsIPluginInstancePeer2 : public nsIPluginInstancePeer {
|
||||
public:
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// New top-level window handling calls for Mac:
|
||||
|
||||
NS_IMETHOD_(void)
|
||||
RegisterWindow(void* window) = 0;
|
||||
|
||||
NS_IMETHOD_(void)
|
||||
UnregisterWindow(void* window) = 0;
|
||||
|
||||
// Menu ID allocation calls for Mac:
|
||||
NS_IMETHOD_(PRInt16)
|
||||
AllocateMenuID(PRBool isSubmenu) = 0;
|
||||
|
||||
// On the mac (and most likely win16), network activity can
|
||||
// only occur on the main thread. Therefore, we provide a hook
|
||||
// here for the case that the main thread needs to tickle itself.
|
||||
// In this case, we make sure that we give up the monitor so that
|
||||
// the tickle code can notify it without freezing.
|
||||
NS_IMETHOD_(PRBool)
|
||||
Tickle(void) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_IPLUGININSTANCEPEER2_IID \
|
||||
{ /* 51b52b80-019b-11d2-815b-006008119d7a */ \
|
||||
0x51b52b80, \
|
||||
0x019b, \
|
||||
0x11d2, \
|
||||
{0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIPluginInstancePeer2_h___ */
|
||||
128
mozilla/modules/plugin/base/public/nsIPluginManager.h
Normal file
128
mozilla/modules/plugin/base/public/nsIPluginManager.h
Normal file
@@ -0,0 +1,128 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIPluginManager_h___
|
||||
#define nsIPluginManager_h___
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Plugin Manager Interface
|
||||
// This interface defines the minimum set of functionality that a plugin
|
||||
// manager will support if it implements plugins. Plugin implementations can
|
||||
// QueryInterface to determine if a plugin manager implements more specific
|
||||
// APIs for the plugin to use.
|
||||
|
||||
class nsIPluginManager : public nsISupports {
|
||||
public:
|
||||
|
||||
// (Corresponds to NPN_ReloadPlugins.)
|
||||
NS_IMETHOD_(void)
|
||||
ReloadPlugins(PRBool reloadPages) = 0;
|
||||
|
||||
// (Corresponds to NPN_MemAlloc.)
|
||||
NS_IMETHOD_(void*)
|
||||
MemAlloc(PRUint32 size) = 0;
|
||||
|
||||
// (Corresponds to NPN_MemFree.)
|
||||
NS_IMETHOD_(void)
|
||||
MemFree(void* ptr) = 0;
|
||||
|
||||
// (Corresponds to NPN_MemFlush.)
|
||||
NS_IMETHOD_(PRUint32)
|
||||
MemFlush(PRUint32 size) = 0;
|
||||
|
||||
// (Corresponds to NPN_UserAgent.)
|
||||
NS_IMETHOD_(const char*)
|
||||
UserAgent(void) = 0;
|
||||
|
||||
// (Corresponds to NPN_GetValue.)
|
||||
NS_IMETHOD_(nsPluginError)
|
||||
GetValue(nsPluginManagerVariable variable, void *value) = 0;
|
||||
|
||||
// (Corresponds to NPN_SetValue.)
|
||||
NS_IMETHOD_(nsPluginError)
|
||||
SetValue(nsPluginManagerVariable variable, void *value) = 0;
|
||||
|
||||
|
||||
// (Corresponds to NPN_GetURL and NPN_GetURLNotify.)
|
||||
// notifyData: When present, URLNotify is called passing the notifyData back
|
||||
// to the client. When NULL, this call behaves like NPN_GetURL.
|
||||
// New arguments:
|
||||
// peer: A plugin instance peer. The peer's window will be used to display
|
||||
// progress information. If NULL, the load happens in the background.
|
||||
// altHost: An IP-address string that will be used instead of the host
|
||||
// specified in the URL. This is used to prevent DNS-spoofing attacks.
|
||||
// Can be defaulted to NULL meaning use the host in the URL.
|
||||
// referrer:
|
||||
// forceJSEnabled: Forces JavaScript to be enabled for 'javascript:' URLs,
|
||||
// even if the user currently has JavaScript disabled.
|
||||
NS_IMETHOD_(nsPluginError)
|
||||
GetURL(nsISupports* peer, const char* url, const char* target, void* notifyData = NULL,
|
||||
const char* altHost = NULL, const char* referrer = NULL,
|
||||
PRBool forceJSEnabled = PR_FALSE) = 0;
|
||||
|
||||
// (Corresponds to NPN_PostURL and NPN_PostURLNotify.)
|
||||
// notifyData: When present, URLNotify is called passing the notifyData back
|
||||
// to the client. When NULL, this call behaves like NPN_GetURL.
|
||||
// New arguments:
|
||||
// peer: A plugin instance peer. The peer's window will be used to display
|
||||
// progress information. If NULL, the load happens in the background.
|
||||
// altHost: An IP-address string that will be used instead of the host
|
||||
// specified in the URL. This is used to prevent DNS-spoofing attacks.
|
||||
// Can be defaulted to NULL meaning use the host in the URL.
|
||||
// referrer:
|
||||
// forceJSEnabled: Forces JavaScript to be enabled for 'javascript:' URLs,
|
||||
// even if the user currently has JavaScript disabled.
|
||||
// postHeaders: A string containing post headers.
|
||||
// postHeadersLength: The length of the post headers string.
|
||||
NS_IMETHOD_(nsPluginError)
|
||||
PostURL(nsISupports* peer, const char* url, const char* target, PRUint32 bufLen,
|
||||
const char* buf, PRBool file, void* notifyData = NULL,
|
||||
const char* altHost = NULL, const char* referrer = NULL,
|
||||
PRBool forceJSEnabled = PR_FALSE,
|
||||
PRUint32 postHeadersLength = 0, const char* postHeaders = NULL) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_IPLUGINMANAGER_IID \
|
||||
{ /* f10b9600-a1bc-11d1-85b1-00805f0e4dfe */ \
|
||||
0xf10b9600, \
|
||||
0xa1bc, \
|
||||
0x11d1, \
|
||||
{0x85, 0xb1, 0x00, 0x80, 0x5f, 0x0e, 0x4d, 0xfe} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIPluginManager_h___ */
|
||||
67
mozilla/modules/plugin/base/public/nsIPluginManager2.h
Normal file
67
mozilla/modules/plugin/base/public/nsIPluginManager2.h
Normal file
@@ -0,0 +1,67 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIPluginManager2_h___
|
||||
#define nsIPluginManager2_h___
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Plugin Manager 2 Interface
|
||||
// These extensions to nsIPluginManager are only available in Communicator 5.0.
|
||||
|
||||
class nsIPluginManager2 : public nsIPluginManager {
|
||||
public:
|
||||
|
||||
NS_IMETHOD_(void)
|
||||
BeginWaitCursor(void) = 0;
|
||||
|
||||
NS_IMETHOD_(void)
|
||||
EndWaitCursor(void) = 0;
|
||||
|
||||
NS_IMETHOD_(PRBool)
|
||||
SupportsURLProtocol(const char* protocol) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_IPLUGINMANAGER2_IID \
|
||||
{ /* 29c4ae70-019a-11d2-815b-006008119d7a */ \
|
||||
0x29c4ae70, \
|
||||
0x019a, \
|
||||
0x11d2, \
|
||||
{0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIPluginManager2_h___ */
|
||||
66
mozilla/modules/plugin/base/public/nsIPluginStream.h
Normal file
66
mozilla/modules/plugin/base/public/nsIPluginStream.h
Normal file
@@ -0,0 +1,66 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIPluginStream_h___
|
||||
#define nsIPluginStream_h___
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
#include "nsIOutputStream.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Plugin Stream Interface
|
||||
|
||||
class nsIPluginStream : public nsIOutputStream {
|
||||
public:
|
||||
|
||||
// (Corresponds to NPP_NewStream's stype return parameter.)
|
||||
NS_IMETHOD_(NPStreamType)
|
||||
GetStreamType(void) = 0;
|
||||
|
||||
// (Corresponds to NPP_StreamAsFile.)
|
||||
NS_IMETHOD_(void)
|
||||
AsFile(const char* fname) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_IPLUGINSTREAM_IID \
|
||||
{ /* f287dd50-0199-11d2-815b-006008119d7a */ \
|
||||
0xf287dd50, \
|
||||
0x0199, \
|
||||
0x11d2, \
|
||||
{0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIPluginStream_h___ */
|
||||
84
mozilla/modules/plugin/base/public/nsIPluginStreamPeer.h
Normal file
84
mozilla/modules/plugin/base/public/nsIPluginStreamPeer.h
Normal file
@@ -0,0 +1,84 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIPluginStreamPeer_h___
|
||||
#define nsIPluginStreamPeer_h___
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Plugin Stream Peer Interface
|
||||
// A plugin stream peer is passed to a plugin instance's NewStream call in
|
||||
// order to indicate that a new stream is to be created and be read by the
|
||||
// plugin instance.
|
||||
|
||||
class nsIPluginStreamPeer : public nsISupports {
|
||||
public:
|
||||
|
||||
// (Corresponds to NPStream's url field.)
|
||||
NS_IMETHOD_(const char*)
|
||||
GetURL(void) = 0;
|
||||
|
||||
// (Corresponds to NPStream's end field.)
|
||||
NS_IMETHOD_(PRUint32)
|
||||
GetEnd(void) = 0;
|
||||
|
||||
// (Corresponds to NPStream's lastmodified field.)
|
||||
NS_IMETHOD_(PRUint32)
|
||||
GetLastModified(void) = 0;
|
||||
|
||||
// (Corresponds to NPStream's notifyData field.)
|
||||
NS_IMETHOD_(void*)
|
||||
GetNotifyData(void) = 0;
|
||||
|
||||
// (Corresponds to NPP_DestroyStream's reason argument.)
|
||||
NS_IMETHOD_(nsPluginReason)
|
||||
GetReason(void) = 0;
|
||||
|
||||
// (Corresponds to NPP_NewStream's MIMEType argument.)
|
||||
NS_IMETHOD_(nsMIMEType)
|
||||
GetMIMEType(void) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_IPLUGINSTREAMPEER_IID \
|
||||
{ /* 717b1e90-019b-11d2-815b-006008119d7a */ \
|
||||
0x717b1e90, \
|
||||
0x019b, \
|
||||
0x11d2, \
|
||||
{0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIPluginStreamPeer_h___ */
|
||||
70
mozilla/modules/plugin/base/public/nsIPluginStreamPeer2.h
Normal file
70
mozilla/modules/plugin/base/public/nsIPluginStreamPeer2.h
Normal file
@@ -0,0 +1,70 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIPluginStreamPeer2_h___
|
||||
#define nsIPluginStreamPeer2_h___
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Plugin Stream Peer Interface
|
||||
// These extensions to nsIPluginStreamPeer are only available in Communicator 5.0.
|
||||
|
||||
class nsIPluginStreamPeer2 : public nsIPluginStreamPeer {
|
||||
public:
|
||||
|
||||
NS_IMETHOD_(PRUint32)
|
||||
GetContentLength(void) = 0;
|
||||
|
||||
NS_IMETHOD_(PRUint32)
|
||||
GetHeaderFieldCount(void) = 0;
|
||||
|
||||
NS_IMETHOD_(const char*)
|
||||
GetHeaderFieldKey(PRUint32 index) = 0;
|
||||
|
||||
NS_IMETHOD_(const char*)
|
||||
GetHeaderField(PRUint32 index) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_IPLUGINSTREAMPEER2_IID \
|
||||
{ /* 77083af0-019b-11d2-815b-006008119d7a */ \
|
||||
0x77083af0, \
|
||||
0x019b, \
|
||||
0x11d2, \
|
||||
{0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIPluginStreamPeer2_h___ */
|
||||
74
mozilla/modules/plugin/base/public/nsIPluginTagInfo.h
Normal file
74
mozilla/modules/plugin/base/public/nsIPluginTagInfo.h
Normal file
@@ -0,0 +1,74 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIPluginTagInfo_h___
|
||||
#define nsIPluginTagInfo_h___
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Plugin Tag Info Interface
|
||||
// This interface provides information about the HTML tag on the page.
|
||||
// Some day this might get superseded by a DOM API.
|
||||
|
||||
class nsIPluginTagInfo : public nsISupports {
|
||||
public:
|
||||
|
||||
// QueryInterface on nsIPluginInstancePeer to get this.
|
||||
|
||||
// (Corresponds to NPP_New's argc, argn, and argv arguments.)
|
||||
// Get a ptr to the paired list of attribute names and values,
|
||||
// returns the length of the array.
|
||||
//
|
||||
// Each name or value is a null-terminated string.
|
||||
NS_IMETHOD_(nsPluginError)
|
||||
GetAttributes(PRUint16& n, const char*const*& names, const char*const*& values) = 0;
|
||||
|
||||
// Get the value for the named attribute. Returns NULL
|
||||
// if the attribute was not set.
|
||||
NS_IMETHOD_(const char*)
|
||||
GetAttribute(const char* name) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_IPLUGINTAGINFO_IID \
|
||||
{ /* 5f1ec1d0-019b-11d2-815b-006008119d7a */ \
|
||||
0x5f1ec1d0, \
|
||||
0x019b, \
|
||||
0x11d2, \
|
||||
{0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIPluginTagInfo_h___ */
|
||||
110
mozilla/modules/plugin/base/public/nsIPluginTagInfo2.h
Normal file
110
mozilla/modules/plugin/base/public/nsIPluginTagInfo2.h
Normal file
@@ -0,0 +1,110 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIPluginTagInfo2_h___
|
||||
#define nsIPluginTagInfo2_h___
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Plugin Tag Info Interface
|
||||
// These extensions to nsIPluginTagInfo are only available in Communicator 5.0.
|
||||
|
||||
class nsIPluginTagInfo2 : public nsIPluginTagInfo {
|
||||
public:
|
||||
|
||||
// QueryInterface on nsIPluginInstancePeer to get this.
|
||||
|
||||
// Get the type of the HTML tag that was used ot instantiate this
|
||||
// plugin. Currently supported tags are EMBED, OBJECT and APPLET.
|
||||
NS_IMETHOD_(nsPluginTagType)
|
||||
GetTagType(void) = 0;
|
||||
|
||||
// Get the complete text of the HTML tag that was
|
||||
// used to instantiate this plugin
|
||||
NS_IMETHOD_(const char *)
|
||||
GetTagText(void) = 0;
|
||||
|
||||
// Get a ptr to the paired list of parameter names and values,
|
||||
// returns the length of the array.
|
||||
//
|
||||
// Each name or value is a null-terminated string.
|
||||
NS_IMETHOD_(nsPluginError)
|
||||
GetParameters(PRUint16& n, const char*const*& names, const char*const*& values) = 0;
|
||||
|
||||
// Get the value for the named parameter. Returns null
|
||||
// if the parameter was not set.
|
||||
NS_IMETHOD_(const char*)
|
||||
GetParameter(const char* name) = 0;
|
||||
|
||||
NS_IMETHOD_(const char*)
|
||||
GetDocumentBase(void) = 0;
|
||||
|
||||
// Return an encoding whose name is specified in:
|
||||
// http://java.sun.com/products/jdk/1.1/docs/guide/intl/intl.doc.html#25303
|
||||
NS_IMETHOD_(const char*)
|
||||
GetDocumentEncoding(void) = 0;
|
||||
|
||||
NS_IMETHOD_(const char*)
|
||||
GetAlignment(void) = 0;
|
||||
|
||||
NS_IMETHOD_(PRUint32)
|
||||
GetWidth(void) = 0;
|
||||
|
||||
NS_IMETHOD_(PRUint32)
|
||||
GetHeight(void) = 0;
|
||||
|
||||
NS_IMETHOD_(PRUint32)
|
||||
GetBorderVertSpace(void) = 0;
|
||||
|
||||
NS_IMETHOD_(PRUint32)
|
||||
GetBorderHorizSpace(void) = 0;
|
||||
|
||||
// Returns a unique id for the current document on which the
|
||||
// plugin is displayed.
|
||||
NS_IMETHOD_(PRUint32)
|
||||
GetUniqueID(void) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_IPLUGINTAGINFO2_IID \
|
||||
{ /* 6a49c9a0-019b-11d2-815b-006008119d7a */ \
|
||||
0x6a49c9a0, \
|
||||
0x019b, \
|
||||
0x11d2, \
|
||||
{0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIPluginTagInfo2_h___ */
|
||||
@@ -0,0 +1,67 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsISeekablePluginStreamPeer_h___
|
||||
#define nsISeekablePluginStreamPeer_h___
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Seekable Plugin Stream Peer Interface
|
||||
// The browser implements this subclass of plugin stream peer if a stream
|
||||
// is seekable. Plugins can query interface for this type, and call the
|
||||
// RequestRead method to seek to a particular position in the stream.
|
||||
|
||||
class nsISeekablePluginStreamPeer : public nsISupports {
|
||||
public:
|
||||
|
||||
// QueryInterface for this class corresponds to NPP_NewStream's
|
||||
// seekable argument.
|
||||
|
||||
// (Corresponds to NPN_RequestRead.)
|
||||
NS_IMETHOD_(nsPluginError)
|
||||
RequestRead(nsByteRange* rangeList) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_ISEEKABLEPLUGINSTREAMPEER_IID \
|
||||
{ /* 7e028d20-019b-11d2-815b-006008119d7a */ \
|
||||
0x7e028d20, \
|
||||
0x019b, \
|
||||
0x11d2, \
|
||||
{0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsISeekablePluginStreamPeer_h___ */
|
||||
@@ -0,0 +1,69 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this interface fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsIWindowlessPluginInstancePeer_h___
|
||||
#define nsIWindowlessPluginInstancePeer_h___
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Windowless Plugin Instance Peer Interface
|
||||
|
||||
class nsIWindowlessPluginInstancePeer : public nsISupports {
|
||||
public:
|
||||
|
||||
// (Corresponds to NPN_InvalidateRect.)
|
||||
NS_IMETHOD_(void)
|
||||
InvalidateRect(nsRect *invalidRect) = 0;
|
||||
|
||||
// (Corresponds to NPN_InvalidateRegion.)
|
||||
NS_IMETHOD_(void)
|
||||
InvalidateRegion(nsRegion invalidRegion) = 0;
|
||||
|
||||
// (Corresponds to NPN_ForceRedraw.)
|
||||
NS_IMETHOD_(void)
|
||||
ForceRedraw(void) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define NS_IWINDOWLESSPLUGININSTANCEPEER_IID \
|
||||
{ /* 57b4e2f0-019b-11d2-815b-006008119d7a */ \
|
||||
0x57b4e2f0, \
|
||||
0x019b, \
|
||||
0x11d2, \
|
||||
{0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif /* nsIWindowlessPluginInstancePeer_h___ */
|
||||
238
mozilla/modules/plugin/base/public/nsplugin.h
Normal file
238
mozilla/modules/plugin/base/public/nsplugin.h
Normal file
@@ -0,0 +1,238 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>This is the master header file that includes most of the other headers
|
||||
* you'll need to write a plugin.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* The following diagram depicts the relationships between various objects
|
||||
* implementing the new plugin interfaces. QueryInterface can be used to switch
|
||||
* between interfaces in the same box:
|
||||
*
|
||||
*
|
||||
* the plugin (only 1)
|
||||
* +----------------------+
|
||||
* | nsIPlugin or |<- - - - - -NSGetFactory()
|
||||
* | nsILiveConnectPlugin |
|
||||
* +----------------------+
|
||||
* |
|
||||
* |
|
||||
* | instances (many) streams to receive URL data (many)
|
||||
* | +-------------------+ +-----------------+
|
||||
* | | nsIPluginInstance |+ | nsIPluginStream |+
|
||||
* | | || | ||
|
||||
* | +-------------------+| +-----------------+|
|
||||
* | +------|-----------+ +------|---------+
|
||||
* | | |
|
||||
* | PLUGIN SIDE |peer |peer
|
||||
*~~~~|~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~
|
||||
* | BROWSER SIDE | |
|
||||
* | v v
|
||||
* | +---------------------------------+ +----------------------------+
|
||||
* | | nsIPluginInstancePeer |+ | nsIPluginStreamPeer |+
|
||||
* | | nsIPluginInstancePeer2 || | nsISeekablePluginStreamPeer||
|
||||
* | | nsIWindowlessPluginInstancePeer || | nsIPluginstreamPeer2 ||
|
||||
* | | nsILiveConnectPluginInstancePeer|| +----------------------------+|
|
||||
* | | nsIPluginTagInfo || +---------------------------+
|
||||
* | | nsIPluginTagInfo2 ||
|
||||
* | +---------------------------------+|
|
||||
* | +--------------------------------+
|
||||
* |
|
||||
* |
|
||||
* v the browser (only 1)
|
||||
* +---------------------+
|
||||
* | nsIPluginManager |
|
||||
* | nsIPluginManager2 |
|
||||
* | nsIFileUtilities |
|
||||
* | nsIPref |
|
||||
* | nsICacheManager ... |
|
||||
* +---------------------+
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef nsplugins_h___
|
||||
#define nsplugins_h___
|
||||
|
||||
#include "nsRepository.h" // for NSGetFactory
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>Interfaces which must be implemented by a plugin</B>
|
||||
* These interfaces have NPP equivalents in pre-5.0 browsers (see npapi.h).
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* NSGetFactory is the main entry point to the plugin's DLL. The plugin manager
|
||||
* finds this symbol and calls it to create the plugin class. Once the plugin
|
||||
* object is returned to the plugin manager, instances on the page are created
|
||||
* by calling nsIPlugin::CreateInstance.
|
||||
*/
|
||||
// (Declared in nsRepository.h)
|
||||
//extern "C" NS_EXPORT nsresult NSGetFactory(const nsCID &aClass,
|
||||
// nsIFactory **aFactory);
|
||||
|
||||
/**
|
||||
* A plugin object is used to create new plugin instances. It manages the
|
||||
* global state of all plugins with the same implementation.
|
||||
*/
|
||||
#include "nsIPlugin.h"
|
||||
|
||||
/**
|
||||
* A plugin instance represents a particular activation of a plugin on a page.
|
||||
*/
|
||||
#include "nsIPluginInstance.h"
|
||||
|
||||
/**
|
||||
* A plugin stream gets instantiated when a plugin instance receives data from
|
||||
* the browser.
|
||||
*/
|
||||
#include "nsIPluginStream.h"
|
||||
|
||||
/**
|
||||
* The nsILiveConnectPlugin interface provides additional operations that a
|
||||
* plugin must implement if it is to be controlled by JavaScript through
|
||||
* LiveConnect.
|
||||
*
|
||||
* Note that this interface is part of a new JNI-based LiveConnect
|
||||
* implementation and superceeds that provided prior to Communicator 5.0.
|
||||
*/
|
||||
#include "nsILiveConnectPlugin.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>Interfaces implemented by the browser:
|
||||
* These interfaces have NPN equivalents in pre-5.0 browsers (see npapi.h).
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* The plugin manager which is the main point of interaction with the browser
|
||||
* and provides general operations needed by a plugin.
|
||||
*/
|
||||
#include "nsIPluginManager.h"
|
||||
|
||||
/**
|
||||
* A plugin instance peer gets created by the browser and associated with each
|
||||
* plugin instance to represent tag information and other callbacks needed by
|
||||
* the plugin instance.
|
||||
*/
|
||||
#include "nsIPluginInstancePeer.h"
|
||||
|
||||
/**
|
||||
* The nsIPluginTagInfo interface provides information about the html tag
|
||||
* that was used to instantiate the plugin instance.
|
||||
*
|
||||
* To obtain: QueryInterface on nsIPluginInstancePeer
|
||||
*/
|
||||
#include "nsIPluginTagInfo.h"
|
||||
|
||||
/**
|
||||
* The nsIWindowlessPluginInstancePeer provides additional operations for
|
||||
* windowless plugins.
|
||||
*
|
||||
* To obtain: QueryInterface on nsIPluginInstancePeer
|
||||
*/
|
||||
#include "nsIWindowlessPluginInstancePeer.h"
|
||||
|
||||
/**
|
||||
* A plugin stream peer gets create by the browser and associated with each
|
||||
* plugin stream to represent stream and URL information, and provides
|
||||
* other callbacks needed by the plugin stream.
|
||||
*/
|
||||
#include "nsIPluginStreamPeer.h"
|
||||
|
||||
/**
|
||||
* The nsISeekablePluginStreamPeer provides additional operations for seekable
|
||||
* plugin streams.
|
||||
*
|
||||
* To obtain: QueryInterface on nsIPluginStreamPeer
|
||||
*/
|
||||
#include "nsISeekablePluginStreamPeer.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>Interfaces implemented by the browser (new for 5.0):
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* The nsIPluginManager2 interface provides additional plugin manager features
|
||||
* only available in Communicator 5.0.
|
||||
*
|
||||
* To obtain: QueryInterface on nsIPluginManager
|
||||
*/
|
||||
#include "nsIPluginManager2.h"
|
||||
|
||||
/**
|
||||
* The nsIFileUtilities interface provides operations to manage temporary
|
||||
* files and directories.
|
||||
*
|
||||
* To obtain: QueryInterface on nsIPluginManager
|
||||
*/
|
||||
#include "nsIFileUtilities.h"
|
||||
|
||||
/**
|
||||
* The nsIPluginInstancePeer2 interface provides additional plugin instance
|
||||
* peer features only available in Communicator 5.0.
|
||||
*
|
||||
* To obtain: QueryInterface on nsIPluginInstancePeer
|
||||
*/
|
||||
#include "nsIPluginInstancePeer2.h"
|
||||
|
||||
/**
|
||||
* The nsILiveConnectPluginInstancePeer allows plugins to be manipulated
|
||||
* by JavaScript, providing basic scriptability.
|
||||
*
|
||||
* Note that this interface is part of a new JNI-based LiveConnect
|
||||
* implementation and superceeds that provided prior to Communicator 5.0.
|
||||
*
|
||||
* To obtain: QueryInterface on nsIPluginInstancePeer
|
||||
*/
|
||||
#include "nsILiveConnectPluginInstancePeer.h"
|
||||
|
||||
/**
|
||||
* The nsIPluginStreamPeer2 interface provides additional plugin stream
|
||||
* peer features only available in Communicator 5.0.
|
||||
*
|
||||
* To obtain: QueryInterface on nsIPluginStreamPeer
|
||||
*/
|
||||
#include "nsIPluginStreamPeer2.h"
|
||||
|
||||
/**
|
||||
* The nsIPluginTagInfo2 interface provides additional html tag information
|
||||
* only available in Communicator 5.0.
|
||||
*
|
||||
* To obtain: QueryInterface on nsIPluginTagInfo
|
||||
*/
|
||||
#include "nsIPluginTagInfo2.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#endif // nsplugins_h___
|
||||
365
mozilla/modules/plugin/base/public/nsplugindefs.h
Normal file
365
mozilla/modules/plugin/base/public/nsplugindefs.h
Normal file
@@ -0,0 +1,365 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* <B>INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API).</B>
|
||||
*
|
||||
* <P>This superscedes the old plugin API (npapi.h, npupp.h), and
|
||||
* eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that
|
||||
* get linked with the plugin. You will however need to link with the "backward
|
||||
* adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0
|
||||
* browsers.
|
||||
*
|
||||
* <P>See nsplugin.h for an overview of how this fits with the
|
||||
* overall plugin architecture.
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef nsplugindefs_h___
|
||||
#define nsplugindefs_h___
|
||||
|
||||
#ifdef __OS2__
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
|
||||
#ifdef XP_MAC
|
||||
#include <Quickdraw.h>
|
||||
#include <Events.h>
|
||||
#endif
|
||||
|
||||
#ifdef XP_UNIX
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#endif
|
||||
|
||||
#ifdef XP_PC
|
||||
#include <windef.h>
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/* The OS/2 version of Netscape uses RC_DATA to define the
|
||||
mime types, file extentions, etc that are required.
|
||||
Use a vertical bar to seperate types, end types with \0.
|
||||
FileVersion and ProductVersion are 32bit ints, all other
|
||||
entries are strings the MUST be terminated wwith a \0.
|
||||
|
||||
AN EXAMPLE:
|
||||
|
||||
RCDATA NS_INFO_ProductVersion { 1,0,0,1,}
|
||||
|
||||
RCDATA NS_INFO_MIMEType { "video/x-video|",
|
||||
"video/x-flick\0" }
|
||||
RCDATA NS_INFO_FileExtents { "avi|",
|
||||
"flc\0" }
|
||||
RCDATA NS_INFO_FileOpenName{ "MMOS2 video player(*.avi)|",
|
||||
"MMOS2 Flc/Fli player(*.flc)\0" }
|
||||
|
||||
RCDATA NS_INFO_FileVersion { 1,0,0,1 }
|
||||
RCDATA NS_INFO_CompanyName { "Netscape Communications\0" }
|
||||
RCDATA NS_INFO_FileDescription { "NPAVI32 Extension DLL\0"
|
||||
RCDATA NS_INFO_InternalName { "NPAVI32\0" )
|
||||
RCDATA NS_INFO_LegalCopyright { "Copyright Netscape Communications \251 1996\0"
|
||||
RCDATA NS_INFO_OriginalFilename { "NVAPI32.DLL" }
|
||||
RCDATA NS_INFO_ProductName { "NPAVI32 Dynamic Link Library\0" }
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/* RC_DATA types for version info - required */
|
||||
#define NS_INFO_ProductVersion 1
|
||||
#define NS_INFO_MIMEType 2
|
||||
#define NS_INFO_FileOpenName 3
|
||||
#define NS_INFO_FileExtents 4
|
||||
|
||||
/* RC_DATA types for version info - used if found */
|
||||
#define NS_INFO_FileDescription 5
|
||||
#define NS_INFO_ProductName 6
|
||||
|
||||
/* RC_DATA types for version info - optional */
|
||||
#define NS_INFO_CompanyName 7
|
||||
#define NS_INFO_FileVersion 8
|
||||
#define NS_INFO_InternalName 9
|
||||
#define NS_INFO_LegalCopyright 10
|
||||
#define NS_INFO_OriginalFilename 11
|
||||
|
||||
#ifndef RC_INVOKED
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Structures and definitions
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma options align=mac68k
|
||||
#endif
|
||||
|
||||
typedef const char* nsMIMEType;
|
||||
|
||||
struct nsByteRange {
|
||||
PRInt32 offset; /* negative offset means from the end */
|
||||
PRUint32 length;
|
||||
struct nsByteRange* next;
|
||||
};
|
||||
|
||||
struct nsRect {
|
||||
PRUint16 top;
|
||||
PRUint16 left;
|
||||
PRUint16 bottom;
|
||||
PRUint16 right;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Unix specific structures and definitions
|
||||
|
||||
#ifdef XP_UNIX
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/*
|
||||
* Callback Structures.
|
||||
*
|
||||
* These are used to pass additional platform specific information.
|
||||
*/
|
||||
enum nsPluginCallbackType {
|
||||
nsPluginCallbackType_SetWindow = 1,
|
||||
nsPluginCallbackType_Print
|
||||
};
|
||||
|
||||
struct nsPluginAnyCallbackStruct {
|
||||
PRInt32 type;
|
||||
};
|
||||
|
||||
struct nsPluginSetWindowCallbackStruct {
|
||||
PRInt32 type;
|
||||
Display* display;
|
||||
Visual* visual;
|
||||
Colormap colormap;
|
||||
PRUint32 depth;
|
||||
};
|
||||
|
||||
struct nsPluginPrintCallbackStruct {
|
||||
PRInt32 type;
|
||||
FILE* fp;
|
||||
};
|
||||
|
||||
#endif /* XP_UNIX */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// List of variable names for which NPP_GetValue shall be implemented
|
||||
enum nsPluginVariable {
|
||||
nsPluginVariable_NameString = 1,
|
||||
nsPluginVariable_DescriptionString,
|
||||
nsPluginVariable_WindowBool, // XXX go away
|
||||
nsPluginVariable_TransparentBool, // XXX go away?
|
||||
nsPluginVariable_JavaClass, // XXX go away
|
||||
nsPluginVariable_WindowSize,
|
||||
nsPluginVariable_TimerInterval
|
||||
// XXX add MIMEDescription (for unix) (but GetValue is on the instance, not the class)
|
||||
};
|
||||
|
||||
// List of variable names for which NPN_GetValue is implemented by Mozilla
|
||||
enum nsPluginManagerVariable {
|
||||
nsPluginManagerVariable_XDisplay = 1,
|
||||
nsPluginManagerVariable_XtAppContext,
|
||||
nsPluginManagerVariable_NetscapeWindow,
|
||||
nsPluginManagerVariable_JavascriptEnabledBool, // XXX prefs accessor api
|
||||
nsPluginManagerVariable_ASDEnabledBool, // XXX prefs accessor api
|
||||
nsPluginManagerVariable_IsOfflineBool // XXX prefs accessor api
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
enum nsPluginType {
|
||||
nsPluginType_Embedded = 1,
|
||||
nsPluginType_Full
|
||||
};
|
||||
|
||||
// XXX this can go away now
|
||||
enum NPStreamType {
|
||||
NPStreamType_Normal = 1,
|
||||
NPStreamType_Seek,
|
||||
NPStreamType_AsFile,
|
||||
NPStreamType_AsFileOnly
|
||||
};
|
||||
|
||||
#define NP_STREAM_MAXREADY (((unsigned)(~0)<<1)>>1)
|
||||
|
||||
/*
|
||||
* The type of a NPWindow - it specifies the type of the data structure
|
||||
* returned in the window field.
|
||||
*/
|
||||
enum nsPluginWindowType {
|
||||
nsPluginWindowType_Window = 1,
|
||||
nsPluginWindowType_Drawable
|
||||
};
|
||||
|
||||
struct nsPluginWindow {
|
||||
void* window; /* Platform specific window handle */
|
||||
/* OS/2: x - Position of bottom left corner */
|
||||
/* OS/2: y - relative to visible netscape window */
|
||||
PRUint32 x; /* Position of top left corner relative */
|
||||
PRUint32 y; /* to a netscape page. */
|
||||
PRUint32 width; /* Maximum window size */
|
||||
PRUint32 height;
|
||||
nsRect clipRect; /* Clipping rectangle in port coordinates */
|
||||
/* Used by MAC only. */
|
||||
#ifdef XP_UNIX
|
||||
void* ws_info; /* Platform-dependent additonal data */
|
||||
#endif /* XP_UNIX */
|
||||
nsPluginWindowType type; /* Is this a window or a drawable? */
|
||||
};
|
||||
|
||||
struct nsPluginFullPrint {
|
||||
PRBool pluginPrinted; /* Set TRUE if plugin handled fullscreen */
|
||||
/* printing */
|
||||
PRBool printOne; /* TRUE if plugin should print one copy */
|
||||
/* to default printer */
|
||||
void* platformPrint; /* Platform-specific printing info */
|
||||
};
|
||||
|
||||
struct nsPluginEmbedPrint {
|
||||
nsPluginWindow window;
|
||||
void* platformPrint; /* Platform-specific printing info */
|
||||
};
|
||||
|
||||
struct nsPluginPrint {
|
||||
nsPluginType mode; /* NP_FULL or nsPluginType_Embedded */
|
||||
union
|
||||
{
|
||||
nsPluginFullPrint fullPrint; /* if mode is NP_FULL */
|
||||
nsPluginEmbedPrint embedPrint; /* if mode is nsPluginType_Embedded */
|
||||
} print;
|
||||
};
|
||||
|
||||
struct nsPluginEvent {
|
||||
|
||||
#if defined(XP_MAC)
|
||||
EventRecord* event;
|
||||
void* window;
|
||||
|
||||
#elif defined(XP_PC)
|
||||
uint16 event;
|
||||
uint32 wParam;
|
||||
uint32 lParam;
|
||||
|
||||
#elif defined(XP_OS2)
|
||||
uint32 event;
|
||||
uint32 wParam;
|
||||
uint32 lParam;
|
||||
|
||||
#elif defined(XP_UNIX)
|
||||
XEvent event;
|
||||
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef XP_MAC
|
||||
typedef RgnHandle nsRegion;
|
||||
#elif defined(XP_PC)
|
||||
typedef HRGN nsRegion;
|
||||
#elif defined(XP_UNIX)
|
||||
typedef Region nsRegion;
|
||||
#else
|
||||
typedef void *nsRegion;
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Mac-specific structures and definitions.
|
||||
|
||||
#ifdef XP_MAC
|
||||
|
||||
struct NPPort {
|
||||
CGrafPtr port; /* Grafport */
|
||||
PRInt32 portx; /* position inside the topmost window */
|
||||
PRInt32 porty;
|
||||
};
|
||||
|
||||
/*
|
||||
* Non-standard event types that can be passed to HandleEvent
|
||||
*/
|
||||
#define getFocusEvent (osEvt + 16)
|
||||
#define loseFocusEvent (osEvt + 17)
|
||||
#define adjustCursorEvent (osEvt + 18)
|
||||
#define menuCommandEvent (osEvt + 19)
|
||||
|
||||
#endif /* XP_MAC */
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Error and Reason Code definitions
|
||||
|
||||
enum nsPluginError {
|
||||
nsPluginError_Base = 0,
|
||||
nsPluginError_NoError = 0,
|
||||
nsPluginError_GenericError,
|
||||
nsPluginError_InvalidInstanceError,
|
||||
nsPluginError_InvalidFunctableError,
|
||||
nsPluginError_ModuleLoadFailedError,
|
||||
nsPluginError_OutOfMemoryError,
|
||||
nsPluginError_InvalidPluginError,
|
||||
nsPluginError_InvalidPluginDirError,
|
||||
nsPluginError_IncompatibleVersionError,
|
||||
nsPluginError_InvalidParam,
|
||||
nsPluginError_InvalidUrl,
|
||||
nsPluginError_FileNotFound,
|
||||
nsPluginError_NoData,
|
||||
nsPluginError_StreamNotSeekable
|
||||
};
|
||||
|
||||
#define NPCallFailed( code ) ((code) != nsPluginError_NoError)
|
||||
|
||||
enum nsPluginReason {
|
||||
nsPluginReason_Base = 0,
|
||||
nsPluginReason_Done = 0,
|
||||
nsPluginReason_NetworkErr,
|
||||
nsPluginReason_UserBreak,
|
||||
nsPluginReason_NoReason
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Classes
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Classes that must be implemented by the plugin DLL:
|
||||
struct nsIPlugin; // plugin class (MIME-type handler)
|
||||
class nsILiveConnectPlugin; // subclass of nsIPlugin
|
||||
class nsIPluginInstance; // plugin instance
|
||||
class nsIPluginStream; // stream to receive data from the browser
|
||||
|
||||
// Classes that are implemented by the browser:
|
||||
class nsIPluginManager; // minimum browser requirements
|
||||
class nsIFileUtilities; // file utilities (accessible from nsIPluginManager)
|
||||
class nsIPluginInstancePeer; // parts of nsIPluginInstance implemented by the browser
|
||||
class nsIWindowlessPluginInstancePeer; // subclass of nsIPluginInstancePeer for windowless plugins
|
||||
class nsIPluginTagInfo; // describes html tag (accessible from nsIPluginInstancePeer)
|
||||
class nsILiveConnectPluginInstancePeer; // subclass of nsIPluginInstancePeer
|
||||
class nsIPluginStreamPeer; // parts of nsIPluginStream implemented by the browser
|
||||
class nsISeekablePluginStreamPeer; // seekable subclass of nsIPluginStreamPeer
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef XP_MAC
|
||||
#pragma options align=reset
|
||||
#endif
|
||||
|
||||
#endif /* RC_INVOKED */
|
||||
#ifdef __OS2__
|
||||
#pragma pack()
|
||||
#endif
|
||||
|
||||
#endif // nsplugindefs_h___
|
||||
Reference in New Issue
Block a user