From 700dfa40d3d2c5b60bf5937f74c0ab59561115f8 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Wed, 26 Jan 2022 13:17:57 -0500 Subject: QPDFJob: convert encryption handlers --- include/qpdf/QPDFJob.hh | 20 ++++++++++++++++++++ include/qpdf/auto_job_c_enc.hh | 19 +++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 include/qpdf/auto_job_c_enc.hh (limited to 'include') diff --git a/include/qpdf/QPDFJob.hh b/include/qpdf/QPDFJob.hh index 9f4a1e70..cd83723c 100644 --- a/include/qpdf/QPDFJob.hh +++ b/include/qpdf/QPDFJob.hh @@ -217,6 +217,22 @@ class QPDFJob Config& config; }; + class EncConfig + { + friend class QPDFJob; + friend class Config; + public: + QPDF_DLL EncConfig& path(char const* parameter); + +# include + + private: + EncConfig(Config&); + EncConfig(PagesConfig const&) = delete; + + Config& config; + }; + // Configuration is performed by calling methods XXX QXXXQ document class Config { @@ -228,6 +244,10 @@ class QPDFJob std::shared_ptr pages(); std::shared_ptr overlay(); std::shared_ptr underlay(); + std::shared_ptr encrypt( + int keylen, + std::string const& user_password, + std::string const& owner_password); # include diff --git a/include/qpdf/auto_job_c_enc.hh b/include/qpdf/auto_job_c_enc.hh new file mode 100644 index 00000000..e808de6c --- /dev/null +++ b/include/qpdf/auto_job_c_enc.hh @@ -0,0 +1,19 @@ +// +// This file is automatically generated by generate_auto_job. +// Edits will be automatically overwritten if the build is +// run in maintainer mode. +// +QPDF_DLL Config& end(); +QPDF_DLL EncConfig& extract(char const* parameter); +QPDF_DLL EncConfig& annotate(char const* parameter); +QPDF_DLL EncConfig& print(char const* parameter); +QPDF_DLL EncConfig& modify(char const* parameter); +QPDF_DLL EncConfig& cleartextMetadata(); +QPDF_DLL EncConfig& forceV4(); +QPDF_DLL EncConfig& accessibility(char const* parameter); +QPDF_DLL EncConfig& assemble(char const* parameter); +QPDF_DLL EncConfig& form(char const* parameter); +QPDF_DLL EncConfig& modifyOther(char const* parameter); +QPDF_DLL EncConfig& useAes(char const* parameter); +QPDF_DLL EncConfig& forceR5(); +QPDF_DLL EncConfig& allowInsecure(); -- cgit v1.2.3-54-g00ecf