summaryrefslogtreecommitdiff
path: root/src/lib/kdm_with_metadata.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-11-23 13:58:33 +0100
committerCarl Hetherington <cth@carlh.net>2020-11-23 13:58:33 +0100
commita332bd6be323f03dad5b180fb237afe54f1bf81e (patch)
tree70cf0da21c95941cda478717b15ea71aca4c0bdb /src/lib/kdm_with_metadata.h
parent1c11eaf92c5d592be6df07e2ac77cfcf65e3ed0c (diff)
Remove swaroop variant.
Diffstat (limited to 'src/lib/kdm_with_metadata.h')
-rw-r--r--src/lib/kdm_with_metadata.h42
1 files changed, 9 insertions, 33 deletions
diff --git a/src/lib/kdm_with_metadata.h b/src/lib/kdm_with_metadata.h
index b6bec1c4c..2e07334de 100644
--- a/src/lib/kdm_with_metadata.h
+++ b/src/lib/kdm_with_metadata.h
@@ -21,9 +21,6 @@
#ifndef DCPOMATIC_KDM_WITH_METADATA_H
#define DCPOMATIC_KDM_WITH_METADATA_H
-#ifdef DCPOMATIC_VARIANT_SWAROOP
-#include "encrypted_ecinema_kdm.h"
-#endif
#include <dcp/encrypted_kdm.h>
#include <dcp/name_format.h>
#include <boost/shared_ptr.hpp>
@@ -33,16 +30,20 @@ class Cinema;
class KDMWithMetadata
{
public:
- KDMWithMetadata (dcp::NameFormat::Map const& name_values, void const* group, std::list<std::string> emails)
+ KDMWithMetadata (dcp::NameFormat::Map const& name_values, void const* group, std::list<std::string> emails, dcp::EncryptedKDM kdm)
: _name_values (name_values)
, _group (group)
, _emails (emails)
+ , _kdm (kdm)
{}
- virtual ~KDMWithMetadata () {}
+ std::string kdm_as_xml () const {
+ return _kdm.as_xml ();
+ }
- virtual std::string kdm_as_xml () const = 0;
- virtual void kdm_as_xml (boost::filesystem::path out) const = 0;
+ void kdm_as_xml (boost::filesystem::path out) const {
+ return _kdm.as_xml (out);
+ }
dcp::NameFormat::Map const& name_values () const {
return _name_values;
@@ -62,6 +63,7 @@ private:
dcp::NameFormat::Map _name_values;
void const* _group;
std::list<std::string> _emails;
+ dcp::EncryptedKDM _kdm;
};
@@ -105,31 +107,5 @@ void email (
std::string cpl_name
);
-
-template <class T>
-class SpecialKDMWithMetadata : public KDMWithMetadata
-{
-public:
- SpecialKDMWithMetadata (dcp::NameFormat::Map const& name_values, void const* group, std::list<std::string> emails, T k)
- : KDMWithMetadata (name_values, group, emails)
- , kdm (k)
- {}
-
- std::string kdm_as_xml () const {
- return kdm.as_xml ();
- }
-
- void kdm_as_xml (boost::filesystem::path out) const {
- return kdm.as_xml (out);
- }
-
- T kdm;
-};
-
-typedef SpecialKDMWithMetadata<dcp::EncryptedKDM> DCPKDMWithMetadata;
-#ifdef DCPOMATIC_VARIANT_SWAROOP
-typedef SpecialKDMWithMetadata<EncryptedECinemaKDM> ECinemaKDMWithMetadata;
-#endif
-
#endif