InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IImportProvider.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Zak Williamson
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 __IImportProvider__
25 #define __IImportProvider__
26 
27 #include "IPMUnknown.h"
28 
29 #include "OpenPlaceID.h"
30 #include "PMString.h"
31 #include "PMFlavorTypes.h"
32 
33 class ICommand;
34 class IFormatType;
35 
43 {
44  public:
49  virtual int32 CountFileTypes() = 0;
50 
56  virtual SysOSType GetFileType(int32 n) = 0;
57 
63  virtual PMFlavor GetInternalFlavor() = 0;
64 
70  virtual int32 CountExternalFlavors() = 0;
71 
78  virtual ExternalPMFlavor GetExternalFlavor(int32 n) = 0;
79 
85  virtual int32 CountFormats() = 0;
86 
93  virtual PMString GetFormatName(int32 formatIndex) = 0;
94 
104  virtual int32 CountExtensionsForFormat(int32 formatIndex) = 0;
105 
113  virtual PMString GetExtensionForFormat(int32 formatIndex, int32 extensionIndex) = 0;
114 
116  typedef enum { kCannotImport, kPartialImport, kFullImport } ImportAbility;
117 
129  virtual ImportAbility CanImportThisType(IFormatType *formatType) = 0;
130 
142  virtual ImportAbility CanImportThisStream(IPMStream *stream) = 0;
143 
164  virtual void ImportThis(IDataBase *db, IPMStream *stream, UIFlags uiFlags, UIDRef * importedItem, UIDRef * dataLink = nil, PMString * asFormat = nil) = 0;
165 };
166 
167 #endif //__IImportProvider__