| 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 CORE_INCLUDE_FXCRT_FX_STREAM_H_ | 7 #ifndef CORE_INCLUDE_FXCRT_FX_STREAM_H_ |
| 8 #define CORE_INCLUDE_FXCRT_FX_STREAM_H_ | 8 #define CORE_INCLUDE_FXCRT_FX_STREAM_H_ |
| 9 | 9 |
| 10 #include "fx_string.h" | 10 #include "fx_string.h" |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 #ifdef PDF_ENABLE_XFA | 130 #ifdef PDF_ENABLE_XFA |
| 131 class IFX_FileAccess { | 131 class IFX_FileAccess { |
| 132 public: | 132 public: |
| 133 virtual ~IFX_FileAccess() {} | 133 virtual ~IFX_FileAccess() {} |
| 134 virtual void Release() = 0; | 134 virtual void Release() = 0; |
| 135 virtual IFX_FileAccess* Retain() = 0; | 135 virtual IFX_FileAccess* Retain() = 0; |
| 136 virtual void GetPath(CFX_WideString& wsPath) = 0; | 136 virtual void GetPath(CFX_WideString& wsPath) = 0; |
| 137 virtual IFX_FileStream* CreateFileStream(FX_DWORD dwModes) = 0; | 137 virtual IFX_FileStream* CreateFileStream(FX_DWORD dwModes) = 0; |
| 138 }; | 138 }; |
| 139 IFX_FileAccess* FX_CreateDefaultFileAccess(const CFX_WideStringC& wsPath); | 139 IFX_FileAccess* FX_CreateDefaultFileAccess(const CFX_WideStringC& wsPath); |
| 140 #endif // PDF_ENABLE_XFA |
| 140 | 141 |
| 141 #endif | |
| 142 class IFX_MemoryStream : public IFX_FileStream { | 142 class IFX_MemoryStream : public IFX_FileStream { |
| 143 public: | 143 public: |
| 144 virtual FX_BOOL IsConsecutive() const = 0; | 144 virtual FX_BOOL IsConsecutive() const = 0; |
| 145 | 145 |
| 146 virtual void EstimateSize(size_t nInitSize, size_t nGrowSize) = 0; | 146 virtual void EstimateSize(size_t nInitSize, size_t nGrowSize) = 0; |
| 147 | 147 |
| 148 virtual uint8_t* GetBuffer() const = 0; | 148 virtual uint8_t* GetBuffer() const = 0; |
| 149 | 149 |
| 150 virtual void AttachBuffer(uint8_t* pBuffer, | 150 virtual void AttachBuffer(uint8_t* pBuffer, |
| 151 size_t nSize, | 151 size_t nSize, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 165 FX_FILESIZE GetPosition() override = 0; | 165 FX_FILESIZE GetPosition() override = 0; |
| 166 size_t ReadBlock(void* buffer, size_t size) override = 0; | 166 size_t ReadBlock(void* buffer, size_t size) override = 0; |
| 167 | 167 |
| 168 virtual FX_BOOL ReadNextBlock(FX_BOOL bRestart = FALSE) = 0; | 168 virtual FX_BOOL ReadNextBlock(FX_BOOL bRestart = FALSE) = 0; |
| 169 virtual const uint8_t* GetBlockBuffer() = 0; | 169 virtual const uint8_t* GetBlockBuffer() = 0; |
| 170 virtual size_t GetBlockSize() = 0; | 170 virtual size_t GetBlockSize() = 0; |
| 171 virtual FX_FILESIZE GetBlockOffset() = 0; | 171 virtual FX_FILESIZE GetBlockOffset() = 0; |
| 172 }; | 172 }; |
| 173 | 173 |
| 174 #endif // CORE_INCLUDE_FXCRT_FX_STREAM_H_ | 174 #endif // CORE_INCLUDE_FXCRT_FX_STREAM_H_ |
| OLD | NEW |