Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cpdf_seekablemultistream.h
Go to the documentation of this file.
1// Copyright 2017 The PDFium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7#ifndef CORE_FPDFAPI_PARSER_CPDF_SEEKABLEMULTISTREAM_H_
8#define CORE_FPDFAPI_PARSER_CPDF_SEEKABLEMULTISTREAM_H_
9
10#include <vector>
11
12#include "core/fxcrt/fx_stream.h"
13#include "core/fxcrt/retain_ptr.h"
14
15class CPDF_Stream;
16class CPDF_StreamAcc;
17
18class CPDF_SeekableMultiStream final : public IFX_SeekableStream {
19 public:
21 std::vector<RetainPtr<const CPDF_Stream>> streams);
23
24 // IFX_SeekableReadStream:
25 FX_FILESIZE GetPosition() override;
26 FX_FILESIZE GetSize() override;
27 bool IsEOF() override;
28 size_t ReadBlock(pdfium::span<uint8_t> buffer) override;
29 bool ReadBlockAtOffset(pdfium::span<uint8_t> buffer,
30 FX_FILESIZE offset) override;
31 bool WriteBlockAtOffset(pdfium::span<const uint8_t> buffer,
32 FX_FILESIZE offset) override;
33 bool Flush() override;
34
35 private:
36 std::vector<RetainPtr<CPDF_StreamAcc>> m_Data;
37};
38
39#endif // CORE_FPDFAPI_PARSER_CPDF_SEEKABLEMULTISTREAM_H_
bool ReadBlockAtOffset(pdfium::span< uint8_t > buffer, FX_FILESIZE offset) override
bool WriteBlockAtOffset(pdfium::span< const uint8_t > buffer, FX_FILESIZE offset) override
CPDF_SeekableMultiStream(std::vector< RetainPtr< const CPDF_Stream > > streams)
~CPDF_SeekableMultiStream() override
size_t ReadBlock(pdfium::span< uint8_t > buffer) override
#define FX_FILESIZE
Definition fx_types.h:19