Merge master.
[dcpomatic.git] / src / lib / content.cc
index 0c21822cba066c5e037923d18b5bd71c059f0c0a..9c3bcd39dcf6cd5585c20d7e9d70a4d8f52cb9c9 100644 (file)
@@ -1,3 +1,22 @@
+/*
+    Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
 #include <boost/thread/mutex.hpp>
 #include <libxml++/libxml++.h>
 #include <libcxml/cxml.h>
@@ -20,7 +39,8 @@ Content::Content (shared_ptr<const cxml::Node> node)
 }
 
 Content::Content (Content const & o)
-       : _file (o._file)
+       : boost::enable_shared_from_this<Content> (o)
+       , _file (o._file)
        , _digest (o._digest)
 {
 
@@ -41,3 +61,9 @@ Content::examine (shared_ptr<Film>, shared_ptr<Job>, bool)
        boost::mutex::scoped_lock lm (_mutex);
        _digest = d;
 }
+
+void
+Content::signal_changed (int p)
+{
+       Changed (shared_from_this (), p);
+}