X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdkdm_wrapper.h;h=0c2992bc41f6f1d413b8eefce6a90b3a1a3a80f6;hb=5fa04f74b6ac83fe985f9c64ce069151d560dbae;hp=d828ffac2536a4298563764ae58a4c390321aa03;hpb=6cde6bcc0b604c1a157a4ccbdce29e91f4d45a91;p=dcpomatic.git diff --git a/src/lib/dkdm_wrapper.h b/src/lib/dkdm_wrapper.h index d828ffac2..0c2992bc4 100644 --- a/src/lib/dkdm_wrapper.h +++ b/src/lib/dkdm_wrapper.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2017 Carl Hetherington + Copyright (C) 2017-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,40 +18,42 @@ */ -#ifdef DCPOMATIC_VARIANT_SWAROOP -#include "encrypted_ecinema_kdm.h" -#endif + #include #include -#include +#include + namespace xmlpp { class Element; } + class DKDMGroup; -class DKDMBase : public boost::enable_shared_from_this + +class DKDMBase : public std::enable_shared_from_this { public: virtual ~DKDMBase () {} virtual std::string name () const = 0; virtual void as_xml (xmlpp::Element *) const = 0; - static boost::shared_ptr read (cxml::ConstNodePtr node); + static std::shared_ptr read (cxml::ConstNodePtr node); - boost::shared_ptr parent () const { + std::shared_ptr parent () const { return _parent; } - void set_parent (boost::shared_ptr parent) { + void set_parent (std::shared_ptr parent) { _parent = parent; } private: - boost::shared_ptr _parent; + std::shared_ptr _parent; }; + class DKDM : public DKDMBase { public: @@ -70,25 +72,6 @@ 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 { @@ -103,14 +86,14 @@ public: void as_xml (xmlpp::Element *) const; - std::list > children () const { + std::list> children () const { return _children; } - void add (boost::shared_ptr child, boost::shared_ptr previous = boost::shared_ptr ()); - void remove (boost::shared_ptr child); + void add (std::shared_ptr child, std::shared_ptr previous = std::shared_ptr()); + void remove (std::shared_ptr child); private: std::string _name; - std::list > _children; + std::list> _children; };