summaryrefslogtreecommitdiff
path: root/src/lib/kdm_recipient.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/kdm_recipient.h')
-rw-r--r--src/lib/kdm_recipient.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/lib/kdm_recipient.h b/src/lib/kdm_recipient.h
index f18e71429..9fe75874d 100644
--- a/src/lib/kdm_recipient.h
+++ b/src/lib/kdm_recipient.h
@@ -36,11 +36,18 @@ LIBDCP_ENABLE_WARNINGS
class KDMRecipient
{
public:
- KDMRecipient (std::string const& name_, std::string const& notes_, boost::optional<dcp::Certificate> recipient_, boost::optional<std::string> recipient_file_)
+ KDMRecipient (std::string const& name_, std::string const& notes_, boost::optional<dcp::Certificate> recipient, boost::optional<std::string> recipient_file_)
: name (name_)
, notes (notes_)
- , recipient (recipient_)
, recipient_file (recipient_file_)
+ , _recipient(recipient)
+ {}
+
+ KDMRecipient(std::string const& name_, std::string const& notes_, boost::optional<std::string> recipient, boost::optional<std::string> recipient_file_)
+ : name(name_)
+ , notes(notes_)
+ , recipient_file(recipient_file_)
+ , _recipient_string(recipient)
{}
explicit KDMRecipient (cxml::ConstNodePtr);
@@ -49,13 +56,22 @@ public:
virtual void as_xml (xmlpp::Element *) const;
+ boost::optional<dcp::Certificate> recipient() const;
+ void set_recipient(boost::optional<dcp::Certificate> certificate);
+
std::string name;
std::string notes;
- boost::optional<dcp::Certificate> recipient;
/** The pathname or URL that the recipient certificate was obtained from; purely
* to inform the user.
*/
boost::optional<std::string> 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<dcp::Certificate> _recipient;
+ boost::optional<std::string> _recipient_string;
};