diff options
-rw-r--r-- | include/qpdf/QPDFJob.hh | 41 | ||||
-rw-r--r-- | libqpdf/QPDFJob_config.cc | 1 | ||||
-rw-r--r-- | libqpdf/build.mk | 1 |
3 files changed, 28 insertions, 15 deletions
diff --git a/include/qpdf/QPDFJob.hh b/include/qpdf/QPDFJob.hh index a1c17435..d8c698a5 100644 --- a/include/qpdf/QPDFJob.hh +++ b/include/qpdf/QPDFJob.hh @@ -45,6 +45,8 @@ class QPDFJob QPDF_DLL QPDFJob(); + // SETUP FUNCTIONS + // Initialize a QPDFJob object from argv. The progname_env // argument is the name of an environment variable which, if set, // overrides the name of the executable for purposes of generating @@ -83,37 +85,46 @@ class QPDFJob QPDF_DLL void setOutputStreams(std::ostream* out_stream, std::ostream* err_stream); - // If in verbose mode, call the given function, passing in the - // output stream and message prefix. - QPDF_DLL - void doIfVerbose( - std::function<void(std::ostream&, std::string const& prefix)> fn); + // QXXXQ set options -- implemented in QPDFJob_options.cc + // QXXXQ these will not be in the final interface QPDF_DLL - void run(); - + bool suppressWarnings(); QPDF_DLL - bool hasWarnings(); - + bool warningsExitZero(); QPDF_DLL - bool createsOutput(); - + bool checkRequiresPassword(); QPDF_DLL - bool suppressWarnings(); + bool checkIsEncrypted(); + // /QXXXQ + // Execute the job QPDF_DLL - bool warningsExitZero(); + void run(); + + // CHECK STATUS -- these methods provide information known after + // run() is called. QPDF_DLL - bool checkRequiresPassword(); + bool hasWarnings(); QPDF_DLL - bool checkIsEncrypted(); + bool createsOutput(); // QXXXQ need better name // Return value is bitwise OR of values from qpdf_encryption_status_e QPDF_DLL unsigned long getEncryptionStatus(); + // HELPER FUNCTIONS -- methods useful for calling in handlers that + // interact with QPDFJob during run or initialization. + + // If in verbose mode, call the given function, passing in the + // output stream and message prefix. + QPDF_DLL + void doIfVerbose( + std::function<void(std::ostream&, std::string const& prefix)> fn); + + // QXXXQ From here to END-PUBLIC should all be private or // different somehow public: diff --git a/libqpdf/QPDFJob_config.cc b/libqpdf/QPDFJob_config.cc new file mode 100644 index 00000000..0dfc7e14 --- /dev/null +++ b/libqpdf/QPDFJob_config.cc @@ -0,0 +1 @@ +#include <qpdf/QPDFJob.hh> diff --git a/libqpdf/build.mk b/libqpdf/build.mk index 66d85176..4cb546d8 100644 --- a/libqpdf/build.mk +++ b/libqpdf/build.mk @@ -73,6 +73,7 @@ SRCS_libqpdf = \ libqpdf/QPDFFormFieldObjectHelper.cc \ libqpdf/QPDFJob.cc \ libqpdf/QPDFJob_argv.cc \ + libqpdf/QPDFJob_config.cc \ libqpdf/QPDFMatrix.cc \ libqpdf/QPDFNameTreeObjectHelper.cc \ libqpdf/QPDFNumberTreeObjectHelper.cc \ |