#include <vector>
#include <boost/shared_ptr.hpp>
#include <boost/signals2.hpp>
+#include <boost/date_time/posix_time/posix_time.hpp>
#include "types.h"
+#include "certificates.h"
namespace xmlpp {
- class Node;
+ class Document;
+ class Element;
}
/** @brief Namespace for everything in libdcp */
class Reel;
class AssetMap;
+class Encryption
+{
+public:
+ Encryption (CertificateChain c, std::string const & k)
+ : certificates (c)
+ , signer_key (k)
+ {}
+
+ CertificateChain certificates;
+ std::string signer_key;
+};
+
/** @brief A CPL within a DCP */
class CPL
{
bool equals (CPL const & other, EqualityOptions options, std::list<std::string>& notes) const;
- void write_xml () const;
+ void write_xml (boost::shared_ptr<Encryption>) const;
void write_to_assetmap (std::ostream& s) const;
- void write_to_pkl (std::ostream& s) const;
+ void write_to_pkl (xmlpp::Element* p) const;
+
+ boost::shared_ptr<xmlpp::Document> make_kdm (
+ CertificateChain const &,
+ std::string const &,
+ boost::shared_ptr<const Certificate>,
+ boost::posix_time::ptime from,
+ boost::posix_time::ptime until
+ ) const;
private:
std::string _directory;
/** Write the required XML files to the directory that was
* passed into the constructor.
*/
- void write_xml () const;
+ void write_xml (boost::shared_ptr<Encryption> crypt = boost::shared_ptr<Encryption> ()) const;
/** Compare this DCP with another, according to various options.
* @param other DCP to compare this one to.
/** Write the PKL file.
* @param pkl_uuid UUID to use.
*/
- std::string write_pkl (std::string pkl_uuid) const;
+ std::string write_pkl (std::string pkl_uuid, boost::shared_ptr<Encryption>) const;
/** Write the VOLINDEX file */
void write_volindex () const;