diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-05-21 16:44:06 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-05-21 16:44:06 +0100 |
| commit | 71d8cf20889a3c419c9a3e485f461236e5317423 (patch) | |
| tree | fb2108412c8a172b423cfe48b15a5f31617eade3 /src/lib/image_proxy.h | |
| parent | d2fef4faff679d564a72543c858c4bfb62f85791 (diff) | |
Tidy up logging a bit. Make it configurable from the GUI.
Diffstat (limited to 'src/lib/image_proxy.h')
| -rw-r--r-- | src/lib/image_proxy.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/lib/image_proxy.h b/src/lib/image_proxy.h index 792fa004a..fcbda7dd1 100644 --- a/src/lib/image_proxy.h +++ b/src/lib/image_proxy.h @@ -28,6 +28,7 @@ class Image; class Socket; +class Log; namespace cxml { class Node; @@ -47,16 +48,21 @@ namespace cxml { class ImageProxy { public: + ImageProxy (boost::shared_ptr<Log> log); + virtual boost::shared_ptr<Image> image () const = 0; virtual void add_metadata (xmlpp::Node *) const = 0; virtual void send_binary (boost::shared_ptr<Socket>) const = 0; + +protected: + boost::shared_ptr<Log> _log; }; class RawImageProxy : public ImageProxy { public: - RawImageProxy (boost::shared_ptr<Image>); - RawImageProxy (boost::shared_ptr<cxml::Node> xml, boost::shared_ptr<Socket> socket); + RawImageProxy (boost::shared_ptr<Image>, boost::shared_ptr<Log> log); + RawImageProxy (boost::shared_ptr<cxml::Node> xml, boost::shared_ptr<Socket> socket, boost::shared_ptr<Log> log); boost::shared_ptr<Image> image () const; void add_metadata (xmlpp::Node *) const; @@ -69,8 +75,8 @@ private: class MagickImageProxy : public ImageProxy { public: - MagickImageProxy (boost::filesystem::path); - MagickImageProxy (boost::shared_ptr<cxml::Node> xml, boost::shared_ptr<Socket> socket); + MagickImageProxy (boost::filesystem::path, boost::shared_ptr<Log> log); + MagickImageProxy (boost::shared_ptr<cxml::Node> xml, boost::shared_ptr<Socket> socket, boost::shared_ptr<Log> log); boost::shared_ptr<Image> image () const; void add_metadata (xmlpp::Node *) const; @@ -81,4 +87,4 @@ private: mutable boost::shared_ptr<Image> _image; }; -boost::shared_ptr<ImageProxy> image_proxy_factory (boost::shared_ptr<cxml::Node> xml, boost::shared_ptr<Socket> socket); +boost::shared_ptr<ImageProxy> image_proxy_factory (boost::shared_ptr<cxml::Node> xml, boost::shared_ptr<Socket> socket, boost::shared_ptr<Log> log); |
