Move TrustedDevice to its own source files.
[dcpomatic.git] / src / lib / screen.h
index eff2e5ffe71c96b4ca390cf634673f83347a786c..a564f1ed30b23b4fae242030454bb06c4b69ab31 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013-2018 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2019 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 #ifndef DCPOMATIC_SCREEN_H
 #define DCPOMATIC_SCREEN_H
 
+#include "kdm_with_metadata.h"
+#include "trusted_device.h"
 #include <dcp/certificate.h>
 #include <libcxml/cxml.h>
 #include <boost/optional.hpp>
 #include <string>
 
 class Cinema;
+class Film;
 
-class TrustedDevice
-{
-public:
-       explicit TrustedDevice (std::string);
-       explicit TrustedDevice (dcp::Certificate);
-
-       boost::optional<dcp::Certificate> certificate () const {
-               return _certificate;
-       }
-
-       std::string thumbprint () const;
-       std::string as_string () const;
-
-private:
-       boost::optional<dcp::Certificate> _certificate;
-       boost::optional<std::string> _thumbprint;
-};
+namespace dcpomatic {
 
 /** @class Screen
  *  @brief A representation of a Screen for KDM generation.
@@ -56,8 +43,9 @@ private:
 class Screen
 {
 public:
-       Screen (std::string const & n, boost::optional<dcp::Certificate> rec, std::vector<TrustedDevice> td)
-               : name (n)
+       Screen (std::string const & na, std::string const & no, boost::optional<dcp::Certificate> rec, std::vector<TrustedDevice> td)
+               : name (na)
+               , notes (no)
                , recipient (rec)
                , trusted_devices (td)
        {}
@@ -74,4 +62,19 @@ public:
        std::vector<TrustedDevice> trusted_devices;
 };
 
+}
+
+KDMWithMetadataPtr
+kdm_for_screen (
+       boost::shared_ptr<const Film> film,
+       boost::filesystem::path cpl,
+       boost::shared_ptr<const dcpomatic::Screen> screen,
+       boost::posix_time::ptime valid_from,
+       boost::posix_time::ptime valid_to,
+       dcp::Formulation formulation,
+       bool disable_forensic_marking_picture,
+       boost::optional<int> disable_forensic_marking_audio
+       );
+
+
 #endif