aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFWriter.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libqpdf/QPDFWriter.cc')
-rw-r--r--libqpdf/QPDFWriter.cc24
1 files changed, 24 insertions, 0 deletions
diff --git a/libqpdf/QPDFWriter.cc b/libqpdf/QPDFWriter.cc
index b1bb4ad7..d160ff99 100644
--- a/libqpdf/QPDFWriter.cc
+++ b/libqpdf/QPDFWriter.cc
@@ -25,6 +25,30 @@
#include <algorithm>
#include <stdlib.h>
+QPDFWriter::ProgressReporter::~ProgressReporter()
+{
+ // Must be explicit and not inline -- see QPDF_DLL_CLASS in
+ // README-maintainer
+}
+
+QPDFWriter::FunctionProgressReporter::FunctionProgressReporter(
+ std::function<void(int)> handler) :
+ handler(handler)
+{
+}
+
+QPDFWriter::FunctionProgressReporter::~FunctionProgressReporter()
+{
+ // Must be explicit and not inline -- see QPDF_DLL_CLASS in
+ // README-maintainer
+}
+
+void
+QPDFWriter::FunctionProgressReporter::reportProgress(int progress)
+{
+ this->handler(progress);
+}
+
QPDFWriter::Members::Members(QPDF& pdf) :
pdf(pdf),
filename("unspecified"),