InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CusDtLnkLinkResourceStatePacket.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Michael Easter
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 // Description:
24 // This class contain information about a link resource used for resource state updates
25 // and automatic resolution of a missing resource.
26 //
27 //========================================================================================
28 
29 #ifndef __CusDtLnkLinkResourceStatePacket__
30 #define __CusDtLnkLinkResourceStatePacket__
31 
32 // ----- Includes -----
33 #include "AsyncWork.h"
34 
35 #include "IDataBase.h"
36 #include "ILinkManager.h"
37 #include "ILinkResource.h"
38 #include "IDTime.h"
39 #include "URI.h"
40 
41 
52 {
53 public:
69  bool bNotify,
70  IDataBase* db,
71  const UID& uid,
72  const URI& uri,
74  const WideString& stamp,
75  const IDTime& modTime,
76  uint64 size);
77 
83 
90  bool operator==(const CusDtLnkLinkResourceStatePacket& rhs) const;
91 
97  ILinkManager::OperationType GetOperationType() const { return fOpType; }
98 
104  bool GetNotify() const { return fbNotify; }
105 
113  IDataBase* GetDatabase() const { return fDB; }
114 
119  UID GetResource() const { return fUID; }
120 
125  URI GetURI() const { return fURI; }
126 
131  void SetURI(const URI& uri);
132 
137  inline bool URIChanged() { return fURIChanged; }
138 
143  ILinkResource::ResourceState GetState() const { return fState; }
144 
150 
155  inline bool StateChanged() { return fStateChanged; }
156 
161  WideString GetStamp() const { return fStamp; }
162 
167  void SetStamp(const WideString& stamp);
168 
173  inline bool StampChanged() { return fStampChanged; }
174 
179  IDTime GetModTime() const { return fModTime; }
180 
185  void SetModTime(const IDTime& modTime);
186 
191  inline bool ModTimeChanged() { return fModTimeChanged; }
192 
197  uint64 GetSize() const { return fSize; }
198 
203  void SetSize(uint64 size);
204 
209  inline bool SizeChanged() { return fSizeChanged; }
210 
215  inline bool LinkResourceChanged() { return (fURIChanged || fStateChanged || fStampChanged || fModTimeChanged || fSizeChanged); }
216 
217 private:
218  // Prevent copy construction and assignment.
219 // CusDtLnkLinkResourceStatePacket(const CusDtLnkLinkResourceStatePacket&);
220 // CusDtLnkLinkResourceStatePacket& operator=(const CusDtLnkLinkResourceStatePacket&);
221 
223  bool fbNotify;
224 
225  IDataBase* fDB;
226  UID fUID;
227  URI fURI;
229  WideString fStamp;
230  IDTime fModTime;
231  uint64 fSize;
232 
233  bool fURIChanged;
234  bool fStateChanged;
235  bool fStampChanged;
236  bool fModTimeChanged;
237  bool fSizeChanged;
238 };
239 
240 #endif // __CusDtLnkLinkResourceStatePacket__