InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CExportProvider.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Michael Burbidge
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 __CExportProvider_h__
25 #define __CExportProvider_h__
26 
27 #include "IExportProvider.h"
28 #include "IDocument.h"
29 #include "URI.h"
30 #include "IOutputPages.h"
31 #include <map>
32 
33 struct UserTaskJobSpec;
34 typedef void* ExportSessionToken;
35 #ifdef
36 #endif
37 
42 class CExportProvider : public CPMUnknown<IExportProvider>
43 {
44 public:
46  virtual ~CExportProvider();
47 
49 
50 
52  virtual void ExportToFile(const IDFile& sysFile, IDocument* doc, IPMUnknown* targetboss, const PMString& formatName, UIFlags uiFlags);
53 
55  virtual bool16 CanExportToFile() const;
56 
58  virtual TaskInfo AsynchronousExportToFile(const IDFile& sysFile, IDocument* doc, IPMUnknown* targetboss, const PMString& formatName, UIFlags uiFlags = kFullUI);
59 
61  virtual bool16 CanExportToFileAsynchronously() const;
62 
64 
66 
67 
68  // Stub this out since only a few ExportProviders actually support this type of export
69 
71  virtual bool16 CanExportForExternalize() const;
72 
74  virtual PMFlavor GetInternalFlavor() const;
75 
77  virtual int32 CountExternalFlavors() const;
78  virtual ExternalPMFlavor GetExternalFlavor(int32 n) const;
79 
81  virtual bool16 CanExportThisFlavor(const ExternalPMFlavor& flavor, PMString& outFormatName) const;
82 
84  virtual ErrorCode ExportForExternalize(IDataExchangeHandler *handler, const ExternalPMFlavor toWhichFlavor, IPMStream* stream);
85 
87 
88 protected:
89 
98  virtual ErrorCode SendSignal( const ServiceID& service, IDocument* document, const IDFile& sysFile, const PMString& formatName, UIFlags uiFlags, bool8 bIsStandAlone = kTrue ) ;
99 
105  virtual bool16 IsTargetFileInUseByBGTasks(const IDFile& sysFile) const ;
106 
114  virtual UserTaskJobSpec CreateExportJobSpec(const IDFile& sysFile, IDocument* document, const PMString& formatName ) const ;
115 
126  virtual void GetUniqueSysFile(IDocument* document, const IDFile* sysFileName, IDFile* uniqueSysFileName, uint32 pageNum, IOutputPages* outputPages, bool16 exportSpreads, PMString& suffix, PMString& exportFileExtension);
127 
128 protected:
129  ExportSessionToken fSessionToken;
130  std::map<std::string, int32> fFileNameMap;
131 };
132 
133 
134 #endif // __CExportProvider_h__