Tidy up interop API.
[libdcp.git] / src / dcp.h
index 42c48387cee6591808c34cee14c33e429d4c1813..d6237e8af4ae14eff89d80306b4de8b621d0546d 100644 (file)
--- a/src/dcp.h
+++ b/src/dcp.h
@@ -48,12 +48,13 @@ class Reel;
 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
@@ -77,7 +78,7 @@ public:
        /** Write the required XML files to the directory that was
         *  passed into the constructor.
         */
-       void write_xml (XMLMetadata const &, boost::shared_ptr<Encryption> crypt = boost::shared_ptr<Encryption> ()) 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.
@@ -92,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.
         */
@@ -106,7 +111,7 @@ private:
        /** Write the PKL file.
         *  @param pkl_uuid UUID to use.
         */
-       std::string write_pkl (std::string pkl_uuid, XMLMetadata const &, boost::shared_ptr<Encryption>) 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;
@@ -115,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;
@@ -129,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;
 };
 
 }