InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IPDFLibraryUtilsPublic.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Greg St. Pierre
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 // A collection of PDF-specific utilities
24 //
25 //========================================================================================
26 
27 
28 #ifndef IPDFLibraryUtils_Public__
29 #define IPDFLibraryUtils_Public__
30 
31 #include "PDFID.h"
32 #include "Utils.h"
33 
34 // These are opaque types
35 typedef struct _t_PDDoc *PDDoc;
36 typedef struct _t_PDPage *PDPage;
37 
43 {
44 public:
45  enum { kDefaultIID = IID_IPDFLIBRARYUTILSPUBLIC };
46 
53  virtual bool16 IsPDFExportPort(IPMUnknown const *port) const = 0;
54 
66  virtual void AcquirePDFLibrary() const = 0;
67 
73  virtual void ReleasePDFLibrary() const = 0;
74 
80  virtual bool16 IsLibraryAvailable() const = 0;
81 
92  virtual bool GetPDDocForPDFExportPort(IPMUnknown *port, PDDoc &document) const = 0;
93 
104  virtual bool GetPDPageForPDFExportPort(IPMUnknown *port, PDPage &page) const = 0;
105 };
106 
124 {
125 public:
127  {
128  Utils<IPDFLibraryUtilsPublic>()->AcquirePDFLibrary();
129  }
130 
132  {
133  Utils<IPDFLibraryUtilsPublic>()->ReleasePDFLibrary();
134  }
135 
136  bool16 IsAvailable() const
137  {
138  return Utils<IPDFLibraryUtilsPublic>()->IsLibraryAvailable();
139  }
140 };
141 
142 #endif