summaryrefslogtreecommitdiff
path: root/src/cpl.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-01-19 00:32:53 +0100
committerCarl Hetherington <cth@carlh.net>2021-01-19 00:32:53 +0100
commit1f284533185a798c0ed36669bd6c9729adf6ec5a (patch)
tree94dd3de07e0670f1bf1eed0de94ada1033ceb7f6 /src/cpl.cc
parent37631b4d5e07eddbf052c1cff315d6a98b3bcb73 (diff)
Rename encrypted() to any_encrypted() and add all_encrypted().
Diffstat (limited to 'src/cpl.cc')
-rw-r--r--src/cpl.cc19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/cpl.cc b/src/cpl.cc
index 76f6002b..a976e072 100644
--- a/src/cpl.cc
+++ b/src/cpl.cc
@@ -584,10 +584,10 @@ CPL::equals (shared_ptr<const Asset> other, EqualityOptions opt, NoteHandler not
/** @return true if we have any encrypted content */
bool
-CPL::encrypted () const
+CPL::any_encrypted () const
{
for (auto i: _reels) {
- if (i->encrypted ()) {
+ if (i->any_encrypted()) {
return true;
}
}
@@ -595,6 +595,21 @@ CPL::encrypted () const
return false;
}
+
+/** @return true if we have all our encryptable content is encrypted */
+bool
+CPL::all_encrypted () const
+{
+ for (auto i: _reels) {
+ if (!i->all_encrypted()) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+
/** 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.