Rename ReelMXF -> ReelFileAsset.
[libdcp.git] / src / cpl.h
index d96181e5b07bc9817ad373584ae37a24c13db23e..72818fb14d98418f61a48c07f0865fb46edbef04 100644 (file)
--- a/src/cpl.h
+++ b/src/cpl.h
@@ -33,7 +33,7 @@
 
 
 /** @file  src/cpl.h
- *  @brief CPL class.
+ *  @brief CPL class
  */
 
 
 #include <vector>
 
 
-struct verify_various_invalid_languages;
+struct verify_invalid_language3;
 
 
 namespace dcp {
 
 
-class ReelMXF;
+class ReelFileAsset;
 class Reel;
 class MXFMetadata;
 class CertificateChain;
@@ -67,12 +67,14 @@ class DecryptedKDM;
 
 
 /** @class CPL
- *  @brief A Composition Playlist.
+ *  @brief A Composition Playlist
  */
 class CPL : public Asset
 {
 public:
        CPL (std::string annotation_text, ContentKind content_kind);
+
+       /** Construct a CPL object from a XML file */
        explicit CPL (boost::filesystem::path file);
 
        bool equals (
@@ -81,7 +83,15 @@ public:
                NoteHandler note
                ) const;
 
+       /** Add a reel to this CPL
+        *  @param reel Reel to add
+        */
        void add (std::shared_ptr<Reel> reel);
+
+       /** Add a KDM to this CPL.  If the KDM is for any of this CPLs assets it will be used
+        *  to decrypt those assets.
+        *  @param kdm KDM.
+        */
        void add (DecryptedKDM const &);
 
        /** @return the reels in this CPL */
@@ -89,12 +99,22 @@ public:
                return _reels;
        }
 
-       /** @return the ReelMXFs in this CPL in all reels */
-       std::vector<std::shared_ptr<const ReelMXF>> reel_mxfs () const;
-       std::vector<std::shared_ptr<ReelMXF>> reel_mxfs ();
+       /** @return the ReelFileAssets in this CPL in all reels */
+       std::vector<std::shared_ptr<const ReelFileAsset>> reel_file_assets () const;
+       std::vector<std::shared_ptr<ReelFileAsset>> reel_file_assets ();
+
+       /** @return true if we have any encrypted content */
+       bool any_encrypted () const;
 
-       bool encrypted () const;
+       /** @return true if we have all our encryptable content is encrypted */
+       bool all_encrypted () const;
 
+       /** Write an CompositonPlaylist XML file
+        *
+        *  @param file Filename to write
+        *  @param standard INTEROP or SMPTE
+        *  @param signer Signer to sign the CPL, or 0 to add no signature
+        */
        void write_xml (
                boost::filesystem::path file,
                Standard standard,
@@ -292,7 +312,7 @@ protected:
        std::string pkl_type (Standard standard) const;
 
 private:
-       friend struct ::verify_various_invalid_languages;
+       friend struct ::verify_invalid_language3;
 
        void maybe_write_composition_metadata_asset (xmlpp::Element* node) const;
        void read_composition_metadata_asset (cxml::ConstNodePtr node);