/* Copyright (C) 2020-2021 Carl Hetherington This file is part of DCP-o-matic. DCP-o-matic 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. DCP-o-matic 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 DCP-o-matic. If not, see . */ #ifndef DCPOMATIC_KDM_RECIPIENT_H #define DCPOMATIC_KDM_RECIPIENT_H #include #include #include LIBDCP_DISABLE_WARNINGS #include LIBDCP_ENABLE_WARNINGS #include #include class KDMRecipient { public: KDMRecipient (std::string const& name_, std::string const& notes_, boost::optional recipient, boost::optional recipient_file_) : name (name_) , notes (notes_) , recipient_file (recipient_file_) , _recipient(recipient) {} KDMRecipient(std::string const& name_, std::string const& notes_, boost::optional recipient, boost::optional recipient_file_) : name(name_) , notes(notes_) , recipient_file(recipient_file_) , _recipient_string(recipient) {} explicit KDMRecipient (cxml::ConstNodePtr); virtual ~KDMRecipient () {} virtual void as_xml (xmlpp::Element *) const; boost::optional recipient() const; void set_recipient(boost::optional certificate); std::string name; std::string notes; /** The pathname or URL that the recipient certificate was obtained from; purely * to inform the user. */ boost::optional recipient_file; private: /* The recipient certificate may be stored as either a string or a dcp::Certificate; * the string is useful if we want to be lazy about constructing the dcp::Certificate. */ boost::optional _recipient; boost::optional _recipient_string; }; #endif