1998-07-09 12:42:58 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
|
|
|
*
|
1999-11-06 06:43:54 +03:00
|
|
|
* The contents of this file are subject to the Netscape Public
|
|
|
|
* License Version 1.1 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.mozilla.org/NPL/
|
1998-07-09 12:42:58 +04:00
|
|
|
*
|
1999-11-06 06:43:54 +03:00
|
|
|
* Software distributed under the License is distributed on an "AS
|
|
|
|
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
|
|
|
* implied. See the License for the specific language governing
|
|
|
|
* rights and limitations under the License.
|
1998-07-09 12:42:58 +04:00
|
|
|
*
|
1999-11-06 06:43:54 +03:00
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is Netscape
|
1998-07-09 12:42:58 +04:00
|
|
|
* Communications Corporation. Portions created by Netscape are
|
1999-11-06 06:43:54 +03:00
|
|
|
* Copyright (C) 1998 Netscape Communications Corporation. All
|
|
|
|
* Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
1998-07-09 12:42:58 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
/**
|
|
|
|
* <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 |+
|
1998-10-01 06:59:16 +04:00
|
|
|
* | | nsIWindowlessPluginInstancePeer || | nsISeekablePluginStreamPeer||
|
|
|
|
* | | nsILiveConnectPluginInstancePeer|| | nsIPluginstreamPeer2 ||
|
|
|
|
* | | nsIPluginTagInfo || +----------------------------+|
|
|
|
|
* | | nsIPluginTagInfo2 || +---------------------------+
|
1998-07-09 12:42:58 +04:00
|
|
|
* | +---------------------------------+|
|
|
|
|
* | +--------------------------------+
|
|
|
|
* |
|
|
|
|
* |
|
|
|
|
* v the browser (only 1)
|
|
|
|
* +---------------------+
|
|
|
|
* | nsIPluginManager |
|
|
|
|
* | nsIPluginManager2 |
|
|
|
|
* | nsIFileUtilities |
|
|
|
|
* | nsIPref |
|
|
|
|
* | nsICacheManager ... |
|
|
|
|
* +---------------------+
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef nsplugins_h___
|
|
|
|
#define nsplugins_h___
|
|
|
|
|
1999-03-12 01:48:58 +03:00
|
|
|
#include "nsRepository.h" // for NSGetFactory
|
1999-03-09 12:44:27 +03:00
|
|
|
#include "nsIComponentManager.h" // for NSGetFactory
|
1998-07-09 12:42:58 +04:00
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
/**
|
|
|
|
* <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.
|
|
|
|
*/
|
1999-03-09 12:44:27 +03:00
|
|
|
// (Declared in nsComponentManager.h)
|
1999-02-26 13:17:14 +03:00
|
|
|
//extern "C" NS_EXPORT nsresult NSGetFactory(nsISupports* serviceMgr,
|
|
|
|
// const nsCID &aClass,
|
|
|
|
// const char *aClassName,
|
|
|
|
// const char *aProgID,
|
1998-07-09 12:42:58 +04:00
|
|
|
// 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"
|
|
|
|
|
1998-10-01 06:59:16 +04:00
|
|
|
/**
|
|
|
|
* A plugin stream listener ...
|
|
|
|
*/
|
|
|
|
#include "nsIPluginStreamListener.h"
|
|
|
|
|
1998-07-09 12:42:58 +04:00
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*/
|
1999-01-25 11:05:00 +03:00
|
|
|
//#include "nsILiveConnectPlugin.h"
|
1998-07-09 12:42:58 +04:00
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
/**
|
|
|
|
* <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
|
|
|
|
*/
|
1998-08-01 00:19:50 +04:00
|
|
|
#include "nsIWindowlessPlugInstPeer.h"
|
1998-07-09 12:42:58 +04:00
|
|
|
|
1998-10-01 06:59:16 +04:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
#include "nsIPluginInputStream.h"
|
|
|
|
|
1998-07-09 12:42:58 +04:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
/**
|
|
|
|
* <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 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
|
|
|
|
*/
|
1999-01-25 11:05:00 +03:00
|
|
|
//#include "nsILiveConnectPlugInstPeer.h"
|
1998-07-09 12:42:58 +04:00
|
|
|
|
1998-10-01 06:59:16 +04:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
#include "nsIPluginInputStream2.h"
|
|
|
|
|
1998-07-09 12:42:58 +04:00
|
|
|
/**
|
|
|
|
* The nsIPluginTagInfo2 interface provides additional html tag information
|
|
|
|
* only available in Communicator 5.0.
|
|
|
|
*
|
|
|
|
* To obtain: QueryInterface on nsIPluginTagInfo
|
|
|
|
*/
|
|
|
|
#include "nsIPluginTagInfo2.h"
|
|
|
|
|
1998-10-01 06:59:16 +04:00
|
|
|
#include "nsIOutputStream.h"
|
|
|
|
|
1998-07-09 12:42:58 +04:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
#endif // nsplugins_h___
|