files in the program, then also delete it here.
*/
+
+/** @file src/verify.h
+ * @brief dcp::verify() method and associated code
+ */
+
+
#ifndef LIBDCP_VERIFY_H
#define LIBDCP_VERIFY_H
+
#include <boost/filesystem.hpp>
#include <boost/function.hpp>
#include <boost/optional.hpp>
#include <string>
#include <vector>
+
+/* Something in windows.h defines this */
+#undef ERROR
+
+
namespace dcp {
+
class VerificationNote
{
public:
/* I've been unable to make mingw happy with ERROR as a symbol, so
I'm using a VERIFY_ prefix here.
*/
- enum Type {
- VERIFY_ERROR,
- VERIFY_BV21_ERROR, ///< may not always be considered an error, but violates a "shall" requirement of Bv2.1
- VERIFY_WARNING
+ enum class Type {
+ ERROR,
+ BV21_ERROR, ///< may not always be considered an error, but violates a "shall" requirement of Bv2.1
+ WARNING
};
/** Codes for errors or warnings from verifying DCPs.
* Comments should clarify meaning and also say which of the optional fields (e.g. file)
* are filled in when this code is used.
*/
- enum Code {
+ enum class Code {
/** An error when reading the DCP.
* note contains (probably technical) details.
*/
boost::optional<uint64_t> _line;
};
+
std::vector<VerificationNote> verify (
std::vector<boost::filesystem::path> directories,
boost::function<void (std::string, boost::optional<boost::filesystem::path>)> stage,
std::ostream& operator<<(std::ostream& s, dcp::VerificationNote const& note);
+
}
+
#endif