diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-01-19 00:32:53 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-01-19 00:32:53 +0100 |
| commit | 1f284533185a798c0ed36669bd6c9729adf6ec5a (patch) | |
| tree | 94dd3de07e0670f1bf1eed0de94ada1033ceb7f6 /src/cpl.cc | |
| parent | 37631b4d5e07eddbf052c1cff315d6a98b3bcb73 (diff) | |
Rename encrypted() to any_encrypted() and add all_encrypted().
Diffstat (limited to 'src/cpl.cc')
| -rw-r--r-- | src/cpl.cc | 19 |
1 files changed, 17 insertions, 2 deletions
@@ -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. |
