48 #include <libcxml/cxml.h>
49 #include <boost/filesystem.hpp>
58 PKL (Standard standard, boost::optional<std::string> annotation_text, std::string issue_date, std::string issuer, std::string creator)
59 : _standard (standard)
60 , _annotation_text (annotation_text)
61 , _issue_date (issue_date)
66 explicit PKL (boost::filesystem::path
file);
68 Standard standard ()
const {
72 boost::optional<std::string> annotation_text ()
const {
73 return _annotation_text;
76 boost::optional<std::string> hash (std::string
id)
const;
77 boost::optional<std::string> type (std::string
id)
const;
79 void add_asset (std::string
id, boost::optional<std::string> annotation_text, std::string hash, int64_t size, std::string type);
80 void write (boost::filesystem::path
file, std::shared_ptr<const CertificateChain> signer)
const;
83 boost::optional<boost::filesystem::path>
file ()
const {
90 Asset (cxml::ConstNodePtr node)
91 :
Object (remove_urn_uuid(node->string_child(
"Id")))
92 , _annotation_text (node->optional_string_child(
"AnnotationText"))
93 , _hash (node->string_child(
"Hash"))
94 , _size (node->number_child<int64_t>(
"Size"))
95 , _type (node->string_child(
"Type"))
98 Asset (std::string
id, boost::optional<std::string> annotation_text, std::string hash, int64_t size, std::string type)
100 , _annotation_text (annotation_text)
106 boost::optional<std::string> annotation_text ()
const {
107 return _annotation_text;
110 std::string hash ()
const {
114 int64_t size ()
const {
118 std::string type ()
const {
123 boost::optional<std::string> _annotation_text;
129 std::vector<std::shared_ptr<Asset>> asset_list ()
const {
135 Standard _standard = dcp::Standard::SMPTE;
136 boost::optional<std::string> _annotation_text;
137 std::string _issue_date;
139 std::string _creator;
140 std::vector<std::shared_ptr<Asset>> _asset_list;
142 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.