You should implement the methods in this interface in order to provide the server with information about your plug-in module on startup.
The csIPlugin interface implements four methods:
Gets a textual description of what the plug-in does. |
|
Gets a textual description of the vendor supplying this plug-in. |
|
Gets the major and minor version of the plug-in. This value must be greater than or equal to 1.0. For a list of the current version numbers for each plug-in API, seePlug-in Version Numbers. |
|
Confirms that the interface was found and registered. |
This interface is not required, but it is highly recommended that you implement it in each module to provide version information to the server when it loads that module. The methods return descriptive information to the server.
Retrieve a text description of the module.
PRUint32 GetDescription (nsString& aDescription)=0;
The method has the following parameter:
aDescription |
On return, contains the text description of the module. |
NS_OK on success, non-zero error code on failure.
Use this method to provide a text description of the module.
Retrieve a text description of the vendor supplying the module.
PRInt32 GetVendorName (nsString& aVendorName)=0;
The method has the following parameter:
aVendorName |
On return, contains the text description of the vendor. |
NS_OK on success, non-zero error code on failure.
Use this method to identify the module’s supplier.
Provide server with version information on startup.
PRUint32 GetVersion (PRUint32& aMajorValue,PRUint32& aMinorValue)=0;
The method has the following two parameters:
aMajorValue |
On return, contains the major version number. |
aMinorValue |
On return, contains the minor version number. |
NS_OK on success, non-zero error code on failure.
Use this method to identify the module’s major and minor version number. The number must be greater than or equal to 1.0.
Confirm that the interface has been registered and obtains a reference to the server.
PRUint32 Init (nsISupports *aServer)=0;
The method has the following parameter:
aServer |
On return, this location contains a reference to the server with which the module is registered. |
NS_OK on success, non-zero error code on failure.
The server calls this method, after finding and registering the interface on module load, to confirm that the operation was successful. You can use the pointer returned in aServer to make calls out to the server.