summaryrefslogtreecommitdiff
path: root/src/lib/content.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/content.cc')
-rw-r--r--src/lib/content.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/content.cc b/src/lib/content.cc
index 2fb94e959..977f2e2a7 100644
--- a/src/lib/content.cc
+++ b/src/lib/content.cc
@@ -1,4 +1,6 @@
#include <boost/thread/mutex.hpp>
+#include <libxml++/libxml++.h>
+#include <libcxml/cxml.h>
#include "content.h"
#include "util.h"
@@ -11,6 +13,20 @@ Content::Content (boost::filesystem::path f)
}
+Content::Content (shared_ptr<const cxml::Node> node)
+{
+ _file = node->string_child ("File");
+ _digest = node->string_child ("Digest");
+}
+
+void
+Content::as_xml (xmlpp::Node* node) const
+{
+ boost::mutex::scoped_lock lm (_mutex);
+ node->add_child("File")->add_child_text (_file.string());
+ node->add_child("Digest")->add_child_text (_digest);
+}
+
void
Content::examine (shared_ptr<Film>, shared_ptr<Job>, bool)
{