X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdkdm_wrapper.h;h=d828ffac2536a4298563764ae58a4c390321aa03;hb=001ba1644fc6aa54f91fcaaa62ae7e5de2313bc1;hp=d3ee2a09566c34afaa48036fa8bff507ed6ccf9b;hpb=ba049fdab4a47023d6d5ee8b5ff9bbb710afbabb;p=dcpomatic.git diff --git a/src/lib/dkdm_wrapper.h b/src/lib/dkdm_wrapper.h index d3ee2a095..d828ffac2 100644 --- a/src/lib/dkdm_wrapper.h +++ b/src/lib/dkdm_wrapper.h @@ -18,6 +18,9 @@ */ +#ifdef DCPOMATIC_VARIANT_SWAROOP +#include "encrypted_ecinema_kdm.h" +#endif #include #include #include @@ -31,6 +34,7 @@ class DKDMGroup; class DKDMBase : public boost::enable_shared_from_this { public: + virtual ~DKDMBase () {} virtual std::string name () const = 0; virtual void as_xml (xmlpp::Element *) const = 0; @@ -51,7 +55,7 @@ private: class DKDM : public DKDMBase { public: - DKDM (dcp::EncryptedKDM k) + explicit DKDM (dcp::EncryptedKDM k) : _dkdm (k) {} @@ -66,10 +70,30 @@ private: dcp::EncryptedKDM _dkdm; }; +#ifdef DCPOMATIC_VARIANT_SWAROOP +class ECinemaDKDM : public DKDMBase +{ +public: + explicit ECinemaDKDM (EncryptedECinemaKDM k) + : _dkdm (k) + {} + + std::string name () const; + void as_xml (xmlpp::Element *) const; + + EncryptedECinemaKDM dkdm () const { + return _dkdm; + } + +private: + EncryptedECinemaKDM _dkdm; +}; +#endif + class DKDMGroup : public DKDMBase { public: - DKDMGroup (std::string name) + explicit DKDMGroup (std::string name) : _name (name) {} @@ -83,7 +107,7 @@ public: return _children; } - void add (boost::shared_ptr child); + void add (boost::shared_ptr child, boost::shared_ptr previous = boost::shared_ptr ()); void remove (boost::shared_ptr child); private: