X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fdcp.h;h=7d3d670aa891a4e35e20ea2736d059f70554d64d;hb=refs%2Ftags%2Fv1.8.63;hp=48c36e7ae79464142cd2e69a193fb2a7f03b169e;hpb=7c24b62d51e0ddf14af451ef5a543f07b69f111e;p=libdcp.git diff --git a/src/dcp.h b/src/dcp.h index 48c36e7a..7d3d670a 100644 --- a/src/dcp.h +++ b/src/dcp.h @@ -95,6 +95,9 @@ public: DCP (DCP const&) = delete; DCP& operator= (DCP const&) = delete; + DCP (DCP &&); + DCP& operator= (DCP &&); + /** Read a DCP. This method does not do any deep checking of the DCP's validity, but * if it comes across any bad things it will do one of two things. * @@ -142,20 +145,17 @@ public: */ void add (DecryptedKDM const &); - /** Write all the XML files for this DCP + void set_issuer(std::string issuer); + void set_creator(std::string creator); + void set_issue_date(std::string issue_date); + void set_annotation_text(std::string annotation_text); + + /** Write all the XML files for this DCP. * @param standand INTEROP or SMPTE - * @param issuer Value for the PKL and AssetMap tags - * @param creator Value for the PKL and AssetMap tags - * @param issue_date Value for the PKL and AssetMap tags - * @param annotation_text Value for the PKL and AssetMap tags * @param signer Signer to use * @param name_format Name format to use for the CPL and PKL filenames */ void write_xml ( - std::string issuer = String::compose("libdcp %1", dcp::version), - std::string creator = String::compose("libdcp %1", dcp::version), - std::string issue_date = LocalTime().as_string(), - std::string annotation_text = String::compose("Created by libdcp %1", dcp::version), std::shared_ptr signer = std::shared_ptr(), NameFormat name_format = NameFormat("%t") ); @@ -182,12 +182,16 @@ public: return _pkls; } - boost::optional asset_map_path() { + boost::optional asset_map_file() const { if (!_asset_map) { return {}; } - return _asset_map->path(); + return _asset_map->file(); + } + + boost::optional asset_map() const { + return _asset_map; } static std::vector directories_from_files (std::vector files); @@ -203,6 +207,12 @@ private: /** The PKLs that make up this DCP */ std::vector> _pkls; boost::optional _asset_map; + + /* Metadata to use for newly created PKLs and AssetMaps */ + boost::optional _new_issuer; + boost::optional _new_creator; + boost::optional _new_issue_date; + boost::optional _new_annotation_text; };