Add test() to cscript.
[libdcp.git] / src / reel.h
index 2148e122c6b05bc19b943c9645698b94389bab19..35302f17d96cdd0baf52a69314953b1adce07a73 100644 (file)
 
 */
 
+#ifndef LIBDCP_REEL_H
+#define LIBDCP_REEL_H
+
 #include <list>
 #include <boost/shared_ptr.hpp>
+#include <boost/function.hpp>
+#include <libxml++/libxml++.h>
+#include "key.h"
 #include "types.h"
 
+namespace xmlpp {
+       class Node;
+}
+
 namespace libdcp {
 
 class PictureAsset;
-class SoundAsset;      
-class SubtitleAsset;   
+class SoundAsset;
+class SubtitleAsset;
+class KDM;     
 
+/** @brief A reel within a DCP; the part which actually contains picture, sound and subtitle data */   
 class Reel
 {
 public:
        Reel (
-               boost::shared_ptr<const PictureAsset> picture,
-               boost::shared_ptr<const SoundAsset> sound,
-               boost::shared_ptr<const SubtitleAsset> subtitle
+               boost::shared_ptr<PictureAsset> picture,
+               boost::shared_ptr<SoundAsset> sound,
+               boost::shared_ptr<SubtitleAsset> subtitle
                )
                : _main_picture (picture)
                , _main_sound (sound)
@@ -52,16 +64,22 @@ public:
                return _main_subtitle;
        }
 
-       void write_to_cpl (std::ostream & s) const;
-       void write_to_pkl (std::ostream & s) const;
-       void write_to_assetmap (std::ostream & s) const;
+       void write_to_cpl (xmlpp::Element *) const;
 
-       std::list<std::string> equals (boost::shared_ptr<const Reel> other, EqualityOptions opt) const;
+       bool encrypted () const;
+
+       void set_mxf_keys (libdcp::Key);
+       
+       bool equals (boost::shared_ptr<const Reel> other, EqualityOptions opt, boost::function<void (NoteType, std::string)> notes) const;
+
+       void add_kdm (KDM const &);
 
 private:
-       boost::shared_ptr<const PictureAsset> _main_picture;
-       boost::shared_ptr<const SoundAsset> _main_sound;
-       boost::shared_ptr<const SubtitleAsset> _main_subtitle;
+       boost::shared_ptr<PictureAsset> _main_picture;
+       boost::shared_ptr<SoundAsset> _main_sound;
+       boost::shared_ptr<SubtitleAsset> _main_subtitle;
 };
 
 }
+
+#endif