#include "compose.hpp"
#include "metadata.h"
#include "name_format.h"
-#include "types.h"
#include "util.h"
#include "verify.h"
#include "version.h"
{
-class PKL;
-class Content;
-class Reel;
+class Asset;
class CPL;
class CertificateChain;
+class Content;
class DecryptedKDM;
-class Asset;
+class EqualityOptions;
+class PKL;
class ReadError;
+class Reel;
/** @class DCP
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.
*
* @param note Functor to handle notes made by the equality operation.
* @return true if the DCPs are equal according to EqualityOptions, otherwise false.
*/
- bool equals (DCP const & other, EqualityOptions options, NoteHandler note) const;
+ bool equals(DCP const & other, EqualityOptions const& options, NoteHandler note) const;
void add (std::shared_ptr<CPL> cpl);
*/
void add (DecryptedKDM const &);
- /** Write all the XML files for this DCP
- * @param standand INTEROP or SMPTE
- * @param issuer Value for the PKL and AssetMap <Issuer> tags
- * @param creator Value for the PKL and AssetMap <Creator> tags
- * @param issue_date Value for the PKL and AssetMap <IssueDate> tags
- * @param annotation_text Value for the PKL and AssetMap <AnnotationText> tags
+ 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 signer Signer to use
+ * @param include_mca_subdescriptors true to write MCA subdescriptors to CPLs.
* @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),
+ void write_xml(
std::shared_ptr<const CertificateChain> signer = std::shared_ptr<const CertificateChain>(),
+ bool include_mca_subdescriptors = true,
NameFormat name_format = NameFormat("%t")
);
return _pkls;
}
- boost::optional<boost::filesystem::path> asset_map_path() {
+ boost::optional<boost::filesystem::path> asset_map_file() const {
if (!_asset_map) {
return {};
}
- return _asset_map->path();
+ return _asset_map->file();
+ }
+
+ boost::optional<AssetMap> asset_map() const {
+ return _asset_map;
}
static std::vector<boost::filesystem::path> directories_from_files (std::vector<boost::filesystem::path> files);
/** The PKLs that make up this DCP */
std::vector<std::shared_ptr<PKL>> _pkls;
boost::optional<AssetMap> _asset_map;
+
+ /* Metadata to use for newly created PKLs and AssetMaps */
+ boost::optional<std::string> _new_issuer;
+ boost::optional<std::string> _new_creator;
+ boost::optional<std::string> _new_issue_date;
+ boost::optional<std::string> _new_annotation_text;
};