diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-04-18 11:55:27 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-04-18 19:33:58 +0000 |
commit | 4fcdf058734b5df696420aa653ea787842678224 (patch) | |
tree | 6f0c4bf5ed7917fecf6c6deeb741b31ae4de68e3 /xfa/fxfa/cxfa_fileread.h | |
parent | 1d52d1e5fb0b14782dd6b97eeee8c90106839452 (diff) | |
download | pdfium-4fcdf058734b5df696420aa653ea787842678224.tar.xz |
Subclass the stream implementations from CFGAS_Stream
Rename CFGAS_TextStream to CFGAS_Stream. CFGAS_Stream is converted
to a base class instead of accepting an IFGAS_StreamImp. Things
which inherted from IFGAS_StreamImp now inherit from CFGAS_Stream.
The stream type inputs are changed to IFX_SeekableStream so that
they can accept the same type (IFX_SeekableStream is an
IFX_SeekableWriteStream and an IFX_SeekableReadStream). This way
the storage can be shared in the base class.
Change-Id: I06645071e68e2a4d4120c0e336529f2c18c2b705
Reviewed-on: https://pdfium-review.googlesource.com/4152
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_fileread.h')
-rw-r--r-- | xfa/fxfa/cxfa_fileread.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xfa/fxfa/cxfa_fileread.h b/xfa/fxfa/cxfa_fileread.h index 0c3348b8d5..2dba4d23df 100644 --- a/xfa/fxfa/cxfa_fileread.h +++ b/xfa/fxfa/cxfa_fileread.h @@ -15,14 +15,19 @@ class CPDF_Stream; class CPDF_StreamAcc; -class CXFA_FileRead : public IFX_SeekableReadStream { +class CXFA_FileRead : public IFX_SeekableStream { public: explicit CXFA_FileRead(const std::vector<CPDF_Stream*>& streams); ~CXFA_FileRead() override; // IFX_SeekableReadStream + FX_FILESIZE GetPosition() override; FX_FILESIZE GetSize() override; bool ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override; + size_t ReadBlock(void* buffer, size_t size) override; + bool IsEOF() override; + bool Flush() override; + bool WriteBlock(const void* pData, FX_FILESIZE offset, size_t size) override; private: std::vector<CFX_RetainPtr<CPDF_StreamAcc>> m_Data; |