InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IManagedStatus.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Bill Tislar
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //========================================================================================
23 
24 #ifndef __IMANAGEDSTATUS__
25 #define __IMANAGEDSTATUS__
26 
27 #include "IPMUnknown.h"
28 #include "workgroupid.h"
29 
30 #include <map>
31 #include <vector>
32 
33 class IAMStatusListener;
34 class IManageableAsset;
35 
45 class IManagedStatus : public IPMUnknown
46 {
47 public:
48  enum { kDefaultIID = IID_IMANAGEDSTATUS };
49 
50  typedef std::vector<UIDRef> UIDRefList;
51  typedef std::map<int32, PMString> StatusStringTable;
52  typedef std::map<int32, PMRsrcID> StatusIconTable;
53  typedef std::vector<IAMStatusListener*> ListenerList;
54 
57  {
68  };
69 
72  {
83  };
84 
87  {
91  enGeneralStatus = kWorkgroupPrefix + 1,
93  enContent = kWorkgroupPrefix + 2,
95  enEditing = kWorkgroupPrefix + 3,
97  enToolTip = kWorkgroupPrefix + 4,
98 
99  //NOT USED = kWorkgroupPrefix + 5,
100 
102  enLockOwner = kWorkgroupPrefix + 6,
104  enCurrentUser = kWorkgroupPrefix + 7,
106  enLockClient = kWorkgroupPrefix + 8,
108  enCurrentClient = kWorkgroupPrefix + 9,
110  enCheckedOutBy = kWorkgroupPrefix + 10,
112  enCheckedOutApp = kWorkgroupPrefix + 11,
114  enCheckedOutDoc = kWorkgroupPrefix + 12
115  };
116 
117 
122  virtual void AddListener( UIDRef listenerRef ) = 0;
123 
128  virtual void AddNonPersistentListener( IAMStatusListener * listener ) = 0;
129 
134  virtual UIDRef GetAsset() = 0;
135 
140 
145  virtual RsrcID GetIconID( int32 iconType ) = 0;
146 
152  virtual int32 GetListeners( IManagedStatus::UIDRefList & listeners ) = 0;
153 
159  virtual int32 GetNonPersistentListeners( IManagedStatus::ListenerList & listeners ) = 0;
160 
166  virtual bool16 GetStatusString( int32 stringType, PMString & outString ) = 0;
167 
172 
178  virtual void ImportListeners( IManagedStatus * sourceStatus ) = 0;
179 
184  virtual bool16 IsOnline() = 0;
185 
190  virtual void RemoveListener( UIDRef listenerRef ) = 0;
191 
197  virtual void RemoveNonPersistentListener( IAMStatusListener * listener ) = 0;
198 
205  virtual void SetAsset( UIDRef assetRef ) = 0;
206 
215  virtual bool16 Update( bool16 isOnline,
216  IManagedStatus::EditingState editingState,
217  IManagedStatus::VersionState versionState,
218  const IManagedStatus::StatusStringTable & inStatusStrings,
219  const IManagedStatus::StatusIconTable & inStatusIcons
220  ) = 0;
221 
226  virtual void GetDisplayStatusData( IManagedStatus::StatusStringTable & outStatusStrings, IManagedStatus::StatusIconTable & outStatusIcons ) = 0;
227 
233  virtual bool16 Update( const IManagedStatus::StatusStringTable & inStatusStrings, const IManagedStatus::StatusIconTable & inStatusIcons ) = 0;
234 
239  virtual PMRsrcID GetIconPMRsrcID( int32 iconType ) = 0;
240 
241 protected:
242 
247  virtual void NotifyListeners() = 0;
248 
249 }; // end IManagedStatus interface
250 
251 #endif // __IMANAGEDSTATUS__