aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-01-25 17:07:53 +0100
committerJay Berkenbilt <ejb@ql.org>2022-01-30 19:11:03 +0100
commit21c897aad0c3edc6e47e88754ab279e0f076cd06 (patch)
treeb255a0b10a817ad083a8403a769687bfc23f08be /include
parent965e473a01122291e9498bbec81af144bd33f075 (diff)
downloadqpdf-21c897aad0c3edc6e47e88754ab279e0f076cd06.tar.zst
QPDFJob: convert a flag in other than the main table
Diffstat (limited to 'include')
-rw-r--r--include/qpdf/QPDFJob.hh44
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;