![]() | InDesign SDK 20.5 |
#include <IK2ServiceRegistry.h>

Public Types | |
| enum | { kDefaultIID = IID_IK2SERVICEREGISTRY } |
Public Member Functions | |
| virtual IK2ServiceProvider * | QueryServiceProviderByClassID (ServiceID serviceID, ClassID providerClassID) const =0 |
| virtual IK2ServiceProvider * | QueryDefaultServiceProvider (ServiceID serviceID) const =0 |
| virtual ClassID | GetDefaultServiceProviderID (ServiceID serviceID) const =0 |
| virtual void | SetDefaultServiceProviderID (ServiceID serviceID, ClassID classID)=0 |
Functions for iterating a particular serviceID | |
| virtual int32 | GetServiceProviderCount (ServiceID serviceID) const =0 |
| virtual IK2ServiceProvider * | QueryNthServiceProvider (ServiceID serviceID, int32 n) const =0 |
| virtual ClassID | GetNthServiceProviderID (ServiceID serviceID, int32 n) const =0 |
| virtual int32 | GetServiceProviderIndex (ServiceID serviceID, ClassID serviceProviderID) const =0 |
| virtual int32 | GetServiceProviderIndex (const IK2ServiceProvider *serviceProvider) const =0 |
For Internal Use Only | |
| virtual void | Startup ()=0 |
| virtual void | Shutdown ()=0 |
| virtual void | ReleaseCachedServiceProviders ()=0 |
| virtual void | RegisterServiceProvider (ClassID classID)=0 |
| virtual void | PerformStartupServices ()=0 |
| virtual void | GetRegisteredServiceIDs (K2Vector< ServiceID > &services) const =0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
The service registry manages all the services in all the plug-ins. It maintains an internal list, sorted by the service's ServiceID. A service is a generic concept, identified by a ServiceID. For instance, kScriptProviderServiceID is the service used by objects that want to add new functionality to scripting. There may be many different script providers, each one sharing the same kScriptProviderServiceID.
| pure virtual |
Returns the ClassID of the default service provider, or if no default has been set the ClassID of the first service provider found for the given ServiceID.
| serviceID | what service |
| pure virtual |
Return the classID of the n'th provider for the service.
| serviceID | the service we're interested in |
| n | the index of the provider |
| pure virtual |
Retrieves a list of all the registered service IDs with this instance of service registry.
| pure virtual |
Get the number of providers for the service.
| serviceID | the service we're interested in Return the number of providers for a specific service. |
| pure virtual |
Given a service provider, return its index.
| serviceID | the service we're interested in |
| serviceProviderID | the provider we're interested in |
| pure virtual |
Given a service provider, return its index.
| IK2ServiceProvider* | the service provider we're interested in |
| pure virtual |
The IStartupShutdownService::Startup() method of all service providers that support the kStartupShutdownServiceID is called.
| pure virtual |
Returns the default service provider, or if no default has been set the first service provider found for the given ServiceID.
| serviceID | what service |
| pure virtual |
Return the n'th provider for the service.
| serviceID | the service we're interested in |
| n | the index of the provider |
| pure virtual |
Provides access to a specific service. In many cases a service is provided by a single instance of a boss object that is used by multiple callers. This method returns the existing instance of a service, if one has already been created.
| serviceID | what service to look in |
| providerClass | the classID of the service provider |
| pure virtual |
This method of registration is only for use in very obscure cases (like the error string table service, where we need the service provider to be available before all the plug-ins are installed into the object model, and therefore before Startup() has been called).
| pure virtual |
Releases all cached service providers, thus freeing up memory. This is only called by the memory management code.
| pure virtual |
Sets the given classID as the default service provider for the given ServiceID.
| serviceID | what service |
| providerClass | the classID of the service provider |
| pure virtual |
Called by the application during application shutdown. The IStartupShutdownService::Shutdown() method of all service providers that support the kStartupShutdownServiceID is called.
| pure virtual |
Called by the application during application startup. Every boss class description that includes an IK2ServiceProvider interface is registered as a service provider.