swaroop: add name to ECinema KDMs and add DKDM wrapper for ECinema.
[dcpomatic.git] / src / lib / encrypted_ecinema_kdm.h
index decf9e9d521cd1f63b954474f1ab1c20862a4333..0bcbc4117f0bbe7172b18f6a025813193161febf 100644 (file)
@@ -20,6 +20,9 @@
 
 #ifdef DCPOMATIC_VARIANT_SWAROOP
 
+#ifndef DCPOMATIC_ENCRYPTED_ECINEMA_KDM_H
+#define DCPOMATIC_ENCRYPTED_ECINEMA_KDM_H
+
 #include <dcp/key.h>
 #include <dcp/data.h>
 #include <dcp/certificate.h>
@@ -29,14 +32,33 @@ class DecryptedECinemaKDM;
 class EncryptedECinemaKDM
 {
 public:
+       explicit EncryptedECinemaKDM (std::string xml);
+
+       std::string as_xml () const;
+
+       std::string id () const {
+               return _id;
+       }
+
+       std::string name () const {
+               return _name;
+       }
+
+       dcp::Data key () const {
+               return _content_key;
+       }
 
 private:
        friend class DecryptedECinemaKDM;
 
-       EncryptedECinemaKDM (dcp::Key key, dcp::Certificate recipient);
+       EncryptedECinemaKDM (std::string id, std::string name, dcp::Key key, dcp::Certificate recipient);
 
+       std::string _id;
+       std::string _name;
        /** encrypted content key */
        dcp::Data _content_key;
 };
 
 #endif
+
+#endif