summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-04-23 22:35:12 +0200
committerCarl Hetherington <cth@carlh.net>2022-04-23 22:35:12 +0200
commit972f4ac422c52d5c695e78cf5daa405175fae4d7 (patch)
tree2830e6f3be52ece4762a47f5e8aa047dace4cc15 /src
parent59ba9648836cb96795dc93531967737f0ecea053 (diff)
Add CPL::set
Diffstat (limited to 'src')
-rw-r--r--src/cpl.cc9
-rw-r--r--src/cpl.h2
2 files changed, 10 insertions, 1 deletions
diff --git a/src/cpl.cc b/src/cpl.cc
index 1f20d13e..815f9a76 100644
--- a/src/cpl.cc
+++ b/src/cpl.cc
@@ -172,6 +172,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
{
xmlpp::Document doc;
@@ -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");
diff --git a/src/cpl.h b/src/cpl.h
index 43c8a56e..439aeda0 100644
--- 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.