summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-04-26 00:32:21 +0200
committerCarl Hetherington <cth@carlh.net>2022-04-26 00:32:21 +0200
commit5c56edb56a36a06c3ea12b1df67f5ad45983cb0d (patch)
treef1aa911384b1ac0250caafa7c6da686741c36af5 /src
parentc7a9a5c9e368b1a5e657adbebd37d1bbc4984e62 (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.