Coverage Report

Created: 2026-09-06 07:18

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libabw/src/lib/ABWZlibStream.h
Line
Count
Source
1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/*
3
 * This file is part of the libabw project.
4
 *
5
 * This Source Code Form is subject to the terms of the Mozilla Public
6
 * License, v. 2.0. If a copy of the MPL was not distributed with this
7
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
 */
9
10
#ifndef __ABWZLIBSTREAM_H__
11
#define __ABWZLIBSTREAM_H__
12
13
#include <vector>
14
#include <librevenge-stream/librevenge-stream.h>
15
16
namespace libabw
17
{
18
19
class ABWZlibStream : public librevenge::RVNGInputStream
20
{
21
public:
22
  ABWZlibStream(librevenge::RVNGInputStream *input);
23
0
  ~ABWZlibStream() override {}
24
25
  bool isStructured() override
26
0
  {
27
0
    return false;
28
0
  }
29
  unsigned subStreamCount() override
30
0
  {
31
0
    return 0;
32
0
  }
33
  const char *subStreamName(unsigned) override
34
0
  {
35
0
    return nullptr;
36
0
  }
37
  bool existsSubStream(const char *) override
38
0
  {
39
0
    return false;
40
0
  }
41
  librevenge::RVNGInputStream *getSubStreamByName(const char *) override
42
0
  {
43
0
    return nullptr;
44
0
  }
45
  librevenge::RVNGInputStream *getSubStreamById(unsigned) override
46
0
  {
47
0
    return nullptr;
48
0
  }
49
  const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead) override;
50
  int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) override;
51
  long tell() override;
52
  bool isEnd() override;
53
  unsigned long getSize() const
54
0
  {
55
0
    return m_buffer.size();
56
0
  }
57
private:
58
  librevenge::RVNGInputStream *m_input;
59
  volatile long m_offset;
60
  std::vector<unsigned char> m_buffer;
61
  ABWZlibStream(const ABWZlibStream &);
62
  ABWZlibStream &operator=(const ABWZlibStream &);
63
};
64
65
} // namespace libabw
66
67
#endif // __ABWZLIBSTREAM_H__
68
/* vim:set shiftwidth=2 softtabstop=2 expandtab: */