InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IManagedStatus Class Referenceabstract

#include <IManagedStatus.h>

Inheritance diagram for IManagedStatus:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IMANAGEDSTATUS }
 
enum  EditingState {
  enUnknownEditingState = 0, enNotEditing = 1, enEditingLocally = 2, enEditingRemotely = 3,
  enEditingConflict = 4
}
 
enum  VersionState {
  enUnknownVersionState = 0, enUpToDate = 1, enLocalIsNewer = 2, enLocalIsOutOfDate = 3,
  enVersionConflict = 4
}
 
enum  WGStatusType {
  enInvalidWGStatus = 0, enGeneralStatus = kWorkgroupPrefix + 1, enContent = kWorkgroupPrefix + 2, enEditing = kWorkgroupPrefix + 3,
  enToolTip = kWorkgroupPrefix + 4, enLockOwner = kWorkgroupPrefix + 6, enCurrentUser = kWorkgroupPrefix + 7, enLockClient = kWorkgroupPrefix + 8,
  enCurrentClient = kWorkgroupPrefix + 9, enCheckedOutBy = kWorkgroupPrefix + 10, enCheckedOutApp = kWorkgroupPrefix + 11, enCheckedOutDoc = kWorkgroupPrefix + 12
}
 
typedef std::vector< UIDRefUIDRefList
 
typedef std::map< int32, PMStringStatusStringTable
 
typedef std::map< int32, PMRsrcIDStatusIconTable
 
typedef std::vector
< IAMStatusListener * > 
ListenerList
 

Public Member Functions

virtual void AddListener (UIDRef listenerRef)=0
 
virtual void AddNonPersistentListener (IAMStatusListener *listener)=0
 
virtual UIDRef GetAsset ()=0
 
virtual
IManagedStatus::EditingState 
GetEditingState ()=0
 
virtual RsrcID GetIconID (int32 iconType)=0
 
virtual int32 GetListeners (IManagedStatus::UIDRefList &listeners)=0
 
virtual int32 GetNonPersistentListeners (IManagedStatus::ListenerList &listeners)=0
 
virtual bool16 GetStatusString (int32 stringType, PMString &outString)=0
 
virtual
IManagedStatus::VersionState 
GetVersionState ()=0
 
virtual void ImportListeners (IManagedStatus *sourceStatus)=0
 
virtual bool16 IsOnline ()=0
 
virtual void RemoveListener (UIDRef listenerRef)=0
 
virtual void RemoveNonPersistentListener (IAMStatusListener *listener)=0
 
virtual void SetAsset (UIDRef assetRef)=0
 
virtual bool16 Update (bool16 isOnline, IManagedStatus::EditingState editingState, IManagedStatus::VersionState versionState, const IManagedStatus::StatusStringTable &inStatusStrings, const IManagedStatus::StatusIconTable &inStatusIcons)=0
 
virtual void GetDisplayStatusData (IManagedStatus::StatusStringTable &outStatusStrings, IManagedStatus::StatusIconTable &outStatusIcons)=0
 
virtual bool16 Update (const IManagedStatus::StatusStringTable &inStatusStrings, const IManagedStatus::StatusIconTable &inStatusIcons)=0
 
virtual PMRsrcID GetIconPMRsrcID (int32 iconType)=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

virtual void NotifyListeners ()=0
 

Detailed Description

The IManagedStatus interface represents asset management status information for a managed asset. Each IManageableAsset instance should have its own IManagedStatus instance. The IManagedStatus instance is normally created during the IAMServiceProvider::enInitialize service and set by calling the IManageableAsset::SetStatus method. Custom implementations of this interface are allowed; however, most applications will find it convenient to define a custom status boss by subclassing kManagedStatusBoss, which uses the kManagedStatusImpl for this interface.

See Also
IManageableAsset.
IAMServiceProvider.

Member Enumeration Documentation

Predefined asset editing states
Enumerator
enUnknownEditingState 

default state

enNotEditing 

asset is not currently being edited

enEditingLocally 

this instance is being edited (edited here)

enEditingRemotely 

being edited elsewhere

enEditingConflict 

editing here and elsewhere at the same time

Prefined asset version states (for versioned asset)
Enumerator
enUnknownVersionState 

default state

enUpToDate 

local cache identical to latest version

enLocalIsNewer 

local cache has changes not checked in

enLocalIsOutOfDate 

local cache is older than latest version

enVersionConflict 

local cache has changes while newer version exists

Predefined status identifiers for status icons and strings.
Enumerator
enInvalidWGStatus 

default status type

enGeneralStatus 

general display status

enContent 

version status

enEditing 

editing status

enToolTip 

tooltip display status

enLockOwner 

Current IAMLockable lock owner name

enCurrentUser 

Current LiveEdit user name

enLockClient 

Current lock client name

enCurrentClient 

Current client name

enCheckedOutBy 

User name (for LiveEdit)

enCheckedOutApp 

Application name (for LiveEdit

enCheckedOutDoc 

Document name (for LiveEdit

Member Function Documentation

virtual void IManagedStatus::AddListener (UIDRef listenerRef)
pure virtual

This method adds an IAMStatusListener to the list for status notifications.

Parameters
listenerRefis a UIDRef of a boss with an IAMStatusListener interface.
See Also
IAMStatusListener.
virtual void IManagedStatus::AddNonPersistentListener (IAMStatusListenerlistener)
pure virtual

Adds a pointer to a non-persistent IAMStatusListener to the list for status notifications. Note that persistent IAMStatusListeners may be added via the AddListener method.

Parameters
listeneris a valid pointer to a non-persistent IAMStatusListener instance.
virtual UIDRef IManagedStatus::GetAsset ()
pure virtual

Gets the UIDRef of the IManageableAsset boss associated with this status instance.

Returns
a valid UIDRef unless not properly set.
See Also
IManageableAsset.
virtual void IManagedStatus::GetDisplayStatusData (IManagedStatus::StatusStringTable & outStatusStrings,
IManagedStatus::StatusIconTable & outStatusIcons 
)
pure virtual

This method retrieves display status data.

Parameters
outStatusStringsis populated with the current StatusStringTable.
outStatusIconsis populated with the current StatusIconTable.
virtual IManagedStatus::EditingState IManagedStatus::GetEditingState ()
pure virtual

Retrieves the current EditingState for the asset.

Returns
IManagedStatus::EditingState.
virtual RsrcID IManagedStatus::GetIconID (int32 iconType)
pure virtual

Retrieves a display icon ID.

Parameters
iconTypeis a predefined WGStatusType or other unique identifier.
Returns
a valid RsrcID or 0.
virtual PMRsrcID IManagedStatus::GetIconPMRsrcID (int32 iconType)
pure virtual

Retrieves a display icon PMRsrcID.

Parameters
iconTypeis a predefined WGStatusType or other unique identifier.
Returns
a valid PMRsrcID or PMRsrcID(kInvalidRsrcID,kInvalidPlugin).
virtual int32 IManagedStatus::GetListeners (IManagedStatus::UIDRefList & listeners)
pure virtual

Retrieves the list of IAMStatusListeners added via the AddListener method.

Parameters
listenersis populated with the UIDRef of the IAMStatusListeners.
Returns
the number of UIDRefs put in the list.
See Also
IAMStatusListener.
virtual int32 IManagedStatus::GetNonPersistentListeners (IManagedStatus::ListenerList & listeners)
pure virtual

Retrieves the list of non-persistent IAMStatusListener pointers. This list contains only those IAMStatusListeners added via the AddNonPersistentListener method.

Parameters
listenersis populated with IAMStatusListener pointers.
Returns
the number of IAMStatusListener pointers in the list.
virtual bool16 IManagedStatus::GetStatusString (int32 stringType,
PMStringoutString 
)
pure virtual

Retrieves a display status string.

Parameters
stringTypeis a predefined WGStatusType or other unique identifier.
outStringis set to the corresponding display text or empty if no status string is available.
virtual IManagedStatus::VersionState IManagedStatus::GetVersionState ()
pure virtual

Retrieves the current VersionState.

Returns
IManagedStatus::VersionState.
virtual void IManagedStatus::ImportListeners (IManagedStatussourceStatus)
pure virtual

This method imports the IAMStatusListeners from another IManagedStatus instance. This method is useful when a new IManagedStatus boss must be created to replace an old one.

Parameters
sourceStatusis a valid pointer to another IManagedStatus instance.
See Also
IAMStatusListener.
virtual bool16 IManagedStatus::IsOnline ()
pure virtual

This method tests if this instance can communicate with the asset management system. For server base asset management systems, this tests if the client side has a connection with the server.

Returns
kTrue if a connection exists; kFalse otherwise.
virtual void IManagedStatus::NotifyListeners ()
protectedpure virtual

This method notifies listeners that the latest status update is available by calling the IAMStatusListener::Update() method for each IAMStatusListener.

See Also
IAMStatusListener.
virtual void IManagedStatus::RemoveListener (UIDRef listenerRef)
pure virtual

This method removes an IAMStatusListener from the status notification list.

Parameters
listenerRefis a UIDRef of a boss with an IAMStatusListener interface.
See Also
IAMStatusListener.
virtual void IManagedStatus::RemoveNonPersistentListener (IAMStatusListenerlistener)
pure virtual

Removes an IAMStatusListener pointer for a non-persistent listener from the status notification list.

Parameters
listeneris a valid pointer to an IAMStatusListener previously added via the AddNonPersistentListener method.
virtual void IManagedStatus::SetAsset (UIDRef assetRef)
pure virtual

This method sets the UIDRef of the IManageableAsset boss associated with this status. This method is typically set by the IAMServiceProvider::enInitialize service.

Parameters
assetRefis the UIDRef of an IManageableAsset.
See Also
IManageableAsset.
IAMServiceProvider.
virtual bool16 IManagedStatus::Update (bool16 isOnline,
IManagedStatus::EditingState editingState,
IManagedStatus::VersionState versionState,
const IManagedStatus::StatusStringTable & inStatusStrings,
const IManagedStatus::StatusIconTable & inStatusIcons 
)
pure virtual

This method updates status data then calls NotifyListeners() if an status data has changed.

Parameters
isOnlineis the current online status for the asset.
editingStateis the current editing state for the asset.
versionStateis the current version state for the asset.
inStatusStringsis the current StatusStringTable for displaying status.
inStatusIconsis the current StatusIconTable for displaying status.
Returns
kTrue if any status data has changed; kFalse otherwise.
virtual bool16 IManagedStatus::Update (const IManagedStatus::StatusStringTable & inStatusStrings,
const IManagedStatus::StatusIconTable & inStatusIcons 
)
pure virtual

This method updates only the display status data.

Parameters
inStatusStringsis the current StatusStringTable for displaying status.
inStatusIconsis the current StatusIconTable for displaying status.
Returns
kTrue if the display status has changed; kFalse otherwise.