1/*
2 * Copyright (C) 2009-2011, Pino Toscano <pino@kde.org>
3 * Copyright (C) 2018, 2020, 2022, Albert Astals Cid <aacid@kde.org>
4 * Copyright (C) 2018, 2020, Adam Reichold <adam.reichold@t-online.de>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
19 */
20
21#ifndef POPPLER_DOCUMENT_PRIVATE_H
22#define POPPLER_DOCUMENT_PRIVATE_H
23
24#include "poppler-global.h"
25
26#include "poppler-config.h"
27#include "GooString.h"
28#include "PDFDoc.h"
29#include "GlobalParams.h"
30
31#include <vector>
32
33namespace poppler {
34
35class document;
36class embedded_file;
37
38class document_private : private GlobalParamsIniter
39{
40public:
41 document_private(std::unique_ptr<GooString> &&file_path, const std::string &owner_password, const std::string &user_password);
42 document_private(byte_array *file_data, const std::string &owner_password, const std::string &user_password);
43 document_private(const char *file_data, int file_data_length, const std::string &owner_password, const std::string &user_password);
44 ~document_private();
45
46 static document *check_document(document_private *doc, byte_array *file_data);
47
48 PDFDoc *doc;
49 byte_array doc_data;
50 const char *raw_doc_data;
51 int raw_doc_data_length;
52 bool is_locked;
53 std::vector<embedded_file *> embedded_files;
54
55private:
56 document_private();
57};
58
59}
60
61#endif
62

source code of poppler/cpp/poppler-document-private.h