diff options
author | Jay Berkenbilt <ejb@ql.org> | 2021-01-17 00:35:04 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2021-01-17 00:41:53 +0100 |
commit | 6226b69dbaf4e31942f6b2c9bdacf7ac92432764 (patch) | |
tree | 5f150d16b1369e823e590db6bbd01aa0f9cce8ab /include/qpdf/QPDF.hh | |
parent | fc88837d4b04c8b766c973206303c3d3af334b92 (diff) | |
download | qpdf-6226b69dbaf4e31942f6b2c9bdacf7ac92432764.tar.zst |
Add warn() to QPDF's public API
Diffstat (limited to 'include/qpdf/QPDF.hh')
-rw-r--r-- | include/qpdf/QPDF.hh | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/include/qpdf/QPDF.hh b/include/qpdf/QPDF.hh index 7dcfccc5..4e0984a7 100644 --- a/include/qpdf/QPDF.hh +++ b/include/qpdf/QPDF.hh @@ -246,6 +246,12 @@ class QPDF QPDF_DLL unsigned long long getUniqueId() const; + // Issue a warning on behalf of this QPDF object. It will be + // emitted with other warnings, following warning suppression + // rules, and it will be available with getWarnings(). + QPDF_DLL + void warn(QPDFExc const& e); + QPDF_DLL std::string getFilename() const; QPDF_DLL @@ -694,19 +700,6 @@ class QPDF }; friend class Resolver; - // Warner class allows QPDFObjectHandle to create warnings - class Warner - { - friend class QPDFObjectHandle; - friend class QPDF_Stream; - private: - static void warn(QPDF* qpdf, QPDFExc const& e) - { - qpdf->warn(e); - } - }; - friend class Warner; - // ParseGuard class allows QPDFObjectHandle to detect re-entrant // resolution class ParseGuard @@ -895,7 +888,6 @@ class QPDF void parse(char const* password); void inParse(bool); - void warn(QPDFExc const& e); void setTrailer(QPDFObjectHandle obj); void read_xref(qpdf_offset_t offset); void reconstruct_xref(QPDFExc& e); |