Various probably quite untidy progress on KDMs.
[libdcp.git] / src / mxf_asset.cc
index d229331bf5fc96750f1eae8b11b53c1c9f9032b7..6ba42d754f5ed7a15edd7ebbddf4bd03edd53175 100644 (file)
@@ -24,6 +24,7 @@
 #include <iostream>
 #include <fstream>
 #include <boost/filesystem.hpp>
+#include <libxml++/nodes/element.h>
 #include "AS_DCP.h"
 #include "KM_prng.h"
 #include "KM_util.h"
@@ -128,3 +129,11 @@ MXFAsset::length () const
 {
        return _length;
 }
+
+void
+MXFAsset::add_typed_key_id (xmlpp::Element* parent) const
+{
+       xmlpp::Element* typed_key_id = parent->add_child("TypedKeyId");
+       typed_key_id->add_child("KeyType")->add_child_text(key_type ());
+       typed_key_id->add_child("KeyId")->add_child_text("urn:uuid:" + _key_id);
+}