44 #include "asset_list.h"
48 #include <libcxml/cxml.h>
49 #include <boost/filesystem.hpp>
55 class VerificationNote;
61 PKL (Standard standard, boost::optional<std::string> annotation_text, std::string issue_date, std::string issuer, std::string creator)
62 :
AssetList(standard, annotation_text, issue_date, issuer, creator)
65 explicit PKL(boost::filesystem::path
file, std::vector<dcp::VerificationNote>* notes =
nullptr);
67 boost::optional<std::string> hash (std::string
id)
const;
68 boost::optional<std::string> type (std::string
id)
const;
71 void add_asset(std::string
id, boost::optional<std::string> annotation_text, std::string hash, int64_t size, std::string type, std::string original_filename);
72 void write_xml (boost::filesystem::path
file, std::shared_ptr<const CertificateChain> signer)
const;
75 boost::optional<boost::filesystem::path>
file ()
const {
82 Asset (cxml::ConstNodePtr node)
83 :
Object (remove_urn_uuid(node->string_child(
"Id")))
84 , _annotation_text (node->optional_string_child(
"AnnotationText"))
85 , _hash (node->string_child(
"Hash"))
86 , _size (node->number_child<int64_t>(
"Size"))
87 , _type (node->string_child(
"Type"))
88 , _original_filename(node->optional_string_child(
"OriginalFileName"))
91 Asset(std::string
id, boost::optional<std::string> annotation_text, std::string hash, int64_t size, std::string type, std::string original_filename)
93 , _annotation_text (annotation_text)
97 , _original_filename(original_filename)
100 boost::optional<std::string> annotation_text ()
const {
101 return _annotation_text;
104 std::string hash ()
const {
108 int64_t size ()
const {
112 std::string type ()
const {
116 boost::optional<std::string> original_filename()
const {
117 return _original_filename;
121 boost::optional<std::string> _annotation_text;
125 boost::optional<std::string> _original_filename;
128 std::vector<std::shared_ptr<Asset>> assets()
const {
133 std::vector<std::shared_ptr<Asset>> _assets;
135 mutable boost::optional<boost::filesystem::path>
_file;
Some part of a DCP that has a UUID.
boost::optional< boost::filesystem::path > file() const
boost::optional< boost::filesystem::path > _file
Namespace for everything in libdcp.
Utility methods and classes.