X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fencrypted_kdm.h;h=85cd348cfe5e59bacbae50634c71f925d1d5a2b9;hb=d1f0b2b71a702b5624485cfeacaee5d58c4af5b2;hp=0d459d5a300aeb6d949717a237c5c4aa755de5ff;hpb=d87f979ea98a19614f164a0d49fccc1be926e789;p=libdcp.git diff --git a/src/encrypted_kdm.h b/src/encrypted_kdm.h index 0d459d5a..85cd348c 100644 --- a/src/encrypted_kdm.h +++ b/src/encrypted_kdm.h @@ -1,20 +1,20 @@ /* - Copyright (C) 2013-2014 Carl Hetherington + Copyright (C) 2013-2016 Carl Hetherington - This program is free software; you can redistribute it and/or modify + This file is part of libdcp. + + libdcp is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + libdcp is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - + along with libdcp. If not, see . */ /** @file src/encrypted_kdm.h @@ -27,6 +27,7 @@ #include "local_time.h" #include "types.h" #include +#include #include namespace cxml { @@ -39,7 +40,7 @@ namespace data { class EncryptedKDMData; } -class Signer; +class CertificateChain; class Certificate; /** @class EncryptedKDM @@ -52,11 +53,7 @@ class Certificate; class EncryptedKDM { public: - /** Read a KDM from an XML file. - * @param file XML file to read. - */ - EncryptedKDM (boost::filesystem::path file); - + EncryptedKDM (std::string); EncryptedKDM (EncryptedKDM const & kdm); EncryptedKDM & operator= (EncryptedKDM const &); ~EncryptedKDM (); @@ -74,28 +71,37 @@ public: * keys (also key id, CPL id etc.) */ std::list keys () const; - + + boost::optional annotation_text () const; + std::string content_title_text () const; + std::string issue_date () const; + std::string cpl_id () const; + private: friend class DecryptedKDM; /** Construct an EncryptedKDM from a set of details */ EncryptedKDM ( - boost::shared_ptr signer, - boost::shared_ptr recipient, + boost::shared_ptr signer, + Certificate recipient, + std::vector trusted_devices, std::string device_list_description, std::string cpl_id, std::string cpl_content_title_text, + boost::optional annotation_text, LocalTime not_valid_before, LocalTime not_valid_after, Formulation formulation, std::list > key_ids, std::list keys ); - + data::EncryptedKDMData* _data; }; +extern bool operator== (EncryptedKDM const & a, EncryptedKDM const & b); + } #endif