Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-10 10:23:49

0001 //========================================================================
0002 //
0003 // PDFDocBuilder.h
0004 //
0005 // This file is licensed under the GPLv2 or later
0006 //
0007 // Copyright 2010 Hib Eris <hib@hiberis.nl>
0008 // Copyright 2010, 2018, 2020, 2022 Albert Astals Cid <aacid@kde.org>
0009 // Copyright 2021 Oliver Sander <oliver.sander@tu-dresden.de>
0010 //
0011 //========================================================================
0012 
0013 #ifndef PDFDOCBUILDER_H
0014 #define PDFDOCBUILDER_H
0015 
0016 #include <memory>
0017 
0018 #include "PDFDoc.h"
0019 class GooString;
0020 
0021 //------------------------------------------------------------------------
0022 // PDFDocBuilder
0023 //
0024 // PDFDocBuilder is an abstract class that specifies the interface for
0025 // constructing PDFDocs.
0026 //------------------------------------------------------------------------
0027 
0028 class PDFDocBuilder
0029 {
0030 
0031 public:
0032     PDFDocBuilder() = default;
0033     virtual ~PDFDocBuilder();
0034 
0035     PDFDocBuilder(const PDFDocBuilder &) = delete;
0036     PDFDocBuilder &operator=(const PDFDocBuilder &) = delete;
0037 
0038     // Builds a new PDFDoc. Returns a PDFDoc. You should check this PDFDoc
0039     // with PDFDoc::isOk() for failures.
0040     // The caller is responsible for deleting ownerPassword, userPassWord and guiData.
0041     virtual std::unique_ptr<PDFDoc> buildPDFDoc(const GooString &uri, const std::optional<GooString> &ownerPassword = {}, const std::optional<GooString> &userPassword = {}, void *guiDataA = nullptr) = 0;
0042 
0043     // Returns true if the builder supports building a PDFDoc from the URI.
0044     virtual bool supports(const GooString &uri) = 0;
0045 };
0046 
0047 #endif /* PDFDOCBUILDER_H */