From 2f631997f2c21d13422f01f6fe1f2ec5ab1f7554 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Wed, 5 Jan 2022 15:01:35 -0500 Subject: QPDFJob increment: remove std::cout, std::cerr, whoami Remove remaining temporary duplication of hard-coded values and direct access to std::cout, std::cerr, and whoami in favor of parameters in QPDFJob. This moves a few more static methods into QPDFJob member functions. --- include/qpdf/QPDFJob.hh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/qpdf/QPDFJob.hh b/include/qpdf/QPDFJob.hh index 89be7c2c..52a93284 100644 --- a/include/qpdf/QPDFJob.hh +++ b/include/qpdf/QPDFJob.hh @@ -50,7 +50,7 @@ class QPDFJob void setMessagePrefix(std::string const&); // Override streams that errors and output go to. Defaults are - // std::cout and std::cerr. + // std::cout and std::cerr. Pass nullptr to use the default. QPDF_DLL void setOutputStreams(std::ostream* out_stream, std::ostream* err_stream); @@ -183,6 +183,11 @@ class QPDFJob void doInspection(QPDF& pdf); void showEncryption(QPDF& pdf); void doCheck(QPDF& pdf); + void doShowObj(QPDF& pdf); + void doShowPages(QPDF& pdf); + void doListAttachments(QPDF& pdf); + void setEncryptionOptions(QPDF&, QPDFWriter&); + void maybeFixWritePassword(int R, std::string& password); enum remove_unref_e { re_auto, re_yes, re_no }; @@ -313,11 +318,11 @@ class QPDFJob Members(); Members(Members const&) = delete; - std::string whoami; + std::string message_prefix; bool warnings; bool creates_output; - std::ostream* out_stream; - std::ostream* err_stream; + std::ostream* cout; + std::ostream* cerr; unsigned long encryption_status; }; PointerHolder m; -- cgit v1.2.3-54-g00ecf