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

Public Types | |
| enum | { kDefaultIID = IID_IAMSPMANAGER } |
| typedef std::vector < IAssetMonitor * > | AssetMonitorPtrList |
| typedef std::vector< UIDRef > | UIDRefList |
Public Member Functions | |
| virtual ErrorCode | BindAsset (IManageableAsset *pAsset, IManageableAsset::AssetType assetType, const IDFile &file=IDFile())=0 |
| virtual ErrorCode | UnbindAsset (IManageableAsset *pAsset)=0 |
| virtual int32 | GetNumberOfAMSystemProviders ()=0 |
| virtual IAMSystemProvider * | GetNthSystemProvider (int32 n)=0 |
| virtual IAMSystemProvider * | GetSystemProvider (ClassID amspClassID)=0 |
| virtual ClassID | GetSystemProviderClassID (ClassID amServiceProviderClassID)=0 |
| virtual IAMServiceProvider * | GetServiceProvider (ClassID amServiceProviderClassID)=0 |
| virtual int32 | GetAllAssetMonitors (IAMSPManager::AssetMonitorPtrList &outList)=0 |
| virtual IAMUIServiceProvider * | GetUIServiceProvider (IManageableAsset *asset=nil)=0 |
| virtual IAMUIServiceProvider * | GetUIServiceProvider (IManageableAsset *asset, int32 serviceID)=0 |
| virtual IAMUIServiceProvider * | GetUIServiceProvider (const IDFile &file, int32 serviceID)=0 |
| virtual IAMUIServiceProvider * | GetUIServiceProvider (const IAMSPManager::UIDRefList &assetList, int32 serviceID)=0 |
| virtual IAMServiceProvider * | QueryServiceProvider (const IDFile &file)=0 |
| virtual void | ShowAllWarningDialogs ()=0 |
| virtual IAMUIEnablementRules * | GetUIEnablementRules (IManageableAsset *asset)=0 |
| virtual bool16 | IsAuthenticationUIEnabled () const =0 |
| virtual bool16 | EnableAuthenticationUI (bool16 enable=kTrue) 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 IAMSPManager interface accesses the AMSP (asset management system provider) manager. The AMSP manager maintains knowledge of IAMSystemProviders and their service, UI, and monitoring components. This interface is the starting point for obtaining access to an asset management system. IAMSPManager is obtained from the session as follows:
InterfacePtr<IAMSPManager> iAMSPManager( GetExecutionContextSession(), UseDefaultIID() );
In order to be recognized by the AMSP manager, an asset management system provider's boss must subclass the kAMSPBoss (see workgroupid.h).
Example:
This is a simple asset management system provider that has an asset management service provider (IAMServiceProvider) for providing IAMServices.
Class
{
kMyAMSPBoss,
kAMSPBoss,
{
IID_IAMSYSTEMPROVIDER, kMyAMSPImpl,
IID_IAMSERVICEPROVIDER, kMyAMServiceProviderImpl,
}
},
| pure virtual |
The BindAsset method attaches (binds) asset management components to any boss (model object) that aggregates the IManageableAsset interface. Binding must be done before monitoring or performing any asset management services on the IManageableAsset. Any IManageableAsset instance that is bound using this method must also be unbound using IAMSPManager::UnbindAsset(). An IManageableAsset instance may be bound any number of times. It is not necessary to call UnbindAsset() before calling BindAsset(). A model object must be rebound whenever its association with an asset changes. For example, when a kDocBoss is written as part of the Save As command, it does not get recreated, but its location changes, so it must be bound to the new location.
| pAsset | is a valid pointer to an IManageableAsset interface on a model object boss. |
| assetType | is one of the predefined IManageableAsset::AssetTypes. Attempting to bind an IManageableAsset of type IManageableAsset::enLinked will fail if the link's IDataBase is not associated with an IDocument in the app's IDocumentList. |
| file | is an IDFile with a valid path or an empty path. This argument is ignored unless the assetType is IManageableAsset::enDocument. Specify this argument when binding a document boss associated with an existing file. Omit this argument (or specify an IDFile with an empty path) when binding a new document that has not yet been saved. |
| pure virtual |
INTERNAL USE ONLY. This method enables or disables authentication UI.
| enable | kTrue enables authentication UI; kFalse disables it. |
| pure virtual |
This method retrieves a list of all of the IAssetMonitors.
| outList | is populated with valid pointers to all of the IAssetMonitors registered with the AMSP manager. The pointers are guaranteed to be valid for the duration of the session. |
| pure virtual |
This method retrieves the IAMSystemProvider for a specified index.
Example usage:
InterfacePtr<IAMSystemProvider> amsp( iAMSPManager->GetNthSystemProvider( i ), UseDefaultIID() );
| n | is an integer >= 0. |
| pure virtual |
This method retrieves the number of IAMSystemProvider instances that are currently registered with the AMSP manager.
| pure virtual |
This method retrieves the IAMServiceProvider interface for a specific asset management system provider (AMSP) implementation.
| amServiceProviderClassID | is the ClassID of an existing AMSP. |
| pure virtual |
This method retrieves a pointer to the IAMSystemProvider instance for an AMSP boss.
| amspClassID | is the ClassID of a boss that subclasses kAMSPBoss. |
| pure virtual |
This method retrieves the ClassID of the asset management system provider for an asset management service provider (IAMServiceProvider).
| amServiceProviderClassID | is the ClassID of a boss that aggregates IID_IAMSERVICEPROVIDER. |
| pure virtual |
This method retrieves the IAMUIEnablementRules for a specific IManageableAsset. The enablement rules are used to enable or disable UI widgets for an asset.
| asset | is a valid pointer to a bound IManageableAsset. |
| pure virtual |
This method retrieves the IAMUIServiceProvider for an asset.
| asset | is a valid pointer to a bound IManageableAsset or nil. If nil, this method returns the first enabled IAMUIServiceProvider available. |
| pure virtual |
This method retrieves the IAMUIServiceProvider that offers a particular UI service.
| asset | is a valid pointer to a bound IManageableAsset. |
| serviceID | specifies the IAMUIService service identifier. |
| pure virtual |
This method retrieves the IAMUIServiceProvider that offers a particular UI service that is compatible with an asset file.
| file | is an IDFile with a valid path to an existing asset. |
| serviceID | specifies the IAMUIService service identifier. |
| pure virtual |
This method retrieves the IAMUIServiceProvider that offers a particular UI service that is compatible with a list of assets. This method is used primarily to display UI for batch checkin comments.
| assetList | is a list of UIDRefs for bound IManageableAssets. |
| serviceID | specifies the IAMUIService service identifier. |
| pure virtual |
INTERNAL USE ONLY. This method tests if authentication UI is enabled.
| pure virtual |
This method retrieves the IAMServiceProvider for a file.
| file | is an IDFile with a valid path to an existing asset. |
| pure virtual |
This method notifies the underlying asset management systems that warning dialogs are allowed.
| pure virtual |
The UnbindAsset method removes asset management components that are bound to an asset. Before destroying any IManageableAsset instance, call this method if the instance was previously bound using BindAsset(). Failure to call UnbindAsset() for a bound IManageableAsset may result in unreleased resources when a document is closed.
| pAsset | is a valid pointer to an IManageableAsset interface on a model object boss. |