aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/qpdf/QPDFJob.hh55
-rw-r--r--include/qpdf/auto_job_c_att.hh13
2 files changed, 50 insertions, 18 deletions
diff --git a/include/qpdf/QPDFJob.hh b/include/qpdf/QPDFJob.hh
index 18f1a28e..734f5f45 100644
--- a/include/qpdf/QPDFJob.hh
+++ b/include/qpdf/QPDFJob.hh
@@ -108,14 +108,49 @@ class QPDFJob
std::string prefix;
};
+ struct AddAttachment
+ {
+ AddAttachment() :
+ replace(false)
+ {
+ }
+
+ std::string path;
+ std::string key;
+ std::string filename;
+ std::string creationdate;
+ std::string moddate;
+ std::string mimetype;
+ std::string description;
+ bool replace;
+ };
+
public:
class Config;
+
+ class AttConfig
+ {
+ friend class QPDFJob;
+ friend class Config;
+ public:
+ QPDF_DLL AttConfig& path(char const* parameter);
+
+# include <qpdf/auto_job_c_att.hh>
+
+ private:
+ AttConfig(Config&);
+ AttConfig(AttConfig const&) = delete;
+
+ Config& config;
+ AddAttachment att;
+ };
+
class CopyAttConfig
{
friend class QPDFJob;
friend class Config;
public:
- QPDF_DLL CopyAttConfig& filename(char const* parameter);
+ QPDF_DLL CopyAttConfig& path(char const* parameter);
# include <qpdf/auto_job_c_copy_att.hh>
@@ -134,6 +169,7 @@ class QPDFJob
public:
QPDF_DLL
std::shared_ptr<CopyAttConfig> copyAttachmentsFrom();
+ std::shared_ptr<AttConfig> addAttachment();
# include <qpdf/auto_job_c_main.hh>
@@ -244,23 +280,6 @@ class QPDFJob
std::vector<int> repeat_pagenos;
};
- struct AddAttachment
- {
- AddAttachment() :
- replace(false)
- {
- }
-
- std::string path;
- std::string key;
- std::string filename;
- std::string creationdate;
- std::string moddate;
- std::string mimetype;
- std::string description;
- bool replace;
- };
-
enum remove_unref_e { re_auto, re_yes, re_no };
std::shared_ptr<char> password;
diff --git a/include/qpdf/auto_job_c_att.hh b/include/qpdf/auto_job_c_att.hh
new file mode 100644
index 00000000..ac0f4223
--- /dev/null
+++ b/include/qpdf/auto_job_c_att.hh
@@ -0,0 +1,13 @@
+//
+// 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 AttConfig& replace();
+QPDF_DLL AttConfig& key(char const* parameter);
+QPDF_DLL AttConfig& filename(char const* parameter);
+QPDF_DLL AttConfig& creationdate(char const* parameter);
+QPDF_DLL AttConfig& moddate(char const* parameter);
+QPDF_DLL AttConfig& mimetype(char const* parameter);
+QPDF_DLL AttConfig& description(char const* parameter);