Tidy up interop API.
[libdcp.git] / src / dcp.h
index 42c0c6d9b3efd70c0793d78a111b9600a249b606..d6237e8af4ae14eff89d80306b4de8b621d0546d 100644 (file)
--- a/src/dcp.h
+++ b/src/dcp.h
 #include <boost/shared_ptr.hpp>
 #include <boost/signals2.hpp>
 #include "types.h"
+#include "certificates.h"
 
 namespace xmlpp {
-       class Node;
+       class Document;
+       class Element;
 }
 
 /** @brief Namespace for everything in libdcp */
@@ -43,15 +45,16 @@ class PictureAsset;
 class SoundAsset;
 class SubtitleAsset;
 class Reel;
-class AssetMap;
 class CPL;
 class XMLMetadata;
+class Encryption;
+class KDM;
 
 /** @class DCP
  *  @brief A class to create or read a DCP.
  */
        
-class DCP
+class DCP : public boost::noncopyable
 {
 public:
        /** Construct a DCP.  You can pass an existing DCP's directory
@@ -75,7 +78,7 @@ public:
        /** Write the required XML files to the directory that was
         *  passed into the constructor.
         */
-       void write_xml (XMLMetadata const &) const;
+       void write_xml (bool interop, XMLMetadata const &, boost::shared_ptr<Encryption> crypt = boost::shared_ptr<Encryption> ()) const;
 
        /** Compare this DCP with another, according to various options.
         *  @param other DCP to compare this one to.
@@ -90,10 +93,14 @@ public:
        void add_cpl (boost::shared_ptr<CPL> cpl);
 
        /** @return The list of CPLs in this DCP */
-       std::list<boost::shared_ptr<const CPL> > cpls () const {
+       std::list<boost::shared_ptr<CPL> > cpls () const {
                return _cpls;
        }
 
+       bool encrypted () const;
+
+       void add_kdm (KDM const &);
+
        /** Emitted with a parameter between 0 and 1 to indicate progress
         *  for long jobs.
         */
@@ -104,7 +111,7 @@ private:
        /** Write the PKL file.
         *  @param pkl_uuid UUID to use.
         */
-       std::string write_pkl (std::string pkl_uuid, XMLMetadata const &) const;
+       std::string write_pkl (std::string pkl_uuid, bool, XMLMetadata const &, boost::shared_ptr<Encryption>) const;
        
        /** Write the VOLINDEX file */
        void write_volindex () const;
@@ -113,7 +120,7 @@ private:
         *  @param pkl_uuid UUID of our PKL.
         *  @param pkl_length Length of our PKL in bytes.
         */
-       void write_assetmap (std::string pkl_uuid, int pkl_length, XMLMetadata const &) const;
+       void write_assetmap (std::string pkl_uuid, int pkl_length, bool, XMLMetadata const &) const;
 
        /** @return Assets in all this CPLs in this DCP */
        std::list<boost::shared_ptr<const Asset> > assets () const;
@@ -127,7 +134,7 @@ private:
        /** the directory that we are writing to */
        std::string _directory;
        /** our CPLs */
-       std::list<boost::shared_ptr<const CPL> > _cpls;
+       std::list<boost::shared_ptr<CPL> > _cpls;
 };
 
 }