InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CServiceProvider Class Reference

#include <CServiceProvider.h>

Inheritance diagram for CServiceProvider:
IK2ServiceProviderIPMUnknownBscDEHDrwEvtSrvcCHLServiceProviderCusCondTxtServiceProviderCusDtLnkDocRespServiceProviderCusDtLnkRespServiceProviderCusDtLnkUISSServiceDocWchServiceProviderGTTxtEdtServiceProviderHypServiceProviderPrtMemHelperStrategyServicePstLstDocServiceProviderSuppUIQuickApplyFilterProviderWRCParagraphComposerServiceProvider

Public Member Functions

 CServiceProvider (IPMUnknown *boss)
 
virtual void GetName (PMString *pName)
 
virtual InstancePerX GetInstantiationPolicy ()
 
virtual bool16 IsDefaultServiceProvider ()
 
virtual bool16 HasMultipleIDs () const
 
virtual void GetServiceIDs (K2Vector< ServiceID > &serviceIDs)
 
virtual IPlugIn::ThreadingPolicy GetThreadingPolicy () const
 
- Public Member Functions inherited from IK2ServiceProvider
virtual ServiceID GetServiceID ()=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Protected Member Functions

void InitThreadingPolicy (PMIID whichIID=IID_IK2SERVICEPROVIDER)
 

Protected Attributes

IPlugIn::ThreadingPolicy fThreadingPolicy
 

Additional Inherited Members

- Public Types inherited from IK2ServiceProvider
enum  { kDefaultIID = IID_IK2SERVICEPROVIDER }
 
enum  InstancePerX { kInstancePerSession, kInstancePerUse, kInstancePerSessionPreload, kInstancePerSessionNoPurge }
 

Detailed Description

Base class for service providers.

Member Function Documentation

virtual void CServiceProvider::GetServiceIDs (K2Vector< ServiceID > & serviceIDs)
virtual

If the service supports more than on ServiceID, return a list of services supported.

Returns
K2Vector<ServiceID> all supported services

Implements IK2ServiceProvider.

Reimplemented in DocWchServiceProvider, GTTxtEdtServiceProvider, PstLstDocServiceProvider, CusCondTxtServiceProvider, CusDtLnkDocRespServiceProvider, CusDtLnkRespServiceProvider, and WRCParagraphComposerServiceProvider.

virtual IPlugIn::ThreadingPolicy CServiceProvider::GetThreadingPolicy () const
virtual

By default the base class will return the threading policy of the plugin where the service provider is defined. Service providers can override this if they reside in a model plugin but want to operate only in the main thread.

Implements IK2ServiceProvider.

Reimplemented in CHLServiceProvider, BscDEHDrwEvtSrvc, HypServiceProvider, and WRCParagraphComposerServiceProvider.

virtual bool16 CServiceProvider::HasMultipleIDs () const
virtual

Support for multiple Service ID's A single service provider may support multiple service IDs. This is a most frequently used for dialog panels that appear in multiple dialogs. If a service does support multiple service ID's and is instance per session, one instance is created per service ID.

Returns
kTrue if this service supports multiple ServiceIDs

Implements IK2ServiceProvider.

Reimplemented in DocWchServiceProvider, GTTxtEdtServiceProvider, PstLstDocServiceProvider, CusCondTxtServiceProvider, CusDtLnkDocRespServiceProvider, CusDtLnkRespServiceProvider, and WRCParagraphComposerServiceProvider.

void CServiceProvider::InitThreadingPolicy (PMIID whichIID = IID_IK2SERVICEPROVIDER)
protected

Helper function that initializes fThreadingPolicy with the threading policy of the specified interface (by default IID_IK2SERVICEPROVIDER but responders and other special providers can use the IIDs of their specific service)

virtual bool16 CServiceProvider::IsDefaultServiceProvider ()
virtual

For the majority of service providers this method should return kFalse. However, if a specific service provider should always be the default for its service this can be set to kTrue.

Implements IK2ServiceProvider.

Reimplemented in CHLServiceProvider, DocWchServiceProvider, GTTxtEdtServiceProvider, PstLstDocServiceProvider, BscDEHDrwEvtSrvc, CusCondTxtServiceProvider, CusDtLnkDocRespServiceProvider, CusDtLnkRespServiceProvider, PrtMemHelperStrategyService, WRCParagraphComposerServiceProvider, SuppUIQuickApplyFilterProvider, HypServiceProvider, and CusDtLnkUISSService.