X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fscreen.h;h=33c7f280ce32b7d018a9b8c7941db7d75ac5f355;hp=5e8f1f9759723ddcb7b3e8fe4e9bbd605458f685;hb=8f12e84009d7c2685bb2eeb32665876463d4e6e5;hpb=a69d242f3f00207d6ea7320e6723775f4b0dbfb3 diff --git a/src/lib/screen.h b/src/lib/screen.h index 5e8f1f975..33c7f280c 100644 --- a/src/lib/screen.h +++ b/src/lib/screen.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2016 Carl Hetherington + Copyright (C) 2013-2019 Carl Hetherington This file is part of DCP-o-matic. @@ -18,24 +18,51 @@ */ +#ifndef DCPOMATIC_SCREEN_H +#define DCPOMATIC_SCREEN_H + +#include "kdm_with_metadata.h" #include #include #include #include class Cinema; +class Film; + +class TrustedDevice +{ +public: + explicit TrustedDevice (std::string); + explicit TrustedDevice (dcp::Certificate); + + boost::optional certificate () const { + return _certificate; + } + + std::string thumbprint () const; + std::string as_string () const; + +private: + boost::optional _certificate; + boost::optional _thumbprint; +}; + +namespace dcpomatic { /** @class Screen * @brief A representation of a Screen for KDM generation. * - * This is the name of the screen and the certificate of its - * `recipient' (i.e. the servers). + * This is the name of the screen, the certificate of its + * `recipient' (i.e. the mediablock) and the certificates/thumbprints + * of any trusted devices. */ class Screen { public: - Screen (std::string const & n, boost::optional rec, std::vector td) - : name (n) + Screen (std::string const & na, std::string const & no, boost::optional rec, std::vector td) + : name (na) + , notes (no) , recipient (rec) , trusted_devices (td) {} @@ -43,10 +70,28 @@ public: explicit Screen (cxml::ConstNodePtr); void as_xml (xmlpp::Element *) const; + std::vector trusted_device_thumbprints () const; boost::shared_ptr cinema; std::string name; std::string notes; boost::optional recipient; - std::vector trusted_devices; + std::vector trusted_devices; }; + +} + +KDMWithMetadataPtr +kdm_for_screen ( + boost::shared_ptr film, + boost::filesystem::path cpl, + boost::shared_ptr screen, + boost::posix_time::ptime valid_from, + boost::posix_time::ptime valid_to, + dcp::Formulation formulation, + bool disable_forensic_marking_picture, + boost::optional disable_forensic_marking_audio + ); + + +#endif