Merge master.
[dcpomatic.git] / src / lib / image_proxy.h
index 792fa004aea931e3d3a4041822571a4c89ec3633..b499b329283362788c778b40ccb33769f3e36ea8 100644 (file)
@@ -28,6 +28,7 @@
 
 class Image;
 class Socket;
+class Log;
 
 namespace cxml {
        class Node;
@@ -44,19 +45,24 @@ namespace cxml {
  *  the TIFF data TIFF until such a time that the actual image is needed.
  *  At this point, the class decodes the TIFF to an Image.
  */
-class ImageProxy
+class ImageProxy : public boost::noncopyable
 {
 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);