diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-01-25 17:07:53 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2022-01-30 19:11:03 +0100 |
commit | 21c897aad0c3edc6e47e88754ab279e0f076cd06 (patch) | |
tree | b255a0b10a817ad083a8403a769687bfc23f08be /include | |
parent | 965e473a01122291e9498bbec81af144bd33f075 (diff) | |
download | qpdf-21c897aad0c3edc6e47e88754ab279e0f076cd06.tar.zst |
QPDFJob: convert a flag in other than the main table
Diffstat (limited to 'include')
-rw-r--r-- | include/qpdf/QPDFJob.hh | 44 |
1 files changed, 36 insertions, 8 deletions
diff --git a/include/qpdf/QPDFJob.hh b/include/qpdf/QPDFJob.hh index c76d85cc..a4be63e9 100644 --- a/include/qpdf/QPDFJob.hh +++ b/include/qpdf/QPDFJob.hh @@ -100,11 +100,44 @@ class QPDFJob // CONFIGURATION // (implemented in QPDFJob_config.cc) + private: + struct CopyAttachmentFrom + { + std::string path; + std::string password; + std::string prefix; + }; + + public: + class Config; + class CopyAttConfig + { + friend class QPDFJob; + friend class Config; + public: + QPDF_DLL CopyAttConfig& filename(char const* parameter); + // QXXXQ auto + QPDF_DLL CopyAttConfig& prefix(char const* parameter); + QPDF_DLL CopyAttConfig& password(char const* parameter); + QPDF_DLL Config& end(); + // /QXXXQ + + private: + CopyAttConfig(Config&); + CopyAttConfig(CopyAttConfig const&) = delete; + + Config& config; + CopyAttachmentFrom caf; + }; + // Configuration is performed by calling methods XXX QXXXQ document class Config { friend class QPDFJob; public: + QPDF_DLL + std::shared_ptr<CopyAttConfig> copyAttachmentsFrom(); + // QXXXQ could potentially generate these declarations QPDF_DLL Config& allowWeakCrypto(); QPDF_DLL Config& check(); @@ -171,9 +204,11 @@ class QPDFJob QPDF_DLL Config& verbose(); QPDF_DLL Config& warningExit0(); QPDF_DLL Config& withImages(); + // /QXXXQ private: Config() = delete; + Config(Config const&) = delete; Config(QPDFJob& job) : o(job) { @@ -183,7 +218,7 @@ class QPDFJob friend class Config; QPDF_DLL - Config config(); + std::shared_ptr<Config> config(); // QXXXQ set options -- implemented in QPDFJob_options.cc @@ -295,13 +330,6 @@ class QPDFJob bool replace; }; - struct CopyAttachmentFrom - { - std::string path; - std::string password; - std::string prefix; - }; - enum remove_unref_e { re_auto, re_yes, re_no }; std::shared_ptr<char> password; |