Rename certificate -> recipient in Screen.
authorCarl Hetherington <cth@carlh.net>
Sun, 15 Nov 2015 01:17:12 +0000 (01:17 +0000)
committerCarl Hetherington <cth@carlh.net>
Sun, 15 Nov 2015 01:17:12 +0000 (01:17 +0000)
src/lib/film.cc
src/lib/screen.cc
src/lib/screen.h
src/tools/dcpomatic_kdm.cc
src/wx/screens_panel.cc

index 4691925bce3b12d0dfb8650c07c0037baae64dd0..d406152a19a494a865401979baa0e9e13eed749a 100644 (file)
@@ -1143,8 +1143,8 @@ Film::make_kdms (
        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)));
                }
        }
 
index 347e1d655a76aae7fc954bb4d7b69e7ec344b488..0876e770b03b4cd43b86d8d4892f11f45ec4a718 100644 (file)
@@ -24,7 +24,9 @@ Screen::Screen (cxml::ConstNodePtr node)
        : 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"));
        }
 }
 
@@ -32,7 +34,7 @@ void
 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));
        }
 }
index 6bac3ec14f12186b567324e34665c8283f4cee29..6e3b8b01dc32b0342100b80de96e900e355587cb 100644 (file)
@@ -28,14 +28,14 @@ class Cinema;
  *  @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);
@@ -44,5 +44,5 @@ public:
 
        boost::shared_ptr<Cinema> cinema;
        std::string name;
-       boost::optional<dcp::Certificate> certificate;
+       boost::optional<dcp::Certificate> recipient;
 };
index 6190f1416b9eeb76c66a5870c639338c0db9f84d..2c96f37b25be1a849bdf5ab3382220ca8829bd84 100644 (file)
@@ -264,7 +264,7 @@ private:
                        list<ScreenKDM> screen_kdms;
                        BOOST_FOREACH (shared_ptr<Screen> i, _screens->screens()) {
 
-                               if (!i->certificate) {
+                               if (!i->recipient) {
                                        continue;
                                }
 
@@ -279,7 +279,7 @@ private:
                                }
 
                                /* 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()) {
index 4f8e3ad4da21956e909099e2d9d5fc131381c881..2d47b65b55cea9129c3aaaeaf552e9017a1959ad 100644 (file)
@@ -244,10 +244,10 @@ ScreensPanel::edit_screen_clicked ()
 
        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 ();
        }