nsIPlugin

IID:df773070-0199-11d2-815b-006008119d7a
Inherits From:nsIFactory

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.


Methods

void createPluginInstance ( nsISupports outer , nsIIDRef IID , char* pluginMIMEType , out nsQIResult* result ) void getMIMEDescription ( out constCharPtr* MIMEDescription ) void getValue ( nsPluginVariable variable , voidPtr* value ) void initialize ( ) void shutdown ( )

void createPluginInstance ( nsISupports outer , nsIIDRef IID , char* pluginMIMEType , out nsQIResult* result )

Creates a new plugin instance, based on a MIME type. This allows different impelementations to be created depending on the specified MIME type.

Arguments:
outer
IID
pluginMIMEType
result

void getMIMEDescription ( out constCharPtr* MIMEDescription )

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.)

Arguments:
MIMEDescription: - the resulting MIME description

void getValue ( nsPluginVariable variable , voidPtr* value )

Returns the value of a variable associated with the plugin.

(Corresponds to NPP_GetValue.)

Arguments:
variable: - the plugin variable to get
value: - the address of where to store the resulting value

void initialize ( )

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.


void shutdown ( )

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

(Corresponds to NPP_Shutdown.)


References

This interface is passed as an argument to the following methods:

nsIClassicPluginFactory.createPlugin, nsIPluginHost.getPluginFactory, nsIPluginManager2.notifyStatusChange

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com