Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Side by Side Diff: core/fxcrt/include/fx_stream.h

Issue 1930533002: More IFX_ interface cleanup. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « BUILD.gn ('k') | xfa.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | xfa.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698