1 //======================================================================== 2 // 3 // FileDescriptorPDFDocBuilder.h 4 // 5 // This file is licensed under the GPLv2 or later 6 // 7 // Copyright 2010 Hib Eris <hib@hiberis.nl> 8 // Copyright 2010, 2018 Albert Astals Cid <aacid@kde.org> 9 // Copyright 2021 Oliver Sander <oliver.sander@tu-dresden.de> 10 // Copyright 2021 Christian Persch <chpe@src.gnome.org> 11 // 12 //======================================================================== 13 14 #ifndef FDPDFDOCBUILDER_H 15 #define FDPDFDOCBUILDER_H 16 17 #include "PDFDocBuilder.h" 18 19 //------------------------------------------------------------------------ 20 // FileDescriptorPDFDocBuilder 21 // 22 // The FileDescriptorPDFDocBuilder implements a PDFDocBuilder that read from a file descriptor. 23 //------------------------------------------------------------------------ 24 25 class FileDescriptorPDFDocBuilder : public PDFDocBuilder 26 { 27 28 public: 29 std::unique_ptr<PDFDoc> buildPDFDoc(const GooString &uri, GooString *ownerPassword = nullptr, GooString *userPassword = nullptr, void *guiDataA = nullptr) override; 30 bool supports(const GooString &uri) override; 31 32 private: 33 int parseFdFromUri(const GooString &uri); 34 }; 35 36 #endif /* FDPDFDOCBUILDER_H */ 37