2 Copyright (C) 2020 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 #ifndef DCPOMATIC_DKDM_RECIPIENT_H
22 #define DCPOMATIC_DKDM_RECIPIENT_H
24 #include "kdm_recipient.h"
25 #include <dcp/certificate.h>
26 #include <libcxml/cxml.h>
28 class DKDMRecipient : public KDMRecipient
32 std::string const& name_,
33 std::string const& notes_,
34 boost::optional<dcp::Certificate> recipient_,
35 std::list<std::string> const& emails_,
37 int utc_offset_minute_)
38 : KDMRecipient (name_, notes_, recipient_)
40 , _utc_offset_hour (utc_offset_hour_)
41 , _utc_offset_minute (utc_offset_minute_)
44 explicit DKDMRecipient (cxml::ConstNodePtr node);
46 void as_xml (xmlpp::Element *) const;
48 void set_utc_offset_hour (int h);
49 void set_utc_offset_minute (int m);
51 int utc_offset_hour () const {
52 return _utc_offset_hour;
55 int utc_offset_minute () const {
56 return _utc_offset_minute;
59 std::list<std::string> emails;
62 /** Offset such that the equivalent time in UTC can be determined
63 by subtracting the offset from the local time.
66 /** Additional minutes to add to _utc_offset_hour if _utc_offset_hour is
67 positive, or to subtract if _utc_offset_hour is negative.
69 int _utc_offset_minute;