diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-05-03 23:31:29 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-05-03 23:32:50 +0200 |
| commit | 2a1c9e9cfeb1049b1ea0e3b300029218f652f002 (patch) | |
| tree | 5e4e3849b99f7ba69a6372a523a66af58d465b5d /src/lib/recipient_with_dkdm.h | |
| parent | 348d7b4a29552204a8d049105a623b15a5786693 (diff) | |
wip: stuff.
Diffstat (limited to 'src/lib/recipient_with_dkdm.h')
| -rw-r--r-- | src/lib/recipient_with_dkdm.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/src/lib/recipient_with_dkdm.h b/src/lib/recipient_with_dkdm.h new file mode 100644 index 000000000..8aed95275 --- /dev/null +++ b/src/lib/recipient_with_dkdm.h @@ -0,0 +1,55 @@ +/* + Copyright (C) 2020 Carl Hetherington <cth@carlh.net> + + This file is part of DCP-o-matic. + + DCP-o-matic is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + DCP-o-matic is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>. + +*/ + +#ifndef DCPOMATIC_RECIPIENT_WITH_DKDM_H +#define DCPOMATIC_RECIPIENT_WITH_DKDM_H + +#include "dkdm_recipient.h" +#include <dcp/encrypted_kdm.h> +#include <dcp/name_format.h> + +class RecipientWithDKDM +{ +public: + RecipientWithDKDM (boost::shared_ptr<DKDMRecipient> r, dcp::EncryptedKDM k) + : recipient (r) + , kdm (k) + {} + + void make_zip_file (boost::filesystem::path zip_file, dcp::NameFormat name_format, dcp::NameFormat::Map name_values) const; + + static int write_files ( + std::vector<RecipientWithDKDM> kdms, boost::filesystem::path directory, + dcp::NameFormat name_format, dcp::NameFormat::Map name_values, + boost::function<bool (boost::filesystem::path)> confirm_overwrite + ); + + static void email ( + std::vector<RecipientWithDKDM> kdms, + dcp::NameFormat filename_format, + dcp::NameFormat::Map name_values, + std::string cpl_name + ); + + boost::shared_ptr<DKDMRecipient> recipient; + dcp::EncryptedKDM kdm; +}; + +#endif |
