InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ILibraryAssetCollection.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner:
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 // Purpose:
24 // This interface is a secondary interface to the Library Boss. This interface
25 // controls the "collection" of assets that make up the Library. Use this
26 // interface to add and remove assets from the Library.
27 //
28 //========================================================================================
29 
30 #ifndef __ILibraryAssetCollection__
31 #define __ILibraryAssetCollection__
32 
33 #include "IPMUnknown.h"
34 #include "LibraryProviderID.h"
35 
36 
37 class ILibraryAsset;
40 class LibraryAssetID;
41 
46 {
47 public:
48  enum { kDefaultIID = IID_ILIBRARYASSETCOLLECTION };
49 
54  virtual ILibraryAsset* AcquireNewAsset() = 0;
55 
62  virtual ILibraryAsset* AcquireAssetCopy(ILibraryAsset* sourceAsset) = 0;
63 
69  virtual ILibraryAsset* AcquireAsset(const LibraryAssetID& id) = 0;
70 
77  virtual void ReleaseAsset( ILibraryAsset* asset, bool16 assetWasChanged = kTrue, bool16 bForce = kFalse ) = 0;
78 
82  virtual void RemoveAsset(const LibraryAssetID& id) = 0;
83 
87  virtual bool16 IsOpen() const = 0;
88 
92  virtual bool16 IsLocked() const = 0;
93 
99 
103  virtual int32 Length() const = 0;
104 
105  //-------------- For Internal Use Only -------------------------
106 
107  // Opens the collection with the given pathname
110  virtual bool16 Open( const IDFile &libraryFile ) = 0;
111 
112  // Creates a new collection with the given pathname
115  virtual bool16 Create( const IDFile &libraryFile ) = 0;
116 
117  // Closes the collection.
120  virtual void Close() = 0;
121 
122  // Disable and Enable Notification of Library Open and Close events
125  virtual void DisableLibraryLevelNotification() = 0;
128  virtual void EnableLibraryLevelNotification() = 0;
129 
130  // Disable and Enable Notification of Asset Addition, Change, and Deletion events
133  virtual void DisableAssetLevelNotification() = 0;
134 
137  virtual void EnableAssetLevelNotification() = 0;
138 
139  // Get, Set, and Test the status of the "Has Changed" flag
142  virtual void ClearHasChangedStatus() = 0;
143 
146  virtual void SetHasChangedStatus() = 0;
147 
150  virtual bool16 HasChanged() = 0;
151 
152  // Tell whether the library is old and needs to be converted to snippet data store
155  virtual bool16 NeedsSnippetConversion( const IDFile &libraryFile ) = 0;
156 
157  // Converts the input library file to snippet data storage format
160  virtual bool16 ConvertToSnippets( const IDFile &oldLibraryFile, IDFile &tmpLibraryFile, IDFile &newLibraryFile, bool16 bUseOldName = kFalse ) = 0;
161 
162 };
163 
164 
165 #endif