Use sqlite for cinema and DKDM recipient lists.
[dcpomatic.git] / src / lib / screen.h
index 7cbeb1d153cf979af5d982d96703ba8a05ee26cb..89ebc3ab4c1bc8ce8ca7e0da27ebc53a060fbd60 100644 (file)
 #define DCPOMATIC_SCREEN_H
 
 
-#include "kdm_with_metadata.h"
+#include "cinema_list.h"
 #include "kdm_recipient.h"
 #include "kdm_util.h"
+#include "kdm_with_metadata.h"
 #include "trusted_device.h"
 #include <dcp/certificate.h>
+#include <dcp/decrypted_kdm.h>
+#include <dcp/utc_offset.h>
 #include <libcxml/cxml.h>
 #include <boost/optional.hpp>
 #include <string>
@@ -61,12 +64,7 @@ public:
                , trusted_devices (trusted_devices_)
        {}
 
-       explicit Screen (cxml::ConstNodePtr);
-
-       void as_xml (xmlpp::Element *) const override;
        std::vector<std::string> trusted_device_thumbprints () const;
-
-       std::shared_ptr<Cinema> cinema;
        std::vector<TrustedDevice> trusted_devices;
 };
 
@@ -75,11 +73,12 @@ public:
 
 KDMWithMetadataPtr
 kdm_for_screen (
-       std::shared_ptr<const Film> film,
-       boost::filesystem::path cpl,
-       std::shared_ptr<const dcpomatic::Screen> screen,
-       boost::posix_time::ptime valid_from,
-       boost::posix_time::ptime valid_to,
+       std::function<dcp::DecryptedKDM (dcp::LocalTime, dcp::LocalTime)> make_kdm,
+       CinemaID cinema_id,
+       Cinema const& cinema,
+       dcpomatic::Screen const& screen,
+       dcp::LocalTime valid_from,
+       dcp::LocalTime valid_to,
        dcp::Formulation formulation,
        bool disable_forensic_marking_picture,
        boost::optional<int> disable_forensic_marking_audio,