Add CPL::set().
authorCarl Hetherington <cth@carlh.net>
Mon, 25 Apr 2022 22:32:21 +0000 (00:32 +0200)
committerCarl Hetherington <cth@carlh.net>
Mon, 25 Apr 2022 22:32:21 +0000 (00:32 +0200)
src/cpl.cc
src/cpl.h

index 1f20d13e2e77509b01543cc48636efed36e01af2..815f9a767e9bd2069ff6bc104a1bf2adf890bd10 100644 (file)
@@ -171,6 +171,13 @@ CPL::add (std::shared_ptr<Reel> reel)
 }
 
 
+void
+CPL::set (std::vector<std::shared_ptr<Reel>> reels)
+{
+       _reels = reels;
+}
+
+
 void
 CPL::write_xml (boost::filesystem::path file, shared_ptr<const CertificateChain> signer) const
 {
@@ -700,7 +707,7 @@ CPL::unset_version_number ()
 void
 CPL::set_content_versions (vector<ContentVersion> v)
 {
-       set<string> ids;
+       std::set<string> ids;
        for (auto i: v) {
                if (!ids.insert(i.id).second) {
                        throw DuplicateIdError ("Duplicate ID in ContentVersion list");
index 43c8a56ebb3f9f19e6e5b120fe01959316a74705..439aeda0d539452b40feff167a937ff8f31d48b1 100644 (file)
--- a/src/cpl.h
+++ b/src/cpl.h
@@ -95,6 +95,8 @@ public:
         */
        void add (std::shared_ptr<Reel> reel);
 
+       void set (std::vector<std::shared_ptr<Reel>> reels);
+
        /** 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.