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_INCLUDE_FX_STREAM_H_ | 7 #ifndef CORE_FXCRT_INCLUDE_FX_STREAM_H_ |
8 #define CORE_FXCRT_INCLUDE_FX_STREAM_H_ | 8 #define CORE_FXCRT_INCLUDE_FX_STREAM_H_ |
9 | 9 |
10 #include "core/fxcrt/include/fx_string.h" | 10 #include "core/fxcrt/include/fx_string.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 class IFX_StreamRead { | 72 class IFX_StreamRead { |
73 public: | 73 public: |
74 virtual ~IFX_StreamRead() {} | 74 virtual ~IFX_StreamRead() {} |
75 | 75 |
76 virtual void Release() = 0; | 76 virtual void Release() = 0; |
77 virtual FX_BOOL IsEOF() = 0; | 77 virtual FX_BOOL IsEOF() = 0; |
78 virtual FX_FILESIZE GetPosition() = 0; | 78 virtual FX_FILESIZE GetPosition() = 0; |
79 virtual size_t ReadBlock(void* buffer, size_t size) = 0; | 79 virtual size_t ReadBlock(void* buffer, size_t size) = 0; |
80 }; | 80 }; |
81 | 81 |
82 class IFX_FileRead : IFX_StreamRead { | 82 class IFX_FileRead : public IFX_StreamRead { |
83 public: | 83 public: |
84 // IFX_StreamRead: | 84 // IFX_StreamRead: |
85 void Release() override = 0; | 85 void Release() override = 0; |
86 FX_BOOL IsEOF() override; | 86 FX_BOOL IsEOF() override; |
87 FX_FILESIZE GetPosition() override; | 87 FX_FILESIZE GetPosition() override; |
88 size_t ReadBlock(void* buffer, size_t size) override; | 88 size_t ReadBlock(void* buffer, size_t size) override; |
89 | 89 |
90 virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) = 0; | 90 virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) = 0; |
91 virtual FX_FILESIZE GetSize() = 0; | 91 virtual FX_FILESIZE GetSize() = 0; |
92 }; | 92 }; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 FX_FILESIZE GetPosition() override = 0; | 153 FX_FILESIZE GetPosition() override = 0; |
154 size_t ReadBlock(void* buffer, size_t size) override = 0; | 154 size_t ReadBlock(void* buffer, size_t size) override = 0; |
155 | 155 |
156 virtual FX_BOOL ReadNextBlock(FX_BOOL bRestart = FALSE) = 0; | 156 virtual FX_BOOL ReadNextBlock(FX_BOOL bRestart = FALSE) = 0; |
157 virtual const uint8_t* GetBlockBuffer() = 0; | 157 virtual const uint8_t* GetBlockBuffer() = 0; |
158 virtual size_t GetBlockSize() = 0; | 158 virtual size_t GetBlockSize() = 0; |
159 virtual FX_FILESIZE GetBlockOffset() = 0; | 159 virtual FX_FILESIZE GetBlockOffset() = 0; |
160 }; | 160 }; |
161 | 161 |
162 #endif // CORE_FXCRT_INCLUDE_FX_STREAM_H_ | 162 #endif // CORE_FXCRT_INCLUDE_FX_STREAM_H_ |
OLD | NEW |