diff --git a/include/qpdf/QPDF.hh b/include/qpdf/QPDF.hh index 75cc238..a8eb32c 100644 --- a/include/qpdf/QPDF.hh +++ b/include/qpdf/QPDF.hh @@ -792,7 +792,6 @@ class QPDF class Doc; class Writer; class StreamCopier; - class Pipe; class JobSetter; inline bool reconstructed_xref() const; diff --git a/libqpdf/QPDF_Stream.cc b/libqpdf/QPDF_Stream.cc index 558b542..5b2c47e 100644 --- a/libqpdf/QPDF_Stream.cc +++ b/libqpdf/QPDF_Stream.cc @@ -26,6 +26,27 @@ using namespace std::literals; using namespace qpdf; +// Pipe class is restricted to QPDF_Stream. +class QPDF::Doc::Streams +{ + public: + static bool + pipeStreamData( + QPDF* qpdf, + QPDFObjGen og, + qpdf_offset_t offset, + size_t length, + QPDFObjectHandle dict, + bool is_root_metadata, + Pipeline* pipeline, + bool suppress_warnings, + bool will_retry) + { + return qpdf->pipeStreamData( + og, offset, length, dict, is_root_metadata, pipeline, suppress_warnings, will_retry); + } +}; + namespace { class SF_Crypt final: public QPDFStreamFilter @@ -563,7 +584,7 @@ Stream::pipeStreamData( throw std::logic_error("pipeStreamData called for stream with no data"); } QTC::TC("qpdf", "QPDF_Stream pipe original stream data"); - if (!QPDF::Pipe::pipeStreamData( + if (!QPDF::Doc::Streams::pipeStreamData( obj->getQPDF(), obj->getObjGen(), obj->getParsedOffset(), diff --git a/libqpdf/qpdf/QPDF_private.hh b/libqpdf/qpdf/QPDF_private.hh index e92faf3..e3f695a 100644 --- a/libqpdf/qpdf/QPDF_private.hh +++ b/libqpdf/qpdf/QPDF_private.hh @@ -26,29 +26,6 @@ class QPDF::StreamCopier } }; -// Pipe class is restricted to QPDF_Stream. -class QPDF::Pipe -{ - friend class qpdf::Stream; - - private: - static bool - pipeStreamData( - QPDF* qpdf, - QPDFObjGen og, - qpdf_offset_t offset, - size_t length, - QPDFObjectHandle dict, - bool is_root_metadata, - Pipeline* pipeline, - bool suppress_warnings, - bool will_retry) - { - return qpdf->pipeStreamData( - og, offset, length, dict, is_root_metadata, pipeline, suppress_warnings, will_retry); - } -}; - class QPDF::ObjCache { public: @@ -369,6 +346,7 @@ class QPDF::Doc public: class ParseGuard; class Resolver; + class Streams; Doc() = delete; Doc(Doc const&) = delete;