Tidying.
[libdcp.git] / src / reel.h
index 041e1ca117e5cb1180e75e1b516e87c04efa6c70..c81724cb7387575541f868a43ef3b96d8c90db8f 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2020 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of libdcp.
 
     files in the program, then also delete it here.
 */
 
+
+/** @file  src/reel.cc
+ *  @brief Reel class
+ */
+
+
 #ifndef LIBDCP_REEL_H
 #define LIBDCP_REEL_H
 
+
 #include "key.h"
 #include "types.h"
 #include "ref.h"
 #include <memory>
 #include <boost/function.hpp>
-#include <list>
+
 
 namespace cxml {
        class Node;
 }
 
+
 namespace xmlpp {
        class Element;
 }
 
+
 namespace dcp {
 
+
 class DecryptedKDM;
 class ReelAsset;
 class ReelPictureAsset;
@@ -61,6 +71,7 @@ class ReelClosedCaptionAsset;
 class ReelAtmosAsset;
 class Content;
 
+
 /** @brief A reel within a DCP; the part which actually refers to picture, sound, subtitle, marker and Atmos data */
 class Reel : public Object
 {
@@ -99,7 +110,7 @@ public:
                return _main_markers;
        }
 
-       std::list<std::shared_ptr<ReelClosedCaptionAsset> > closed_captions () const {
+       std::vector<std::shared_ptr<ReelClosedCaptionAsset>> closed_captions () const {
                return _closed_captions;
        }
 
@@ -111,24 +122,25 @@ public:
 
        void add (std::shared_ptr<ReelAsset> asset);
 
-       std::list<std::shared_ptr<ReelAsset> > assets () const;
+       std::vector<std::shared_ptr<ReelAsset>> assets () const;
 
        xmlpp::Element* write_to_cpl (xmlpp::Element* node, Standard standard) const;
 
-       bool encrypted () const;
+       bool any_encrypted () const;
+       bool all_encrypted () const;
 
        bool equals (std::shared_ptr<const Reel> other, EqualityOptions opt, NoteHandler notes) const;
 
        void add (DecryptedKDM const &);
 
-       void resolve_refs (std::list<std::shared_ptr<Asset> >);
+       void resolve_refs (std::vector<std::shared_ptr<Asset>>);
 
 private:
        std::shared_ptr<ReelPictureAsset> _main_picture;
        std::shared_ptr<ReelSoundAsset> _main_sound;
        std::shared_ptr<ReelSubtitleAsset> _main_subtitle;
        std::shared_ptr<ReelMarkersAsset> _main_markers;
-       std::list<std::shared_ptr<ReelClosedCaptionAsset> > _closed_captions;
+       std::vector<std::shared_ptr<ReelClosedCaptionAsset>> _closed_captions;
        std::shared_ptr<ReelAtmosAsset> _atmos;
 };