Debian Codegraph @

qt6/src/poppler-qiodeviceinstream-private.h

raw
1 /* poppler-qiodeviceinstream-private.h: Qt6 interface to poppler
2 * Copyright (C) 2019 Alexander Volkov <[email protected]>
3 * Copyright (C) 2025 g10 Code GmbH, Author: Sune Stolborg Vuorela <[email protected]>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
8 * any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19
20 #ifndef POPPLER_QIODEVICEINSTREAM_PRIVATE_H
21 #define POPPLER_QIODEVICEINSTREAM_PRIVATE_H
22
23 #include "Object.h"
24 #include "Stream.h"
25
26 class QIODevice;
27
28 namespace Poppler {
29
30 class QIODeviceInStream : public BaseSeekInputStream
31 {
32 public:
33 QIODeviceInStream(QIODevice *device, Goffset startA, bool limitedA, Goffset lengthA, Object &&dictA);
34 ~QIODeviceInStream() override;
35
36 BaseStream *copy() override;
37 std::unique_ptr<Stream> makeSubStream(Goffset startA, bool limitedA, Goffset lengthA, Object &&dictA) override;
38
39 private:
40 Goffset currentPos() const override;
41 void setCurrentPos(Goffset offset) override;
42 Goffset read(char *buffer, Goffset count) override;
43
44 QIODevice *m_device;
45 };
46
47 }
48
49 #endif