![]() |
00001 //--------------------------------------------------------------------------------------- 00002 // Copyright (c) 2001-2010 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 00143 void SetDesc(const UString& desc); 00144 00148 SDF::Obj GetSDFObj () const; 00149 00150 00152 FileSpec(TRN_FileSpec fs); 00153 TRN_FileSpec mp_impl; 00155 }; 00156 00157 00158 #include <Impl/FileSpec.inl> 00159 00160 }; // namespace PDF 00161 }; // namespace pdftron 00162 00163 #endif 00164