Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions
nsIPlugin Interface Reference

The nsIPlugin interface is the minimum interface plugin developers need to support in order to implement a plugin. More...

import "nsIPlugin.idl";

Inheritance diagram for nsIPlugin:
Inheritance graph
[legend]
Collaboration diagram for nsIPlugin:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void createPluginInstance (in nsISupports aOuter, in nsIIDRef aIID, in string aPluginMIMEType,[retval, iid_is(aIID)] out nsQIResult aResult)
 Creates a new plugin instance, based on a MIME type.
void initialize ()
 Initializes the plugin and will be called before any new instances are created.
void shutdown ()
 Called when the browser is done with the plugin factory, or when the plugin is disabled by the user.
void getMIMEDescription (out constCharPtr aMIMEDescription)
 Returns the MIME description for the plugin.
void getValue (in nsPluginVariable aVariable, in voidPtr aValue)
 Returns the value of a variable associated with the plugin.
void createInstance (in nsISupports aOuter, in nsIIDRef iid,[retval, iid_is(iid)] out nsQIResult result)
 Creates an instance of a component.
void lockFactory (in PRBool lock)
 LockFactory provides the client a way to keep the component in memory until it is finished with it.

Detailed Description

The nsIPlugin interface 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.

The old NPP_New plugin operation is now subsumed by two operations:

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.

Definition at line 82 of file nsIPlugin.idl.


Member Function Documentation

void nsIFactory::createInstance ( in nsISupports  aOuter,
in nsIIDRef  iid,
[retval, iid_is(iid)] out nsQIResult  result 
) [inherited]

Creates an instance of a component.

Parameters:
aOuterPointer to a component that wishes to be aggregated in the resulting instance. This will be nsnull if no aggregation is requested.
iidThe IID of the interface being requested in the component which is being currently created.
result[out] Pointer to the newly created instance, if successful.
Returns:
NS_OK - Component successfully created and the interface being requested was successfully returned in result. NS_NOINTERFACE - Interface not accessible. NS_ERROR_NO_AGGREGATION - if an 'outer' object is supplied, but the component is not aggregatable. NS_ERROR* - Method failure.
void nsIPlugin::createPluginInstance ( in nsISupports  aOuter,
in nsIIDRef  aIID,
in string  aPluginMIMEType,
[retval, iid_is(aIID)] out nsQIResult  aResult 
)

Creates a new plugin instance, based on a MIME type.

This allows different impelementations to be created depending on the specified MIME type.

Returns the MIME description for the plugin.

The MIME description is a colon-separated string containg the plugin MIME type, plugin data file extension, and plugin name, e.g.:

"application/x-simple-plugin:smp:Simple LiveConnect Sample Plug-in"

(Corresponds to NPP_GetMIMEDescription.)

Parameters:
aMIMEDescription- the resulting MIME description
Returns:
- NS_OK if this operation was successful
void nsIPlugin::getValue ( in nsPluginVariable  aVariable,
in voidPtr  aValue 
)

Returns the value of a variable associated with the plugin.

(Corresponds to NPP_GetValue.)

Parameters:
aVariable- the plugin variable to get
aValue- the address of where to store the resulting value
Returns:
- NS_OK if this operation was successful

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.

Parameters:
browserInterfaces- an object that allows access to other browser interfaces via QueryInterface
Returns:
- NS_OK if this operation was successful
void nsIFactory::lockFactory ( in PRBool  lock) [inherited]

LockFactory provides the client a way to keep the component in memory until it is finished with it.

The client can call LockFactory(PR_TRUE) to lock the factory and LockFactory(PR_FALSE) to release the factory.

Parameters:
lock- Must be PR_TRUE or PR_FALSE
Returns:
NS_OK - If the lock operation was successful. NS_ERROR* - Method failure.

Called when the browser is done with the plugin factory, or when the plugin is disabled by the user.

(Corresponds to NPP_Shutdown.)

Returns:
- NS_OK if this operation was successful

The documentation for this interface was generated from the following file: