InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IPlugInList Class Referenceabstract

#include <IPlugInList.h>

Inheritance diagram for IPlugInList:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IPLUGINLIST }
 

Public Member Functions

virtual PluginID GetPluginID (const PMString &name) const =0
 
virtual const PMStringGetPluginName (PluginID whichPlugIn) const =0
 
virtual bool16 GetPathName (PluginID whichPlugIn, IDFile *path) const =0
 
virtual int32 GetPluginCount () const =0
 
virtual PluginID GetNthPlugin (int32 n) const =0
 
virtual bool16 IsStandardComponent (PluginID whichPlugin) const =0
 
virtual bool16 GetVersionNumber (PluginID whichPlugIn, int32 &majorVersion, int32 &minorVersion) const =0
 
virtual const PMStringGetAUMVersionString (PluginID whichPlugin) const =0
 
virtual bool16 GetLastFormatVersion (PluginID whichPlugin, int32 &majorVersion, int32 &minorVersion) const =0
 
virtual bool16 GetAppExpectedVersionNumber (PluginID whichPlugIn, int32 &majorVersion, int32 &minorVersion) const =0
 
virtual const DependencyList * GetDependentInfo (PluginID whichPlugIn) const =0
 
virtual PluginID GetNthComponent (const DependencyList *dependentInfo, int32 n) const =0
 
virtual bool16 GetNthVersion (const DependencyList *dependentInfo, int32 n, int32 &majorVersion, int32 &minorVersion) const =0
 
virtual const PMStringGetErrorString (PluginID whichPlugin) const =0
 
virtual const PMStringGetRuntimeErrorString (PluginID whichPlugin) const =0
 
virtual const PMStringGetRegistrationErrorString (PluginID whichPlugin) const =0
 
virtual const PluginMetadataGetPluginMetadata (PluginID whichPlugin) const =0
 
virtual bool16 IsLoaded (PluginID whichPlugIn) const =0
 
virtual bool16 LoadFailed (PluginID whichPlugIn) const =0
 
virtual bool16 HasBeenLoaded (PluginID whichPlugIn) const =0
 
virtual bool16 MatchCurrentProduct (PluginID whichPlugIn) const =0
 
virtual bool16 MatchCurrentFeatureSet (PluginID whichPlugIn) const =0
 
virtual IPlugInLoad (PluginID whichPlugIn)=0
 
virtual IPlugInIteratorCreateIterator () const =0
 
virtual IPlugIn::ThreadingPolicy GetThreadingPolicy (PluginID whichPlugIn) const =0
 
virtual bool16 ComparePluginListToFileStream (const IDFile &pluginListFile) const =0
 
virtual ErrorCode StreamPluginListToFile (const IDFile &pluginListFile) const =0
 
virtual void LoadMultipleThreadPolicyPlugins () const =0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

The plug-in list maintains a list of all the currently installed plug-ins. It is used to manage the plug-ins, and to return information about them. The application, and the Public, WidgetBin, and ObjectModel libraries are treated as plug-ins for the purposes of the list, and are considered to be "standard components". All items on this list can be uniquely identified by PluginID.

There is a single implementation of IPlugInList that is an interface off the global session (kSessionBoss), referenced by session.

See Also
kSessionBoss
ISession

Member Function Documentation

virtual bool16 IPlugInList::ComparePluginListToFileStream (const IDFilepluginListFile) const
pure virtual

FOR INTERNAL USE ONLY. Compares the plugin list data from pluginListFile to the current version.

Parameters
pluginListFileLocation of plugin-list data file.
Returns
kTrue if the lists are same. kFalse if different.
virtual IPlugInIterator* IPlugInList::CreateIterator () const
pure virtual

FOR INTERNAL USE ONLY. Return an iterator to iterate plug-in list. Caller must call delete on the iterator when finished with it.

virtual bool16 IPlugInList::GetAppExpectedVersionNumber (PluginID whichPlugIn,
int32 & majorVersion,
int32 & minorVersion 
) const
pure virtual
Return the version of the app the plug-in was built for. The plug-in can run when installed in

any version of the application whose major version number matches the expected major version number, and whose minor version number is greater to or equal to the expected minor version number.

Parameters
whichPlugInThe plug-in we want to find out about
majorVersionReturn value: high word of the application's version is returned here
minorVersionReturn value: low word of the application's version is returned here
Returns
kTrue if the plug-in is found, kFalse otherwise
virtual const PMString* IPlugInList::GetAUMVersionString (PluginID whichPlugin) const
pure virtual
Return the x.y.z.w type version string used for Update Manager versioning

Parameters
whichPlugInThe plug-in we want to find out about
Returns
The version string of the plug-in, or nil if there was no error.
virtual const DependencyList* IPlugInList::GetDependentInfo (PluginID whichPlugIn) const
pure virtual
Returns a magic cookie containing info about the plug-in's dependencies. You can 

call GetNthComponent and GetNthVersion to get useful info out of the cookie.

Parameters
whichPlugInThe plug-in we want to find out about
Returns
a dependency list if the plug-in is found and has dependencies, nil otherwise
See Also
GetNthComponent
GetNthVersion
virtual const PMString* IPlugInList::GetErrorString (PluginID whichPlugin) const
pure virtual
Return the error string that resulted from loading the plug-in

Parameters
whichPlugInThe plug-in we want to find out about
Returns
The error string that resulted from loading the plug-in, or nil if there was no error.
virtual bool16 IPlugInList::GetLastFormatVersion (PluginID whichPlugin,
int32 & majorVersion,
int32 & minorVersion 
) const
pure virtual
Return the format number of the plug-in.

Parameters
whichPlugInThe plug-in we want to find out about
majorVersionReturn value: high word of the plug-in's format is returned here
minorVersionReturn value: low word of the plug-in's format is returned here
Returns
kTrue if the plug-in is found, kFalse otherwise
virtual PluginID IPlugInList::GetNthComponent (const DependencyList * dependentInfo,
int32 n 
) const
pure virtual
Returns the PluginID of the i'th component in the dependency info. Call this

to find out what plug-ins a plug-in is dependent on (after you've already called GetDependentInfo).

Parameters
dependentInfoThe list of the dependecies from the plug-in we're interested in
nThe index into the list for the particular dependency we want
Returns
The pluginID of the n'th plug-in in dependentInfo, of kInvalidPlugin if the index is invalid
virtual PluginID IPlugInList::GetNthPlugin (int32 n) const
pure virtual
Return the n'th plug-in in the list

Parameters
nThe index of the plug-in
Returns
PluginID of the plug-in, if there is one, kInvalidPlugin otherwise.
virtual bool16 IPlugInList::GetNthVersion (const DependencyList * dependentInfo,
int32 n,
int32 & majorVersion,
int32 & minorVersion 
) const
pure virtual
Returns the version number of the i'th component in the dependency info. 

Parameters
dependentInfoThe list of the dependecies from the plug-in we're interested in
nThe index into the list for the particular dependency we want
majorVersionReturn value: high word of the expected version number for the dependency plug-in is returned here
minorVersionReturn value: low word of the expected version number for the dependency plug-in is returned here
Returns
kTrue if the index is valid, kFalse otherwise
virtual bool16 IPlugInList::GetPathName (PluginID whichPlugIn,
IDFilepath 
) const
pure virtual
Return the location of the plug-in's executable. 

Parameters
whichPlugInPluginID of the plug-in
pathpath of the plug-in is returned here, if it was found
Returns
kTrue if the plug-in is found, kFalse otherwise.
virtual int32 IPlugInList::GetPluginCount () const
pure virtual
Return the number of plug-ins in the list. Some of these may not be currently active. 

Returns
number of plug-ins currently installed
virtual PluginID IPlugInList::GetPluginID (const PMStringname) const
pure virtual
Look up a plugin by name.

Parameters
nameThe name of the plug-in.
Returns
the PluginID of the plug-in, or kInvalidPlugin if it's not found.
virtual const PluginMetadata* IPlugInList::GetPluginMetadata (PluginID whichPlugin) const
pure virtual
Returns meta data about the plug-in.

Parameters
whichPlugInThe plug-in we want to find out about
Returns
PluginMetaData* The metadata, or nil if either the plug-in wasn't found, or the plug-in doesn't have metadata.
virtual const PMString& IPlugInList::GetPluginName (PluginID whichPlugIn) const
pure virtual
Return the name of a particular plug-in 

Parameters
whichPlugInPluginID of the plug-in
Returns
the name of the plug-in, or an empty string if the plug-in is not found.
virtual const PMString* IPlugInList::GetRegistrationErrorString (PluginID whichPlugin) const
pure virtual
Returns the registration error string, if there was an error registering.

Parameters
whichPlugInThe plug-in we want to find out about
Returns
The error string that resulted from loading the plug-in, or nil if there was no error.
virtual const PMString* IPlugInList::GetRuntimeErrorString (PluginID whichPlugin) const
pure virtual
Return the runtime error string that resulted from loading the plug-in

Parameters
whichPlugInThe plug-in we want to find out about
Returns
The error string that resulted from loading the plug-in, or nil if there was no error.
virtual bool16 IPlugInList::GetVersionNumber (PluginID whichPlugIn,
int32 & majorVersion,
int32 & minorVersion 
) const
pure virtual
Return the plug-in's major and minor version numbers. 

Parameters
whichPlugInThe plug-in we want to find out about
majorVersionReturn value: high word of the plug-in's version is returned here
minorVersionReturn value: low word of the plug-in's version is returned here
Returns
kTrue if the plug-in is found, kFalse otherwise
virtual bool16 IPlugInList::HasBeenLoaded (PluginID whichPlugIn) const
pure virtual
Returns true if the plugin has been loaded at least once. Will return false

if the plugin failed to load or if the object model hasn't had to load it yet.

Parameters
whichPlugInThe plug-in we want to find out about
Returns
kTrue if the plug-in is has ever been loaded, kFalse otherwise.
virtual bool16 IPlugInList::IsLoaded (PluginID whichPlugIn) const
pure virtual
Returns true if the plug-in is loaded. The plug-ins are loaded on demand, so if the

plug-in has not yet been queried for, then the plug-in is not loaded.

Parameters
whichPlugInThe plug-in we want to find out about
Returns
kTrue if the plug-in is currently loaded, kFalse otherwise.
virtual bool16 IPlugInList::IsStandardComponent (PluginID whichPlugin) const
pure virtual
Return true if the supplied plug-in ID is a core component of the application

Parameters
whichPluginThe ID of the component or plug-in we want to find out about
Returns
kTrue if the pluginID is to the application or Public, WidgetBin, or ObjectModel libraries, return kFalse otherwise.
virtual IPlugIn* IPlugInList::Load (PluginID whichPlugIn)
pure virtual
FOR INTERNAL USE ONLY. Load the plug-in. Opens up the DLL, loads 

the factories, and calls the plug-in's Load function. The plug-in's 

root object is returned on success, nil is returned if the load fails.

If the plug-in is already loaded, Load just returns the root object.

Parameters
whichPlugInThe plug-in we want to load
Returns
The plug-in's IPlugIn* root if the Load is successful, nil otherwise.
virtual bool16 IPlugInList::LoadFailed (PluginID whichPlugIn) const
pure virtual
The plug-in failed to load. This will be true only if the system has tried to

load the plug-in. It may be false simply because the system hasn't tried to load it yet.

Parameters
whichPlugInThe plug-in we want to find out about
Returns
kTrue if the plug-in is failed to load, kFalse otherwise.
virtual void IPlugInList::LoadMultipleThreadPolicyPlugins () const
pure virtual

FOR INTERNAL USE ONLY. Loads plug-ins whose threading policy is kMultipleThreads.

virtual bool16 IPlugInList::MatchCurrentFeatureSet (PluginID whichPlugIn) const
pure virtual
Returns true if the plugin matches current feature set. 

Parameters
whichPlugInThe plug-in we want to find out about
Returns
kTrue if the plug-in the plugin matches the feature set.
virtual bool16 IPlugInList::MatchCurrentProduct (PluginID whichPlugIn) const
pure virtual
Returns true if the plugin matches the current product. 

Parameters
whichPlugInThe plug-in we want to find out about
Returns
kTrue if the plug-in the plugin matches the current product.
virtual ErrorCode IPlugInList::StreamPluginListToFile (const IDFilepluginListFile) const
pure virtual

FOR INTERNAL USE ONLY. Writes the current list of plug-in data to pluginListFile.

Parameters
pluginListFileLocation of plugin-list data file.
Returns
kSuccess or kFailure.