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

Public Types | |
| enum | { kDefaultIID = IID_IASSETMONITOR } |
Public Member Functions | |
| virtual bool16 | AssetHasMoved (IManageableAsset *asset)=0 |
| virtual bool16 | StartUp ()=0 |
| virtual bool16 | ShutDown ()=0 |
| virtual bool16 | CanMonitor (const IDFile &file)=0 |
| virtual bool16 | CanMonitor (IManageableAsset *asset)=0 |
| virtual ICommand * | GetHandleChangesCommand ()=0 |
| virtual IManagedStatus * | GetNextPendingStatus ()=0 |
| virtual bool16 | IsStatusPending (IManageableAsset *asset)=0 |
| virtual uint32 | DoBackgroundTasks ()=0 |
| virtual ErrorCode | StartMonitoring (UIDRef assetRef)=0 |
| virtual ErrorCode | StopMonitoring (UIDRef assetRef)=0 |
| virtual bool16 | IsMonitoring (UIDRef assetRef)=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 IAssetMonitor interface is responsible for monitoring status changes for assets. An asset monitor is enabled simply by returning its instance on the IAMSystemProvider::GetAssetMonitor() method. Each asset monitor is automatically called by the AssetMonitorIdleTask, which has a loop that calls two IAssetMonitor methods. The first call, to IAssetMonitor::GetHandleChangesCommand(), gets an ICommand to schedule for processing status changes. A command rather than a direct call is used in the event that a modal dialog is necessary for informing the end user of a status change (the idle loop should never be interrupted with a modal dialog). The second call, which is made to IAssetMonitor::DoBackgroundTasks(), gives the IAssetMonitor implementation time to perform non-UI status processing or other tasks.
Developer hint: the design details of the HandleChangesCommand is left up to the implementation; however, the command should have a processing loop that calls IAssetMonitor::GetNextPendingStatus() for the next IManagedStatus that needs processing. This is the technique used to process Version Cue status changes.
| pure virtual |
This method tests if an asset has moved or has been renamed.
| asset | is a valid pointer to a bound IManageableAsset instance. |
| pure virtual |
This method tests if the asset monitor is able to monitor a file for status changes.
| file | is an IDFile with a path to an existing file. |
| pure virtual |
This method tests if the asset monitor is able to monitor an IManageableAsset for status changes.
| asset | is a valid pointer to an IManageableAsset instance. |
| pure virtual |
This method is called from the idle task in order to give the asset monitor implementation processing time. This method should not display UI or otherwise interrupt the idle loop processing.
| pure virtual |
This method provides an ICommand that can be scheduled to process asset status changes. May return nil if there are no pending changes to process. An ICommand should be used to process status changes if the status processing displays modal dialogs (such as for alerts).
| pure virtual |
This method retrieves the next pending IManagedStatus instance to process.
| pure virtual |
This method tests if an asset is currently being monitored for status changes.
| assetRef | is the UIDRef of a bound IManageableAsset. |
| pure virtual |
This method tests if an asset has a pending status that has not yet been processed. The StartWatching() method must be called for the asset before this method is called.
| asset | is an IManageableAsset that is being monitored. |
| pure virtual |
This method performs any termination needed after monitoring ends. This method is called once during app shutdown.
| pure virtual |
This method starts monitoring for status changes for an asset. Changes to IManagedStatus and IAMLockable states are typically monitored.
| assetRef | is the UIDRef of a bound IManageableAsset. |
| pure virtual |
This method does any initialization needed before monitoring begins. This method is called once during app startup.
| pure virtual |
This method stops monitoring for status changes for an asset.
| assetRef | is the UIDRef of a bound IManageableAsset. |