+ /** Add a reel to this CPL
+ * @param reel Reel to add
+ */
+ void add (std::shared_ptr<Reel> reel);
+
+ /** 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.
+ */
+ void add (DecryptedKDM const &);
+
+ /** @return the reels in this CPL */
+ std::vector<std::shared_ptr<Reel>> reels () const {
+ return _reels;
+ }
+
+ /** @return the ReelEncryptableAssets in this CPL in all reels */
+ std::vector<std::shared_ptr<const ReelEncryptableAsset>> reel_file_assets () const;
+ std::vector<std::shared_ptr<ReelEncryptableAsset>> reel_file_assets ();
+
+ /** @return true if we have any encrypted content */
+ bool any_encrypted () const;
+
+ /** @return true if we have all our encryptable content is encrypted */
+ bool all_encrypted () const;
+
+ /** Write an CompositonPlaylist XML file
+ *
+ * @param file Filename to write
+ * @param standard INTEROP or SMPTE
+ * @param signer Signer to sign the CPL, or 0 to add no signature
+ */
+ void write_xml (
+ boost::filesystem::path file,
+ Standard standard,
+ std::shared_ptr<const CertificateChain>
+ ) const;
+
+ void resolve_refs (std::vector<std::shared_ptr<Asset>>);
+
+ int64_t duration () const;
+
+ void set_issuer (std::string issuer) {
+ _issuer = issuer;
+ }
+
+ void set_creator (std::string creator) {
+ _creator = creator;
+ }
+
+ void set_issue_date (std::string issue_date) {
+ _issue_date = issue_date;
+ }
+
+ /** @return contents of the <AnnotationText> node, if present */
+ boost::optional<std::string> annotation_text () const {
+ return _annotation_text;
+ }
+
+ void set_annotation_text (std::string at) {
+ _annotation_text = at;
+ }
+
+ /** @return contents of the <ContentTitleText> node */
+ std::string content_title_text () const {
+ return _content_title_text;
+ }
+
+ void set_content_title_text (std::string ct) {
+ _content_title_text = ct;
+ }
+
+ void set_content_kind (dcp::ContentKind k) {
+ _content_kind = k;