diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-06-19 02:44:44 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2022-06-19 14:46:58 +0200 |
commit | 87412eb05be3148e812310128f361f79922baad8 (patch) | |
tree | e8f58ce2ac059c7fcc912df62226885574d6a372 /include | |
parent | 3a7ee7e93847d41cae414ff77cc75fd6394751ef (diff) | |
download | qpdf-87412eb05be3148e812310128f361f79922baad8.tar.zst |
Add QPDFJob::registerProgressReporter
Diffstat (limited to 'include')
-rw-r--r-- | include/qpdf/QPDFJob.hh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/qpdf/QPDFJob.hh b/include/qpdf/QPDFJob.hh index 16b1ab74..96b05768 100644 --- a/include/qpdf/QPDFJob.hh +++ b/include/qpdf/QPDFJob.hh @@ -134,6 +134,14 @@ class QPDFJob "configure logger from getLogger() or call setLogger()")]] QPDF_DLL void setOutputStreams(std::ostream* out_stream, std::ostream* err_stream); + // You can register a custom progress reporter to be called by + // QPDFWriter (see QPDFWriter::registerProgressReporter). This is + // only called if you also request progress reporting through + // normal configuration methods (e.g., pass --progress, call + // config()->progress, etc.) + QPDF_DLL + void registerProgressReporter(std::function<void(int)>); + // Check to make sure no contradictory options have been // specified. This is called automatically after initializing from // argv or json and is also called by run, but you can call it @@ -579,6 +587,7 @@ class QPDFJob bool decrypt; int split_pages; bool progress; + std::function<void(int)> progress_handler; bool suppress_warnings; bool warnings_exit_zero; bool copy_encryption; |