InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ILibraryCmdUtils.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Mark VerMurlen
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 // Reviewed: 9/25/98
24 //
25 // Purpose:
26 // This interface is used to create and process the various commands of the Library.
27 //
28 //========================================================================================
29 
30 #ifndef __LibraryCmdUtils__
31 #define __LibraryCmdUtils__
32 
33 #include "IPMUnknown.h"
34 #include "LibraryProviderID.h"
35 #include "LibraryAssetID.h"
36 #include "PMFlavorTypes.h"
37 #include "Utils.h"
38 
39 class UIDList;
40 class ICommand;
41 class ILibrary;
42 class IDocument;
44 class XMLReference;
45 class UIDRef;
46 
50 {
51 public:
52  enum {kDefaultIID = IID_ILIBRARYCMDUTILS};
53 
57  static ILibraryCmdUtils* QueryLibraryCmdUtils() { return Utils<ILibraryCmdUtils>().QueryUtilInterface() ; }
58 
59  // Create the various Library Commands
60 
67  virtual ICommand* CreateLibraryAddItemCmd(UIDList *selection, ILibrary *library, bool16 fromCompletePage = false ) = 0;
68 
75  virtual ICommand* CreateLibraryUpdateItemCmd(UIDList *selection, ILibrary *library, const AssetIDList &assetList ) = 0;
76 
83  virtual ICommand* CreateLibraryCopyItemsCmd(const AssetIDList &sourceAssetList,
84  ILibrary *sourceLibrary, ILibrary *destLibrary ) = 0;
85 
91  virtual ICommand* CreateLibraryDeleteItemsCmd(const AssetIDList &assetList, ILibrary *library ) = 0;
92 
97  virtual ICommand* CreateLibraryNewLibCmd( const IDFile &libraryFile ) = 0;
98 
103  virtual ICommand* CreateLibraryOpenLibCmd( const IDFile &libraryFile ) = 0;
104 
109  virtual ICommand* CreateLibraryCloseLibCmd( ILibrary *library ) = 0;
110 
121  virtual ErrorCode ProcessLibraryAddItemCmd(UIDList *selection, ILibrary *library,
122  bool16 fromCompletePage = false, AssetIDList* newAssetList = nil,
123  IDataExchangeHandler *handler = nil, ExternalPMFlavor gotFlavor = kNoFlavor) = 0;
124 
133  virtual ErrorCode ProcessLibraryAddStructureCmd(XMLReference& addThis, ILibrary *library,
134  AssetIDList* newAssetList = nil, IDataExchangeHandler *handler = nil, ExternalPMFlavor gotFlavor = kNoFlavor) = 0;
135 
144  virtual ErrorCode ProcessLibraryUpdateItemCmd(UIDList *selection, ILibrary *library,
145  AssetIDList* newAssetList = nil,
146  IDataExchangeHandler *handler = nil, ExternalPMFlavor gotFlavor = kNoFlavor) = 0;
147 
156  virtual ErrorCode ProcessLibraryUpdateStructureCmd(XMLReference& addThis, ILibrary *library,
157  AssetIDList* assetList = nil, IDataExchangeHandler *handler = nil, ExternalPMFlavor gotFlavor = kNoFlavor) = 0;
158 
165  virtual ErrorCode ProcessLibraryCopyItemsCmd(const AssetIDList &sourceAssetList,
166  ILibrary *sourceLibrary, ILibrary *destLibrary ) = 0;
167 
173  virtual ErrorCode ProcessLibraryDeleteItemsCmd(const AssetIDList &assetList, ILibrary *library ) = 0;
174 
175  // See ILibrarySuite for these functions:
176 #if 0
177  virtual ErrorCode ProcessLibraryPlaceItemsCmd(const AssetIDList &assetList,
178  ILibrary *library,
179  UIDList& out_placedItemList,
180  IDocument* inDocument = nil) = 0;
181 
182  virtual ErrorCode ProcessLibraryPlaceItemsCmd(const AssetIDList &assetList,
183  ILibrary *library,
184  IDocument* inDocument = nil) = 0;
185 #endif
186 
191  virtual ErrorCode ProcessLibraryNewLibCmd( const IDFile &libraryFile ) = 0;
192 
198  virtual ErrorCode ProcessLibraryOpenLibCmd( const IDFile &libraryFile, UIDRef *openedLib = nil ) = 0;
199 
204  virtual ErrorCode ScheduleLibraryCloseLibCmd( ILibrary *library ) = 0;
205 
211  virtual ErrorCode OpenLibraryWithUI(const IDFile& sysFile, UIDRef *openedLib = nil) = 0;
212 };
213 
214 
215 #endif