list<ScreenKDM> kdms;
BOOST_FOREACH (shared_ptr<Screen> i, screens) {
- if (i->certificate) {
- kdms.push_back (ScreenKDM (i, make_kdm (i->certificate.get(), dcp, from, until, formulation)));
+ if (i->recipient) {
+ kdms.push_back (ScreenKDM (i, make_kdm (i->recipient.get(), dcp, from, until, formulation)));
}
}
: name (node->string_child ("Name"))
{
if (node->optional_string_child ("Certificate")) {
- certificate = dcp::Certificate (node->string_child ("Certificate"));
+ recipient = dcp::Certificate (node->string_child ("Certificate"));
+ } else if (node->optional_string_child ("Recipient")) {
+ recipient = dcp::Certificate (node->string_child ("Recipient"));
}
}
Screen::as_xml (xmlpp::Element* parent) const
{
parent->add_child("Name")->add_child_text (name);
- if (certificate) {
- parent->add_child("Certificate")->add_child_text (certificate->certificate (true));
+ if (recipient) {
+ parent->add_child("Recipient")->add_child_text (recipient->certificate (true));
}
}
* @brief A representation of a Screen for KDM generation.
*
* This is the name of the screen and the certificate of its
- * server.
+ * `recipient' (i.e. the servers).
*/
class Screen
{
public:
- Screen (std::string const & n, boost::optional<dcp::Certificate> cert)
+ Screen (std::string const & n, boost::optional<dcp::Certificate> rec)
: name (n)
- , certificate (cert)
+ , recipient (rec)
{}
Screen (cxml::ConstNodePtr);
boost::shared_ptr<Cinema> cinema;
std::string name;
- boost::optional<dcp::Certificate> certificate;
+ boost::optional<dcp::Certificate> recipient;
};
list<ScreenKDM> screen_kdms;
BOOST_FOREACH (shared_ptr<Screen> i, _screens->screens()) {
- if (!i->certificate) {
+ if (!i->recipient) {
continue;
}
}
/* Encrypt */
- screen_kdms.push_back (ScreenKDM (i, kdm.encrypt (signer, i->certificate.get(), _output->formulation())));
+ screen_kdms.push_back (ScreenKDM (i, kdm.encrypt (signer, i->recipient.get(), _output->formulation())));
}
if (_output->write_to()) {
pair<wxTreeItemId, shared_ptr<Screen> > s = selected_screens().front();
- ScreenDialog* d = new ScreenDialog (this, "Edit screen", s.second->name, s.second->certificate);
+ ScreenDialog* d = new ScreenDialog (this, "Edit screen", s.second->name, s.second->recipient);
if (d->ShowModal () == wxID_OK) {
s.second->name = d->name ();
- s.second->certificate = d->certificate ();
+ s.second->recipient = d->certificate ();
_targets->SetItemText (s.first, std_to_wx (d->name()));
Config::instance()->changed ();
}