OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef FPDFSDK_FSDK_DEFINE_H_ | 7 #ifndef FPDFSDK_FSDK_DEFINE_H_ |
8 #define FPDFSDK_FSDK_DEFINE_H_ | 8 #define FPDFSDK_FSDK_DEFINE_H_ |
9 | 9 |
10 #include "core/fpdfapi/parser/cpdf_parser.h" | 10 #include "core/fpdfapi/parser/cpdf_parser.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 class CPDF_CustomAccess final : public IFX_FileRead { | 28 class CPDF_CustomAccess final : public IFX_FileRead { |
29 public: | 29 public: |
30 explicit CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess); | 30 explicit CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess); |
31 ~CPDF_CustomAccess() override {} | 31 ~CPDF_CustomAccess() override {} |
32 | 32 |
33 // IFX_FileRead | 33 // IFX_FileRead |
34 FX_FILESIZE GetSize() override; | 34 FX_FILESIZE GetSize() override; |
35 void Release() override; | 35 void Release() override; |
36 FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override; | 36 FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override; |
37 | 37 |
38 #ifdef PDF_ENABLE_XFA | |
39 virtual CFX_ByteString GetFullPath(); | |
40 virtual FX_BOOL GetByte(uint32_t pos, uint8_t& ch); | |
41 virtual FX_BOOL GetBlock(uint32_t pos, uint8_t* pBuf, uint32_t size); | |
42 #endif // PDF_ENABLE_XFA | |
43 | |
44 private: | 38 private: |
45 FPDF_FILEACCESS m_FileAccess; | 39 FPDF_FILEACCESS m_FileAccess; |
46 #ifdef PDF_ENABLE_XFA | |
47 uint8_t m_Buffer[512]; | |
48 uint32_t m_BufferOffset; | |
49 #endif // PDF_ENABLE_XFA | |
50 }; | 40 }; |
51 | 41 |
52 #ifdef PDF_ENABLE_XFA | 42 #ifdef PDF_ENABLE_XFA |
53 class CFPDF_FileStream : public IFX_FileStream { | 43 class CFPDF_FileStream : public IFX_FileStream { |
54 public: | 44 public: |
55 explicit CFPDF_FileStream(FPDF_FILEHANDLER* pFS); | 45 explicit CFPDF_FileStream(FPDF_FILEHANDLER* pFS); |
56 ~CFPDF_FileStream() override {} | 46 ~CFPDF_FileStream() override {} |
57 | 47 |
58 // IFX_FileStream: | 48 // IFX_FileStream: |
59 IFX_FileStream* Retain() override; | 49 IFX_FileStream* Retain() override; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 int rotate, | 102 int rotate, |
113 int flags, | 103 int flags, |
114 FX_BOOL bNeedToRestore, | 104 FX_BOOL bNeedToRestore, |
115 IFSDK_PAUSE_Adapter* pause); | 105 IFSDK_PAUSE_Adapter* pause); |
116 | 106 |
117 void CheckUnSupportError(CPDF_Document* pDoc, uint32_t err_code); | 107 void CheckUnSupportError(CPDF_Document* pDoc, uint32_t err_code); |
118 void CheckUnSupportAnnot(CPDF_Document* pDoc, const CPDF_Annot* pPDFAnnot); | 108 void CheckUnSupportAnnot(CPDF_Document* pDoc, const CPDF_Annot* pPDFAnnot); |
119 void ProcessParseError(CPDF_Parser::Error err); | 109 void ProcessParseError(CPDF_Parser::Error err); |
120 | 110 |
121 #endif // FPDFSDK_FSDK_DEFINE_H_ | 111 #endif // FPDFSDK_FSDK_DEFINE_H_ |
OLD | NEW |