diff options
author | Jay Berkenbilt <ejb@ql.org> | 2010-08-03 00:17:01 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2010-08-03 00:17:01 +0200 |
commit | 9a06fc541ce00361f12f6231b2f7556615cbccb7 (patch) | |
tree | 858037640e94c3081e829e21c980b556de744ea5 /libqpdf/qpdf | |
parent | ab5a01c64ec3c8cb4f13b6846ca4ecdc7b888e14 (diff) | |
download | qpdf-9a06fc541ce00361f12f6231b2f7556615cbccb7.tar.zst |
ready to implement replacement stream data
git-svn-id: svn+q:///qpdf/trunk@987 71b93d88-0707-0410-a8cf-f5a4172ac649
Diffstat (limited to 'libqpdf/qpdf')
-rw-r--r-- | libqpdf/qpdf/QPDF_Dictionary.hh | 2 | ||||
-rw-r--r-- | libqpdf/qpdf/QPDF_Stream.hh | 12 |
2 files changed, 10 insertions, 4 deletions
diff --git a/libqpdf/qpdf/QPDF_Dictionary.hh b/libqpdf/qpdf/QPDF_Dictionary.hh index e75de01b..e84b549e 100644 --- a/libqpdf/qpdf/QPDF_Dictionary.hh +++ b/libqpdf/qpdf/QPDF_Dictionary.hh @@ -26,6 +26,8 @@ class QPDF_Dictionary: public QPDFObject void replaceKey(std::string const& key, QPDFObjectHandle const&); // Remove key, doing nothing if key does not exist void removeKey(std::string const& key); + // If object is null, replace key; otherwise, remove key + void replaceOrRemoveKey(std::string const& key, QPDFObjectHandle); protected: virtual void releaseResolved(); diff --git a/libqpdf/qpdf/QPDF_Stream.hh b/libqpdf/qpdf/QPDF_Stream.hh index c969255d..cc7cbf0a 100644 --- a/libqpdf/qpdf/QPDF_Stream.hh +++ b/libqpdf/qpdf/QPDF_Stream.hh @@ -18,24 +18,28 @@ class QPDF_Stream: public QPDFObject virtual std::string unparse(); QPDFObjectHandle getDict() const; - // See comments in QPDFObjectHandle.hh + // See comments in QPDFObjectHandle.hh for these methods. bool pipeStreamData(Pipeline*, bool filter, bool normalize, bool compress); - - // See comments in QPDFObjectHandle.hh PointerHolder<Buffer> getStreamData(); + void replaceStreamData(PointerHolder<Buffer> data, + QPDFObjectHandle filter, + QPDFObjectHandle decode_parms); + void replaceStreamData( + PointerHolder<QPDFObjectHandle::StreamDataHandler> dh); private: bool filterable(std::vector<std::string>& filters, int& predictor, int& columns, bool& early_code_change); - QPDF* qpdf; int objid; int generation; QPDFObjectHandle stream_dict; off_t offset; int length; + PointerHolder<QPDFObjectHandle::StreamDataHandler> stream_data_handler; + PointerHolder<Buffer> stream_data; }; #endif // __QPDF_STREAM_HH__ |