| 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_FXCRT_FX_STREAM_H_ | 7 #ifndef CORE_FXCRT_FX_STREAM_H_ |
| 8 #define CORE_FXCRT_FX_STREAM_H_ | 8 #define CORE_FXCRT_FX_STREAM_H_ |
| 9 | 9 |
| 10 #include "core/fxcrt/fx_string.h" | 10 #include "core/fxcrt/fx_string.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 class IFX_SeekableReadStream : public IFX_ReadStream { | 86 class IFX_SeekableReadStream : public IFX_ReadStream { |
| 87 public: | 87 public: |
| 88 // IFX_ReadStream: | 88 // IFX_ReadStream: |
| 89 void Release() override = 0; | 89 void Release() override = 0; |
| 90 bool IsEOF() override; | 90 bool IsEOF() override; |
| 91 FX_FILESIZE GetPosition() override; | 91 FX_FILESIZE GetPosition() override; |
| 92 size_t ReadBlock(void* buffer, size_t size) override; | 92 size_t ReadBlock(void* buffer, size_t size) override; |
| 93 | 93 |
| 94 virtual bool ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) = 0; | 94 virtual size_t ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) = 0; |
| 95 virtual FX_FILESIZE GetSize() = 0; | 95 virtual FX_FILESIZE GetSize() = 0; |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 IFX_SeekableReadStream* FX_CreateFileRead(const FX_CHAR* filename); | 98 IFX_SeekableReadStream* FX_CreateFileRead(const FX_CHAR* filename); |
| 99 IFX_SeekableReadStream* FX_CreateFileRead(const FX_WCHAR* filename); | 99 IFX_SeekableReadStream* FX_CreateFileRead(const FX_WCHAR* filename); |
| 100 | 100 |
| 101 class IFX_SeekableStream : public IFX_SeekableReadStream, | 101 class IFX_SeekableStream : public IFX_SeekableReadStream, |
| 102 public IFX_SeekableWriteStream { | 102 public IFX_SeekableWriteStream { |
| 103 public: | 103 public: |
| 104 virtual IFX_SeekableStream* Retain() = 0; | 104 virtual IFX_SeekableStream* Retain() = 0; |
| 105 | 105 |
| 106 // IFX_SeekableReadStream: | 106 // IFX_SeekableReadStream: |
| 107 void Release() override = 0; | 107 void Release() override = 0; |
| 108 bool IsEOF() override = 0; | 108 bool IsEOF() override = 0; |
| 109 FX_FILESIZE GetPosition() override = 0; | 109 FX_FILESIZE GetPosition() override = 0; |
| 110 size_t ReadBlock(void* buffer, size_t size) override = 0; | 110 size_t ReadBlock(void* buffer, size_t size) override = 0; |
| 111 bool ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override = 0; | 111 size_t ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override = 0; |
| 112 FX_FILESIZE GetSize() override = 0; | 112 FX_FILESIZE GetSize() override = 0; |
| 113 | 113 |
| 114 // IFX_SeekableWriteStream: | 114 // IFX_SeekableWriteStream: |
| 115 bool WriteBlock(const void* buffer, | 115 bool WriteBlock(const void* buffer, |
| 116 FX_FILESIZE offset, | 116 FX_FILESIZE offset, |
| 117 size_t size) override = 0; | 117 size_t size) override = 0; |
| 118 bool WriteBlock(const void* buffer, size_t size) override; | 118 bool WriteBlock(const void* buffer, size_t size) override; |
| 119 bool Flush() override = 0; | 119 bool Flush() override = 0; |
| 120 }; | 120 }; |
| 121 | 121 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 }; | 181 }; |
| 182 | 182 |
| 183 class CFindFileDataW : public CFindFileData { | 183 class CFindFileDataW : public CFindFileData { |
| 184 public: | 184 public: |
| 185 ~CFindFileDataW() override {} | 185 ~CFindFileDataW() override {} |
| 186 WIN32_FIND_DATAW m_FindData; | 186 WIN32_FIND_DATAW m_FindData; |
| 187 }; | 187 }; |
| 188 #endif | 188 #endif |
| 189 | 189 |
| 190 #endif // CORE_FXCRT_FX_STREAM_H_ | 190 #endif // CORE_FXCRT_FX_STREAM_H_ |
| OLD | NEW |