From 80acfc3826704064db8cc2f6af0c338b3aa557e7 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sun, 31 Jul 2022 08:03:18 -0400 Subject: Fix --json-help to take a version parameter --- include/qpdf/QPDFJob.hh | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'include') 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 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 -- cgit v1.2.3-54-g00ecf