public:
CertificateChain () {}
- void add (boost::shared_ptr<Certificate>);
+ void add (boost::shared_ptr<Certificate> c);
boost::shared_ptr<Certificate> root () const;
boost::shared_ptr<Certificate> leaf () const;
f.done ();
}
+/** Add a reel to this CPL.
+ * @param reel Reel to add.
+ */
void
CPL::add (shared_ptr<Reel> reel)
{
/*
- Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2014 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
*/
-#include <iomanip>
-#include <algorithm>
-#include <boost/algorithm/string.hpp>
-#include <openssl/rsa.h>
-#include <openssl/pem.h>
-#include <openssl/err.h>
-#include <libcxml/cxml.h>
-#include "AS_DCP.h"
-#include "KM_util.h"
+/** @file src/kdm.cc
+ * @brief KDM and KDMKey classes.
+ */
+
#include "util.h"
#include "kdm.h"
#include "compose.hpp"
#include "cpl.h"
#include "mxf.h"
#include "xml/kdm_smpte.h"
+#include "AS_DCP.h"
+#include "KM_util.h"
+#include <libcxml/cxml.h>
+#include <openssl/rsa.h>
+#include <openssl/pem.h>
+#include <openssl/err.h>
+#include <boost/algorithm/string.hpp>
+#include <iomanip>
+#include <algorithm>
using std::list;
using std::string;
*/
/** @file src/kdm.h
- * @brief Handling of Key Delivery Messages (KDMs).
+ * @brief KDM and KDMKey classes.
*/
#ifndef LIBDCP_KDM_H
/*
- Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2014 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
*/
-#include <fstream>
-#include <sstream>
-#include <boost/filesystem.hpp>
-#include <boost/algorithm/string.hpp>
-#include <openssl/sha.h>
-#include <openssl/bio.h>
-#include <openssl/evp.h>
-#include "KM_util.h"
+/** @file src/signer_chain.cc
+ * @brief Functions to make signer chains.
+ */
+
#include "signer_chain.h"
#include "exceptions.h"
#include "util.h"
+#include "KM_util.h"
+#include <openssl/sha.h>
+#include <openssl/bio.h>
+#include <openssl/evp.h>
+#include <boost/filesystem.hpp>
+#include <boost/algorithm/string.hpp>
+#include <fstream>
+#include <sstream>
using std::string;
using std::ofstream;
using std::stringstream;
using std::cout;
-static void command (string cmd)
+/** Run a shell command.
+ * @param cmd Command to run (UTF8-encoded).
+ */
+static void
+command (string cmd)
{
#ifdef LIBDCP_WINDOWS
/* We need to use CreateProcessW on Windows so that the UTF-8/16 mess
}
/** Extract a public key from a private key and create a SHA1 digest of it.
- * @param key Private key
+ * @param private_key Private key
* @param openssl openssl binary name (or full path if openssl is not on the system path).
* @return SHA1 digest of corresponding public key, with escaped / characters.
*/
-
static string
public_key_digest (boost::filesystem::path private_key, boost::filesystem::path openssl)
{
return dig;
}
+/** Generate a chain of root, intermediate and leaf keys by running an OpenSSL binary.
+ * @param directory Directory to write the files to.
+ * @param openssl openssl binary path.
+ */
void
dcp::make_signer_chain (boost::filesystem::path directory, boost::filesystem::path openssl)
{
/*
- Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2014 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
*/
+/** @file src/signer_chain.h
+ * @brief Functions to make signer chains.
+ */
+
#include <boost/filesystem.hpp>
namespace dcp {
*/
+/** @file src/text.cc
+ * @brief Text class for parsing subtitle XML.
+ */
+
#include "text.h"
#include "xml.h"
#include "font.h"
using boost::optional;
using namespace dcp;
+/** Read a <Text> node from a subtitle XML file, noting its contents
+ * in this object's member variables.
+ * @param node Node to read.
+ */
Text::Text (shared_ptr<const cxml::Node> node)
: v_align (CENTER)
{
*/
+/** @file src/text.h
+ * @brief Text class for parsing subtitle XML.
+ */
+
#include "types.h"
#include <boost/shared_ptr.hpp>
#include <list>
/** Convert a string from a <ContentKind> node to a libdcp ContentKind.
* Reasonably tolerant about varying case.
- * @param type Content kind string.
+ * @param kind Content kind string.
* @return libdcp ContentKind.
*/
dcp::ContentKind
-dcp::content_kind_from_string (string type)
+dcp::content_kind_from_string (string kind)
{
- transform (type.begin(), type.end(), type.begin(), ::tolower);
+ transform (kind.begin(), kind.end(), kind.begin(), ::tolower);
- if (type == "feature") {
+ if (kind == "feature") {
return FEATURE;
- } else if (type == "short") {
+ } else if (kind == "short") {
return SHORT;
- } else if (type == "trailer") {
+ } else if (kind == "trailer") {
return TRAILER;
- } else if (type == "test") {
+ } else if (kind == "test") {
return TEST;
- } else if (type == "transitional") {
+ } else if (kind == "transitional") {
return TRANSITIONAL;
- } else if (type == "rating") {
+ } else if (kind == "rating") {
return RATING;
- } else if (type == "teaser") {
+ } else if (kind == "teaser") {
return TEASER;
- } else if (type == "policy") {
+ } else if (kind == "policy") {
return POLICY;
- } else if (type == "psa") {
+ } else if (kind == "psa") {
return PUBLIC_SERVICE_ANNOUNCEMENT;
- } else if (type == "advertisement") {
+ } else if (kind == "advertisement") {
return ADVERTISEMENT;
}