Ignore missing asset errors.
[libdcp.git] / src / signer.h
index 7c2864fdada9886dbac2ff50eedff2ee53a772b7..6e258f8d5dba8bd87aef6f4e2742f22b3da10a0d 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    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 <boost/filesystem.hpp>
+#ifndef LIBDCP_SIGNER_H
+#define LIBDCP_SIGNER_H
+
+/** @file  src/signer.h
+ *  @brief Signer class.
+ */
+
 #include "certificates.h"
+#include "types.h"
+#include <boost/filesystem.hpp>
 
 namespace xmlpp {
        class Element;
@@ -27,15 +35,21 @@ namespace xmlpp {
 
 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 sign (xmlpp::Element* parent, Standard standard) const;
        void add_signature_value (xmlpp::Node* parent, std::string ns) const;
 
        CertificateChain const & certificates () const {
@@ -44,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