Fix tests again on Windows.
[libdcp.git] / src / verify.h
index c7c4b6c8835147ad712142b7642c1ea9a5217489..77fc28b39d671e78dd1586ddf5c5703c0bb307ff 100644 (file)
@@ -58,9 +58,6 @@ 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 class Type {
                ERROR,
                BV21_ERROR, ///< may not always be considered an error, but violates a "shall" requirement of Bv2.1
@@ -404,6 +401,27 @@ public:
                 *  file contains the CPL filename
                 */
                INVALID_MAIN_PICTURE_ACTIVE_AREA,
+               /** A PKL has more than one asset with the same ID
+                *  note contains the PKL ID
+                *  file contains the PKL filename
+                */
+               DUPLICATE_ASSET_ID_IN_PKL,
+               /** An ASSETMAP has more than one asset with the same ID
+                *  note contains the ASSETMAP ID
+                *  file contains the ASSETMAP filename
+                */
+               DUPLICATE_ASSET_ID_IN_ASSETMAP,
+               /** An Interop subtitle asset has no subtitles.
+                *  note contains the asset ID
+                *  file contains the asset filename
+                */
+               MISSING_SUBTITLE,
+               /** A SMPTE subtitle asset as an <IssueDate> which is not of the form yyyy-mm-ddThh:mm:ss
+                *  I can find no reference in a standard to this being required, but the Deluxe delivery
+                *  specifications require it and their QC will fail DCPs that don't have it.
+                *  note contains the incorrect <IssueDate>
+                */
+               INVALID_SUBTITLE_ISSUE_DATE
        };
 
        VerificationNote (Type type, Code code)
@@ -470,10 +488,21 @@ private:
 };
 
 
+struct VerificationOptions
+{
+       ///< If set, any assets larger than this number of bytes will not have their hashes checked
+       boost::optional<boost::uintmax_t> maximum_asset_size_for_hash_check;
+       ///< true to check asset hashes (except those which match maximum_asset_size_for_hash_check)
+       ///< false to check no asset hashes.
+       bool check_asset_hashes = true;
+};
+
+
 std::vector<VerificationNote> verify (
        std::vector<boost::filesystem::path> directories,
        boost::function<void (std::string, boost::optional<boost::filesystem::path>)> stage,
        boost::function<void (float)> progress,
+       VerificationOptions options = {},
        boost::optional<boost::filesystem::path> xsd_dtd_directory = boost::optional<boost::filesystem::path>()
        );