#include <libxml++/libxml++.h>
#include "types.h"
#include "certificates.h"
+#include "key.h"
namespace libdcp {
class CPL
{
public:
- CPL (std::string directory, std::string name, ContentKind content_kind, int length, int frames_per_second);
- CPL (std::string directory, std::string file, std::list<PathAssetMap> asset_maps, bool require_mxfs = true);
+ CPL (boost::filesystem::path directory, std::string name, ContentKind content_kind, int length, int frames_per_second);
+ CPL (boost::filesystem::path, std::string file, std::list<PathAssetMap> asset_maps, bool require_mxfs = true);
void add_reel (boost::shared_ptr<Reel> reel);
bool encrypted () const;
+ void set_mxf_keys (Key);
+
std::string id () const {
return _id;
}
void write_xml (bool, XMLMetadata const &, boost::shared_ptr<const Signer>) const;
void write_to_assetmap (xmlpp::Node *) const;
- void write_to_pkl (xmlpp::Node *) const;
-
- /** Make a KDM for this CPL.
- * @param signer Details of the certificates and private key to sign the KDM with.
- * @param recipient_cert The certificate of the projector that this KDM is targeted at. This will contain the
- * projector's public key which is used to encrypt the content keys.
- * @param from Time that the KDM should be valid from.
- * @param until Time that the KDM should be valid until.
- * @param interop true to generate an interop KDM, false for SMPTE.
- */
- boost::shared_ptr<xmlpp::Document> make_kdm (
- boost::shared_ptr<const Signer> signer,
- boost::shared_ptr<const Certificate> recipient_cert,
- boost::posix_time::ptime from,
- boost::posix_time::ptime until,
- bool interop,
- MXFMetadata const &,
- XMLMetadata const &
- ) const;
+ void write_to_pkl (xmlpp::Node *, bool) const;
void add_kdm (KDM const &);
private:
std::pair<std::string, boost::shared_ptr<const parse::AssetMapAsset> > asset_from_id (std::list<PathAssetMap>, std::string id) const;
- std::string _directory;
+ boost::filesystem::path _directory;
/** the name of the DCP */
std::string _name;
/** the content kind of the CPL */