From 553ac7f353c7043806ec0de70d8630f5cd0a7bb8 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sun, 7 Feb 2021 16:54:16 -0500 Subject: Add QUtil::pipe_file and QUtil::file_provider --- include/qpdf/QUtil.hh | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include') 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 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 + file_provider(std::string const& filename); + QPDF_DLL char* copy_string(std::string const&); -- cgit v1.2.3-54-g00ecf