|
00001 //--------------------------------------------------------------------------------------- 00002 // Copyright (c) 2001-2008 by PDFTron Systems Inc. All Rights Reserved. 00003 // Consult legal.txt regarding legal and license information. 00004 //--------------------------------------------------------------------------------------- 00005 00006 #ifndef H_CPPPDFFileSpec 00007 #define H_CPPPDFFileSpec 00008 00009 #include <C/PDF/TRN_FileSpec.h> 00010 #include <SDF/SDFDoc.h> 00011 00012 00013 namespace pdftron { 00014 namespace PDF { 00015 00038 class FileSpec 00039 { 00040 public: 00041 00056 static FileSpec Create(SDF::SDFDoc& doc, const char* path, bool embed = true); 00057 00069 static FileSpec CreateURL(SDF::SDFDoc& doc, const char* url); 00070 00076 FileSpec(SDF::Obj f); 00077 00081 FileSpec (const FileSpec& d); 00082 00086 FileSpec& operator=(const FileSpec& d); 00087 00092 bool operator==(const FileSpec& d); 00093 00099 bool IsValid() const; 00100 00115 bool Export(const UString& save_as = "") const; 00116 00126 Filters::Filter GetFileData() const; 00127 00137 UString GetFilePath() const; 00138 00142 SDF::Obj GetSDFObj () const; 00143 00144 00146 FileSpec(TRN_FileSpec fs); 00147 TRN_FileSpec mp_impl; 00149 }; 00150 00151 00152 #include <Impl/FileSpec.inl> 00153 00154 }; // namespace PDF 00155 }; // namespace pdftron 00156 00157 #endif 00158