Merge remote-tracking branch 'origin/master' into 2.0
[dcpomatic.git] / src / lib / kdm.cc
index 49f04724ac1c07ed2bddfb050a7139999c701c6b..0593881bc696498b1ec401ae7d6537a2df300d20 100644 (file)
@@ -21,7 +21,8 @@
 #include <boost/shared_ptr.hpp>
 #include <quickmail.h>
 #include <zip.h>
-#include <libdcp/kdm.h>
+#include <dcp/encrypted_kdm.h>
+#include <dcp/types.h>
 #include "kdm.h"
 #include "cinema.h"
 #include "exceptions.h"
@@ -37,13 +38,13 @@ using boost::shared_ptr;
 
 struct ScreenKDM
 {
-       ScreenKDM (shared_ptr<Screen> s, libdcp::KDM k)
+       ScreenKDM (shared_ptr<Screen> s, dcp::EncryptedKDM k)
                : screen (s)
                , kdm (k)
        {}
        
        shared_ptr<Screen> screen;
-       libdcp::KDM kdm;
+       dcp::EncryptedKDM kdm;
 };
 
 static string
@@ -104,17 +105,17 @@ make_screen_kdms (
        shared_ptr<const Film> film,
        list<shared_ptr<Screen> > screens,
        boost::filesystem::path cpl,
-       boost::posix_time::ptime from,
-       boost::posix_time::ptime to,
-       libdcp::KDM::Formulation formulation
+       dcp::LocalTime from,
+       dcp::LocalTime to,
+       dcp::Formulation formulation
        )
 {
-       list<libdcp::KDM> kdms = film->make_kdms (screens, cpl, from, to, formulation);
+       list<dcp::EncryptedKDM> kdms = film->make_kdms (screens, cpl, from, to, formulation);
           
        list<ScreenKDM> screen_kdms;
        
        list<shared_ptr<Screen> >::iterator i = screens.begin ();
-       list<libdcp::KDM>::iterator j = kdms.begin ();
+       list<dcp::EncryptedKDM>::iterator j = kdms.begin ();
        while (i != screens.end() && j != kdms.end ()) {
                screen_kdms.push_back (ScreenKDM (*i, *j));
                ++i;
@@ -129,9 +130,9 @@ make_cinema_kdms (
        shared_ptr<const Film> film,
        list<shared_ptr<Screen> > screens,
        boost::filesystem::path cpl,
-       boost::posix_time::ptime from,
-       boost::posix_time::ptime to,
-       libdcp::KDM::Formulation formulation
+       dcp::LocalTime from,
+       dcp::LocalTime to,
+       dcp::Formulation formulation
        )
 {
        list<ScreenKDM> screen_kdms = make_screen_kdms (film, screens, cpl, from, to, formulation);
@@ -175,9 +176,9 @@ write_kdm_files (
        shared_ptr<const Film> film,
        list<shared_ptr<Screen> > screens,
        boost::filesystem::path cpl,
-       boost::posix_time::ptime from,
-       boost::posix_time::ptime to,
-       libdcp::KDM::Formulation formulation,
+       dcp::LocalTime from,
+       dcp::LocalTime to,
+       dcp::Formulation formulation,
        boost::filesystem::path directory
        )
 {
@@ -196,9 +197,9 @@ write_kdm_zip_files (
        shared_ptr<const Film> film,
        list<shared_ptr<Screen> > screens,
        boost::filesystem::path cpl,
-       boost::posix_time::ptime from,
-       boost::posix_time::ptime to,
-       libdcp::KDM::Formulation formulation,
+       dcp::LocalTime from,
+       dcp::LocalTime to,
+       dcp::Formulation formulation,
        boost::filesystem::path directory
        )
 {
@@ -216,9 +217,9 @@ email_kdms (
        shared_ptr<const Film> film,
        list<shared_ptr<Screen> > screens,
        boost::filesystem::path cpl,
-       boost::posix_time::ptime from,
-       boost::posix_time::ptime to,
-       libdcp::KDM::Formulation formulation
+       dcp::LocalTime from,
+       dcp::LocalTime to,
+       dcp::Formulation formulation
        )
 {
        list<CinemaKDMs> cinema_kdms = make_cinema_kdms (film, screens, cpl, from, to, formulation);