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
invalid_seekable_read_stream.h
Go to the documentation of this file.
1// Copyright 2019 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#ifndef TESTING_INVALID_SEEKABLE_READ_STREAM_H_
6#define TESTING_INVALID_SEEKABLE_READ_STREAM_H_
7
8#include "core/fxcrt/fx_stream.h"
9#include "core/fxcrt/retain_ptr.h"
10
11// A stream used for testing where reads always fail.
12class InvalidSeekableReadStream final : public IFX_SeekableReadStream {
13 public:
15
16 // IFX_SeekableReadStream overrides:
17 bool ReadBlockAtOffset(pdfium::span<uint8_t> buffer,
18 FX_FILESIZE offset) override;
19 FX_FILESIZE GetSize() override;
20
21 private:
22 explicit InvalidSeekableReadStream(FX_FILESIZE data_size);
24
25 const FX_FILESIZE data_size_;
26};
27
28#endif // TESTING_INVALID_SEEKABLE_READ_STREAM_H_
CPDF_DataAvail::DocAvailStatus CheckAvail()
bool IsArray() const
virtual CPDF_Array * AsMutableArray()
bool ReadBlockAtOffset(pdfium::span< uint8_t > buffer, FX_FILESIZE offset) override
bool ReadBlockAtOffset(pdfium::span< uint8_t > buffer, FX_FILESIZE offset) override
~InvalidSeekableReadStream() override
TEST(FXCRYPT, MD5GenerateEmtpyData)
#define FX_FILESIZE
Definition fx_types.h:19
#define CONSTRUCT_VIA_MAKE_RETAIN
Definition retain_ptr.h:224