| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 71 |
| 72 virtual FX_BOOL Flush() = 0; | 72 virtual FX_BOOL Flush() = 0; |
| 73 | 73 |
| 74 virtual FX_BOOL WriteBlock(const void* pData, | 74 virtual FX_BOOL WriteBlock(const void* pData, |
| 75 FX_FILESIZE offset, | 75 FX_FILESIZE offset, |
| 76 size_t size) = 0; | 76 size_t size) = 0; |
| 77 virtual FX_BOOL WriteBlock(const void* pData, size_t size) { | 77 virtual FX_BOOL WriteBlock(const void* pData, size_t size) { |
| 78 return WriteBlock(pData, GetSize(), size); | 78 return WriteBlock(pData, GetSize(), size); |
| 79 } | 79 } |
| 80 }; | 80 }; |
| 81 IFX_FileWrite* FX_CreateFileWrite(const FX_CHAR* filename); | |
| 82 IFX_FileWrite* FX_CreateFileWrite(const FX_WCHAR* filename); | |
| 83 class IFX_StreamRead { | 81 class IFX_StreamRead { |
| 84 public: | 82 public: |
| 85 virtual ~IFX_StreamRead() {} | 83 virtual ~IFX_StreamRead() {} |
| 86 | 84 |
| 87 virtual void Release() = 0; | 85 virtual void Release() = 0; |
| 88 | 86 |
| 89 virtual FX_BOOL IsEOF() = 0; | 87 virtual FX_BOOL IsEOF() = 0; |
| 90 | 88 |
| 91 virtual FX_FILESIZE GetPosition() = 0; | 89 virtual FX_FILESIZE GetPosition() = 0; |
| 92 | 90 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 virtual FX_BOOL ReadNextBlock(FX_BOOL bRestart = FALSE) = 0; | 170 virtual FX_BOOL ReadNextBlock(FX_BOOL bRestart = FALSE) = 0; |
| 173 | 171 |
| 174 virtual const uint8_t* GetBlockBuffer() = 0; | 172 virtual const uint8_t* GetBlockBuffer() = 0; |
| 175 | 173 |
| 176 virtual size_t GetBlockSize() = 0; | 174 virtual size_t GetBlockSize() = 0; |
| 177 | 175 |
| 178 virtual FX_FILESIZE GetBlockOffset() = 0; | 176 virtual FX_FILESIZE GetBlockOffset() = 0; |
| 179 }; | 177 }; |
| 180 | 178 |
| 181 #endif // CORE_INCLUDE_FXCRT_FX_STREAM_H_ | 179 #endif // CORE_INCLUDE_FXCRT_FX_STREAM_H_ |
| OLD | NEW |