| 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_INCLUDE_FSDK_DEFINE_H_ | 7 #ifndef FPDFSDK_INCLUDE_FSDK_DEFINE_H_ |
| 8 #define FPDFSDK_INCLUDE_FSDK_DEFINE_H_ | 8 #define FPDFSDK_INCLUDE_FSDK_DEFINE_H_ |
| 9 | 9 |
| 10 #ifdef _WIN32 | 10 #ifdef _WIN32 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 | 77 |
| 78 class CPDF_CustomAccess final : public IFX_FileRead | 78 class CPDF_CustomAccess final : public IFX_FileRead |
| 79 { | 79 { |
| 80 public: | 80 public: |
| 81 CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess); | 81 CPDF_CustomAccess(FPDF_FILEACCESS* pFileAccess); |
| 82 ~CPDF_CustomAccess() {} | 82 ~CPDF_CustomAccess() {} |
| 83 | 83 |
| 84 | 84 |
| 85 virtual CFX_ByteString GetFullPath() { return ""; } | 85 virtual CFX_ByteString GetFullPath() { return ""; } |
| 86 virtual FX_FILESIZE GetSize() override { return m_FileAccess.m_FileL
en; } | 86 virtual FX_FILESIZE GetSize() override { return m_FileAccess.m_FileL
en; } |
| 87 » virtual FX_BOOL»» GetByte(FX_DWORD pos, FX_BYTE& ch); | 87 » virtual FX_BOOL»» GetByte(FX_DWORD pos, uint8_t& ch); |
| 88 virtual FX_BOOL GetBlock(FX_DWORD pos, FX_LPBYTE pBuf, FX_DWORD
size); | 88 virtual FX_BOOL GetBlock(FX_DWORD pos, FX_LPBYTE pBuf, FX_DWORD
size); |
| 89 virtual void Release() override { delete this; } | 89 virtual void Release() override { delete this; } |
| 90 virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size
_t size) override; | 90 virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size
_t size) override; |
| 91 | 91 |
| 92 FPDF_FILEACCESS m_FileAccess; | 92 FPDF_FILEACCESS m_FileAccess; |
| 93 » FX_BYTE»» » » m_Buffer[512]; | 93 » uint8_t»» » » m_Buffer[512]; |
| 94 FX_DWORD m_BufferOffset; | 94 FX_DWORD m_BufferOffset; |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 class CFPDF_FileStream : public IFX_FileStream | 97 class CFPDF_FileStream : public IFX_FileStream |
| 98 { | 98 { |
| 99 public: | 99 public: |
| 100 CFPDF_FileStream(FPDF_FILEHANDLER* pFS); | 100 CFPDF_FileStream(FPDF_FILEHANDLER* pFS); |
| 101 virtual ~CFPDF_FileStream() {} | 101 virtual ~CFPDF_FileStream() {} |
| 102 | 102 |
| 103 virtual IFX_FileStream* Retain(); | 103 virtual IFX_FileStream* Retain(); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 115 protected: | 115 protected: |
| 116 FPDF_FILEHANDLER* m_pFS; | 116 FPDF_FILEHANDLER* m_pFS; |
| 117 FX_FILESIZE m_nCurPos; | 117 FX_FILESIZE m_nCurPos; |
| 118 }; | 118 }; |
| 119 | 119 |
| 120 void FSDK_SetSandBoxPolicy(FPDF_DWORD policy, FPDF_BOOL enable); | 120 void FSDK_SetSandBoxPolicy(FPDF_DWORD policy, FPDF_BOOL enable); |
| 121 FPDF_BOOL FSDK_IsSandBoxPolicyEnabled(FPDF_DWORD policy); | 121 FPDF_BOOL FSDK_IsSandBoxPolicyEnabled(FPDF_DWORD policy); |
| 122 | 122 |
| 123 | 123 |
| 124 #endif // FPDFSDK_INCLUDE_FSDK_DEFINE_H_ | 124 #endif // FPDFSDK_INCLUDE_FSDK_DEFINE_H_ |
| OLD | NEW |