X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fsigner.h;h=6e258f8d5dba8bd87aef6f4e2742f22b3da10a0d;hb=113187d5d1e7e5a079eb26f99b31e687d503cc07;hp=a4d10b2afe798da713da4f8689725bafd8540ac0;hpb=452144160eb864984121d3fa883a12d40fbf7e47;p=libdcp.git diff --git a/src/signer.h b/src/signer.h index a4d10b2a..6e258f8d 100644 --- a/src/signer.h +++ b/src/signer.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2013 Carl Hetherington + Copyright (C) 2013-2014 Carl Hetherington 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 @@ -17,21 +17,40 @@ */ -#include +#ifndef LIBDCP_SIGNER_H +#define LIBDCP_SIGNER_H + +/** @file src/signer.h + * @brief Signer class. + */ + #include "certificates.h" +#include "types.h" +#include -namespace libdcp { +namespace xmlpp { + class Element; + class Node; +} + +namespace dcp { -class Signer +/** @class Signer + * @brief A class which can sign XML files. + */ +class Signer : public boost::noncopyable { public: + /** @param c Certificate chain to sign with. + * @param k Key to sign with. + */ Signer (CertificateChain c, boost::filesystem::path k) : _certificates (c) , _key (k) {} - void sign (xmlpp::Element* parent, bool interop) const; - void add_signature_value (xmlpp::Element* parent, std::string ns) const; + void sign (xmlpp::Element* parent, Standard standard) const; + void add_signature_value (xmlpp::Node* parent, std::string ns) const; CertificateChain const & certificates () const { return _certificates; @@ -39,11 +58,12 @@ public: private: - void add_signer (xmlpp::Element* parent, std::string ns) const; - + /** Certificate chain to sign with */ CertificateChain _certificates; /** Filename of signer key */ boost::filesystem::path _key; }; } + +#endif