aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-07-31 14:03:18 +0200
committerJay Berkenbilt <ejb@ql.org>2022-07-31 22:23:17 +0200
commit80acfc3826704064db8cc2f6af0c338b3aa557e7 (patch)
treec3b90bbfa9f3bdc3e653515877214a2e4c5a6920 /include
parent69820847af93cce0e400638999fee4d2cbb68db6 (diff)
downloadqpdf-80acfc3826704064db8cc2f6af0c338b3aa557e7.tar.zst
Fix --json-help to take a version parameter
Diffstat (limited to 'include')
-rw-r--r--include/qpdf/QPDFJob.hh21
1 files changed, 16 insertions, 5 deletions
diff --git a/include/qpdf/QPDFJob.hh b/include/qpdf/QPDFJob.hh
index 1d8b07f6..f2696327 100644
--- a/include/qpdf/QPDFJob.hh
+++ b/include/qpdf/QPDFJob.hh
@@ -46,6 +46,8 @@ class QPDFLogger;
class QPDFJob
{
public:
+ static int constexpr LATEST_JOB_JSON = 1;
+
// Exit codes -- returned by getExitCode() after calling run()
static int constexpr EXIT_ERROR = qpdf_exit_error;
static int constexpr EXIT_WARNING = qpdf_exit_warning;
@@ -426,14 +428,23 @@ class QPDFJob
doIfVerbose(std::function<void(Pipeline&, std::string const& prefix)> fn);
// Provide a string that is the help information ("schema" for the
- // qpdf-specific JSON object) for version 1 of the JSON output.
+ // qpdf-specific JSON object) for the specified version of JSON
+ // output.
+ QPDF_DLL
+ static std::string json_out_schema(int version);
+
+ QPDF_DLL
+ [[deprecated("use json_out_schema(version)")]] static std::string
+ json_out_schema_v1();
+
+ // Provide a string that is the help information for specified
+ // version of JSON format for QPDFJob.
QPDF_DLL
- static std::string json_out_schema_v1();
+ static std::string job_json_schema(int version);
- // Provide a string that is the help information for the version 1
- // of JSON format for QPDFJob.
QPDF_DLL
- static std::string job_json_schema_v1();
+ [[deprecated("use job_json_schema(version)")]] static std::string
+ job_json_schema_v1();
private:
struct RotationSpec