swaroop: allow ScreenKDM subclasses for different KDM types.
[dcpomatic.git] / src / lib / encrypted_ecinema_kdm.cc
index e4e19d7fb3de57426fd4707a0763b00cb2bb1864..f0502ab31ddde720d1e50f57dd7bfd444a79e2ac 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "encrypted_ecinema_kdm.h"
 #include "exceptions.h"
+#include "cross.h"
 #include <dcp/key.h>
 #include <dcp/certificate.h>
 #include <dcp/util.h>
@@ -85,4 +86,13 @@ EncryptedECinemaKDM::as_xml () const
        return document.write_to_string ("UTF-8");
 }
 
+void
+EncryptedECinemaKDM::as_xml (boost::filesystem::path path) const
+{
+       FILE* f = fopen_boost (path, "w");
+       string const x = as_xml ();
+       fwrite (x.c_str(), 1, x.length(), f);
+       fclose (f);
+}
+
 #endif