aboutsummaryrefslogtreecommitdiffstats
path: root/include/qpdf/QUtil.hh
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2021-02-07 22:54:16 +0100
committerJay Berkenbilt <ejb@ql.org>2021-02-08 01:41:34 +0100
commit553ac7f353c7043806ec0de70d8630f5cd0a7bb8 (patch)
tree245fe2d4882377c894c00c00071834dc7152c269 /include/qpdf/QUtil.hh
parentefdd46da5117353abf1eda3625221f15c0ea128a (diff)
downloadqpdf-553ac7f353c7043806ec0de70d8630f5cd0a7bb8.tar.zst
Add QUtil::pipe_file and QUtil::file_provider
Diffstat (limited to 'include/qpdf/QUtil.hh')
-rw-r--r--include/qpdf/QUtil.hh13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/qpdf/QUtil.hh b/include/qpdf/QUtil.hh
index 30a73441..fe18c9b7 100644
--- a/include/qpdf/QUtil.hh
+++ b/include/qpdf/QUtil.hh
@@ -34,6 +34,7 @@
#include <time.h>
class RandomDataProvider;
+class Pipeline;
namespace QUtil
{
@@ -119,6 +120,18 @@ namespace QUtil
QPDF_DLL
void rename_file(char const* oldname, char const* newname);
+ // Write the contents of filename as a binary file to the
+ // pipeline.
+ QPDF_DLL
+ void
+ pipe_file(char const* filename, Pipeline* p);
+
+ // Return a function that will send the contents of the given file
+ // through the given pipeline as binary data.
+ QPDF_DLL
+ std::function<void(Pipeline*)>
+ file_provider(std::string const& filename);
+
QPDF_DLL
char* copy_string(std::string const&);