Fix a couple of errors in Interop XML
[libdcp.git] / src / cpl.h
index 91756d3a81abf573b75795a8f1c172f41aed2ded..c50d8f903a790a9619c23c99f693c3363b3b3610 100644 (file)
--- a/src/cpl.h
+++ b/src/cpl.h
@@ -29,6 +29,7 @@
 #include <libxml++/libxml++.h>
 #include "types.h"
 #include "certificates.h"
+#include "key.h"
 
 namespace libdcp {
 
@@ -48,8 +49,8 @@ class KDM;
 class CPL
 {
 public:
-       CPL (std::string directory, std::string name, ContentKind content_kind, int length, int frames_per_second);
-       CPL (std::string directory, std::string file, std::list<PathAssetMap> asset_maps, bool require_mxfs = true);
+       CPL (boost::filesystem::path directory, std::string name, ContentKind content_kind, int length, int frames_per_second);
+       CPL (boost::filesystem::path, std::string file, std::list<PathAssetMap> asset_maps, bool require_mxfs = true);
 
        void add_reel (boost::shared_ptr<Reel> reel);
        
@@ -85,6 +86,8 @@ public:
 
        bool encrypted () const;
 
+       void set_mxf_keys (Key);
+
        std::string id () const {
                return _id;
        }
@@ -93,32 +96,14 @@ public:
        
        void write_xml (bool, XMLMetadata const &, boost::shared_ptr<const Signer>) const;
        void write_to_assetmap (xmlpp::Node *) const;
-       void write_to_pkl (xmlpp::Node *) const;
-
-       /** Make a KDM for this CPL.
-        *  @param signer Details of the certificates and private key to sign the KDM with.
-        *  @param recipient_cert The certificate of the projector that this KDM is targeted at.  This will contain the
-        *  projector's public key which is used to encrypt the content keys.
-        *  @param from Time that the KDM should be valid from.
-        *  @param until Time that the KDM should be valid until.
-        *  @param interop true to generate an interop KDM, false for SMPTE.
-        */
-       boost::shared_ptr<xmlpp::Document> make_kdm (
-               boost::shared_ptr<const Signer> signer,
-               boost::shared_ptr<const Certificate> recipient_cert,
-               boost::posix_time::ptime from,
-               boost::posix_time::ptime until,
-               bool interop,
-               MXFMetadata const &,
-               XMLMetadata const &
-               ) const;
+       void write_to_pkl (xmlpp::Node *, bool) const;
 
        void add_kdm (KDM const &);
        
 private:
        std::pair<std::string, boost::shared_ptr<const parse::AssetMapAsset> > asset_from_id (std::list<PathAssetMap>, std::string id) const;
        
-       std::string _directory;
+       boost::filesystem::path _directory;
        /** the name of the DCP */
        std::string _name;
        /** the content kind of the CPL */