InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IPlugInList.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Robin Briggs
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //
23 // Purpose:
24 // Manages plug-ins: registering, loading, unloading, dependencies, etc.
25 //
26 //========================================================================================
27 
28 #ifndef __IPLUGINLIST__
29 #define __IPLUGINLIST__
30 
31 #include "IPMUnknown.h"
32 #include "ShuksanID.h"
33 #include "IPlugIn.h"
34 
35 class PMString;
36 class PlugInData;
37 class DependencyList;
38 class IPlugInIterator;
39 class PluginMetadata;
40 
55 class IPlugInList : public IPMUnknown {
56 public:
57  enum { kDefaultIID = IID_IPLUGINLIST };
58 
63  virtual PluginID GetPluginID(const PMString& name) const = 0;
64 
69  virtual const PMString& GetPluginName(PluginID whichPlugIn) const = 0;
70 
76  virtual bool16 GetPathName(PluginID whichPlugIn, IDFile *path) const = 0;
77 
78 #ifdef MACINTOSH
79 
84  virtual bool16 GetCFBundleRef(PluginID whichPlugIn, CFBundleRef& bundleRef) const = 0;
85 #endif
86 
90  virtual int32 GetPluginCount() const = 0;
91 
96  virtual PluginID GetNthPlugin(int32 n) const = 0;
97 
102  virtual bool16 IsStandardComponent(PluginID whichPlugin) const = 0;
103 
110  virtual bool16 GetVersionNumber(PluginID whichPlugIn, int32& majorVersion, int32& minorVersion) const = 0;
111 
116  virtual const PMString *GetAUMVersionString(PluginID whichPlugin) const = 0;
117 
124  virtual bool16 GetLastFormatVersion(PluginID whichPlugin, int32& majorVersion, int32& minorVersion) const = 0;
133  virtual bool16 GetAppExpectedVersionNumber(PluginID whichPlugIn, int32& majorVersion, int32& minorVersion) const = 0;
134 
142  virtual const DependencyList *GetDependentInfo(PluginID whichPlugIn) const = 0;
143 
150  virtual PluginID GetNthComponent(const DependencyList *dependentInfo, int32 n) const = 0;
151 
159  virtual bool16 GetNthVersion(const DependencyList *dependentInfo, int32 n, int32& majorVersion, int32& minorVersion) const = 0;
160 
165  virtual const PMString *GetErrorString(PluginID whichPlugin) const = 0;
166 
171  virtual const PMString *GetRuntimeErrorString(PluginID whichPlugin) const = 0;
172 
177  virtual const PMString *GetRegistrationErrorString(PluginID whichPlugin) const = 0;
178 
184  virtual const PluginMetadata* GetPluginMetadata(PluginID whichPlugin) const = 0;
185 
191  virtual bool16 IsLoaded(PluginID whichPlugIn) const = 0;
192 
199  virtual bool16 LoadFailed(PluginID whichPlugIn) const = 0;
205  virtual bool16 HasBeenLoaded(PluginID whichPlugIn) const = 0;
206 
211  virtual bool16 MatchCurrentProduct(PluginID whichPlugIn) const = 0;
212 
217  virtual bool16 MatchCurrentFeatureSet(PluginID whichPlugIn) const = 0;
218 
226  virtual IPlugIn *Load(PluginID whichPlugIn) = 0;
227 
231  virtual IPlugInIterator *CreateIterator() const = 0;
232 
233 #ifdef DEBUG
234  typedef enum UnloadStatus { kUnloadNormal, kUnloadFrequently, kUnloadNever } UnloadStatus;
235  virtual void SetUnloadStatus(UnloadStatus status) = 0;
236  virtual const PlugInData *GetPlugInData( PluginID pluginID ) const = 0;
237  virtual void Unload(PluginID whichPlugIn) = 0;
238  virtual void Register(PluginID whichPlugin) = 0;
239  virtual void Unregister(PluginID whichPlugin) = 0;
240 #endif
241 
242  virtual IPlugIn::ThreadingPolicy GetThreadingPolicy(PluginID whichPlugIn) const = 0;
247  virtual bool16 ComparePluginListToFileStream(const IDFile& pluginListFile) const = 0;
248 
253  virtual ErrorCode StreamPluginListToFile(const IDFile& pluginListFile) const = 0;
254 
257  virtual void LoadMultipleThreadPolicyPlugins() const = 0;
258 };
259 
263 {
264  public:
265  // This object should be deleted when you are all done with it.
266  virtual ~IPlugInIterator() {}
267 
268  // An iterator iterates over plugins. Next() returns
269  // the plug-in ID of the next plug-in, or kInvalidPlugin if there are
270  // no more plug-ins.
271  virtual PluginID Next() = 0;
272 };
273 
274 
275 #endif // __IPLUGINLIST__