#include <IManagedStatus.h>
|
| 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< UIDRef > | UIDRefList |
| |
| typedef std::map< int32, PMString > | StatusStringTable |
| |
| typedef std::map< int32, PMRsrcID > | StatusIconTable |
| |
typedef std::vector < IAMStatusListener * > | ListenerList |
| |
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.
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 |
| virtual void IManagedStatus::AddListener | ( | UIDRef | listenerRef | ) | |
| 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
| virtual UIDRef IManagedStatus::GetAsset | ( | | ) | |
| pure virtual |
| virtual void IManagedStatus::GetDisplayStatusData | ( | IManagedStatus::StatusStringTable & | outStatusStrings, | | | IManagedStatus::StatusIconTable & | outStatusIcons | | ) | | |
| pure virtual |
This method retrieves display status data.
- Parameters
| outStatusStrings | is populated with the current StatusStringTable. |
| outStatusIcons | is populated with the current StatusIconTable. |
| virtual RsrcID IManagedStatus::GetIconID | ( | int32 | iconType | ) | |
| pure virtual |
Retrieves a display icon ID.
- Parameters
| iconType | is 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
| iconType | is 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
| listeners | is 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
- Returns
- the number of IAMStatusListener pointers in the list.
| virtual bool16 IManagedStatus::GetStatusString | ( | int32 | stringType, | | | PMString & | outString | | ) | | |
| pure virtual |
Retrieves a display status string.
- Parameters
| stringType | is a predefined WGStatusType or other unique identifier. |
| outString | is set to the corresponding display text or empty if no status string is available. |
| virtual void IManagedStatus::ImportListeners | ( | IManagedStatus * | sourceStatus | ) | |
| pure virtual |
| 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 |
| virtual void IManagedStatus::RemoveListener | ( | UIDRef | listenerRef | ) | |
| pure virtual |
| virtual void IManagedStatus::RemoveNonPersistentListener | ( | IAMStatusListener * | listener | ) | |
| pure virtual |
Removes an IAMStatusListener pointer for a non-persistent listener from the status notification list.
- Parameters
| listener | is a valid pointer to an IAMStatusListener previously added via the AddNonPersistentListener method. |
| virtual void IManagedStatus::SetAsset | ( | UIDRef | assetRef | ) | |
| pure virtual |
This method updates status data then calls NotifyListeners() if an status data has changed.
- Parameters
| isOnline | is the current online status for the asset. |
| editingState | is the current editing state for the asset. |
| versionState | is the current version state for the asset. |
| inStatusStrings | is the current StatusStringTable for displaying status. |
| inStatusIcons | is 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
| inStatusStrings | is the current StatusStringTable for displaying status. |
| inStatusIcons | is the current StatusIconTable for displaying status. |
- Returns
- kTrue if the display status has changed; kFalse otherwise.