InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IAMServiceProvider.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 __IAMSERVICEPROVIDER__
25 #define __IAMSERVICEPROVIDER__
26 
27 #include "IPMUnknown.h"
28 #include "workgroupid.h"
29 #include "IDFile.h"
30 #include "FileTypeRegistry.h"
31 #include "ILinkResource.h"
32 #include "IOpenFileCmdData.h"
33 #include "IManageableAsset.h"
34 
35 class IAMService;
36 class WideString;
37 
42 {
43 public:
44  enum { kDefaultIID = IID_IAMSERVICEPROVIDER };
45 
51  {
54 
79  enEnsureLatestVersion = kWorkgroupPrefix + 1,
80 
107  enCheckIn = kWorkgroupPrefix + 2,
108 
114  enRevert = kWorkgroupPrefix + 3,
115 
128  enCheckOut = kWorkgroupPrefix + 4,
129 
141  enCancelCheckOut = kWorkgroupPrefix + 5,
142 
148  enTerminate = kWorkgroupPrefix + 6,
149 
162  enInitialize = kWorkgroupPrefix + 7,
163 
171  enAfterSave = kWorkgroupPrefix + 8,
172 
179  enAfterSaveAs = kWorkgroupPrefix + 9,
180 
188  enUpdateStoredAssetReference = kWorkgroupPrefix + 10,
189 
198  enUpdateProxyVersionNumber = kWorkgroupPrefix + 11,
199 
205  enInvalidateProxyVersionNumber = kWorkgroupPrefix + 12,
206 
223  enGetUniqueAssetLocation = kWorkgroupPrefix + 13,
224 
237  enBatchCheckIn = kWorkgroupPrefix + 14,
238 
244  enAfterCheckIn = kWorkgroupPrefix + 15,
245 
251  enBeforeCheckOut = kWorkgroupPrefix + 16,
252 
258  enAfterCancelCheckOut = kWorkgroupPrefix + 17,
259 
266  enUpdateLinkLocation = kWorkgroupPrefix + 18,
267 
273  enRelink = kWorkgroupPrefix + 19,
274 
287  enUnembed = kWorkgroupPrefix + 20,
288 
295  enStoreCheckInData = kWorkgroupPrefix + 21,
296 
302  enRetrieveCheckInData = kWorkgroupPrefix + 22
303 
304  }; // end AssetService enum
305 
306 
320  {
321  public:
322  AssetHints() :
323  kFileType(0),
324  kFileExtension(PMString(""))
325  {}
326  AssetHints( SysOSType sysOSType, PMString & fileExtension ) :
327  kFileType(sysOSType),
328  kFileExtension(fileExtension)
329  {}
330  AssetHints( const AssetHints & hints ) :
331  kFileType(hints.kFileType),
332  kFileExtension(hints.kFileExtension)
333  {}
334  AssetHints& operator = (const AssetHints &copy)
335  { kFileType = copy.kFileType; kFileExtension = copy.kFileExtension; return *this; }
336  SysOSType kFileType;
337  PMString kFileExtension;
338  }; // end AssetHints
339 
341 
350  virtual bool16 CanService( const IDFile & file, const IAMServiceProvider::AssetHints * hints = nil ) = 0;
351 
357  virtual bool16 CanService( const IManageableAsset * asset ) = 0;
358 
368  virtual bool16 CanUpdateScriptedAssetData( UIDRef assetRef, const PMString & scriptString, int32 scriptID ) = 0;
369 
375  virtual bool16 GetLinkResourceId( const IDFile & inFile, ILinkResource::ResourceId & outResourceId ) = 0;
376 
417  virtual IAMService* GetService( int32 assetServiceID ) = 0;
418 
425  virtual ErrorCode Init() = 0;
426 
433  virtual bool16 IsTemporaryVersion( const IDFile & file ) = 0;
434 
440  virtual bool16 IsVersioned( const IDFile & file ) = 0;
441 
449  virtual IOpenFileCmdData::OpenFlags OverrideOpenFlags( const IDFile & file, IOpenFileCmdData::OpenFlags inOpenFlags ) = 0;
450 
458  virtual ErrorCode UpdateScriptedAssetData( UIDRef assetRef, const PMString & scriptString, int32 scriptID ) = 0;
459 
471  virtual bool16 IsWriteable( const IDFile & assetFile ) = 0;
472 
480  virtual bool16 GetLockData( const IDFile & assetFile, IManagedStatus::StatusStringTable & outLockData, UIFlags uiFlags = kFullUI ) = 0;
481 
482 }; // end IAMServiceProvider interface
483 
484 #endif // __IAMSERVICEPROVIDER__