1 | /* poppler-qiodevicestream-private.h: Qt6 interface to poppler |
2 | * Copyright (C) 2008, Pino Toscano <pino@kde.org> |
3 | * Copyright (C) 2013 Adrian Johnson <ajohnson@redneon.com> |
4 | * Copyright (C) 2021 Albert Astals Cid <aacid@kde.org> |
5 | * Copyright (C) 2021, Even Rouault <even.rouault@spatialys.com> |
6 | * |
7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by |
9 | * the Free Software Foundation; either version 2, or (at your option) |
10 | * any later version. |
11 | * |
12 | * This program is distributed in the hope that it will be useful, |
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | * GNU General Public License for more details. |
16 | * |
17 | * You should have received a copy of the GNU General Public License |
18 | * along with this program; if not, write to the Free Software |
19 | * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. |
20 | */ |
21 | |
22 | #ifndef POPPLER_QIODEVICESTREAM_PRIVATE_H |
23 | #define POPPLER_QIODEVICESTREAM_PRIVATE_H |
24 | |
25 | #include "Object.h" |
26 | #include "Stream.h" |
27 | |
28 | class QIODevice; |
29 | |
30 | namespace Poppler { |
31 | |
32 | class QIODeviceOutStream : public OutStream |
33 | { |
34 | public: |
35 | explicit QIODeviceOutStream(QIODevice *device); |
36 | ~QIODeviceOutStream() override; |
37 | |
38 | void close() override; |
39 | Goffset getPos() override; |
40 | void put(char c) override; |
41 | void printf(const char *format, ...) override GCC_PRINTF_FORMAT(2, 3); |
42 | |
43 | private: |
44 | QIODevice *m_device; |
45 | }; |
46 | |
47 | } |
48 | |
49 | #endif |
50 | |