2 Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
4 This file is part of DCP-o-matic.
6 DCP-o-matic is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 DCP-o-matic is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
21 #include "editable_list.h"
22 #include <dcp/certificate.h>
24 #include <boost/shared_ptr.hpp>
25 #include <boost/optional.hpp>
28 class CertificateFileDialogWrapper;
30 class ScreenDialog : public wxDialog
36 std::string name = "",
37 std::string notes = "",
38 boost::optional<dcp::Certificate> c = boost::optional<dcp::Certificate> (),
39 std::vector<dcp::Certificate> d = std::vector<dcp::Certificate> ()
42 std::string name () const;
43 std::string notes () const;
44 boost::optional<dcp::Certificate> recipient () const;
45 std::vector<dcp::Certificate> trusted_devices () {
46 return _trusted_devices;
50 void get_recipient_from_file ();
51 void load_recipient (boost::filesystem::path);
52 void download_recipient ();
53 void setup_sensitivity ();
54 void set_recipient (boost::optional<dcp::Certificate>);
56 void set_trusted_devices (std::vector<dcp::Certificate> d) {
60 wxGridBagSizer* _sizer;
63 wxStaticText* _recipient_thumbprint;
64 wxButton* _get_recipient_from_file;
65 wxButton* _download_recipient;
66 EditableList<dcp::Certificate, CertificateFileDialogWrapper>* _trusted_device_list;
68 boost::optional<dcp::Certificate> _recipient;
69 std::vector<dcp::Certificate> _trusted_devices;