Rename VerifyResult -> VerificationResult.
[libdcp.git] / src / verify.h
index 339f418666152ed7d130996be2b433402e199f2a..77b657600540d661612d2cee6450ebdb774ee099 100644 (file)
@@ -182,6 +182,7 @@ public:
                 *  note contains the invalid language
                 */
                INVALID_LANGUAGE,
+               VALID_RELEASE_TERRITORY,
                /** A picture asset does not have one of the required Bv2.1 sizes (in pixels) [Bv2.1_7.1]
                 *  note contains the incorrect size as "<width>x<height>"
                 *  file contains the asset filename
@@ -264,6 +265,7 @@ public:
                 *  file contains the CPL filename
                 */
                MISMATCHED_CPL_ANNOTATION_TEXT,
+               VALID_CPL_ANNOTATION_TEXT,
                /** At least one asset in a reel does not have the same duration as the others */
                MISMATCHED_ASSET_DURATION,
                /** If one reel has a _MainSubtitle_, all must have them */
@@ -341,6 +343,7 @@ public:
                 *  file contains the PKL filename
                 */
                MISMATCHED_PKL_ANNOTATION_TEXT_WITH_CPL,
+               MATCHING_PKL_ANNOTATION_TEXT_WITH_CPL,
                /** All content is encrypted */
                ALL_ENCRYPTED,
                /** No content is encrypted */
@@ -417,11 +420,13 @@ public:
                UNEXPECTED_DURATION,
                /** A <ContentKind> has been specified with either no scope or the SMPTE 429-7 scope, but which is not one of those allowed */
                INVALID_CONTENT_KIND,
+               VALID_CONTENT_KIND,
                /** Either the width or height of a <MainPictureActiveArea> in a CPL is either not an even number, or bigger than the corresponding asset dimension.
                 *  note contains details of what is wrong
                 *  file contains the CPL filename
                 */
                INVALID_MAIN_PICTURE_ACTIVE_AREA,
+               VALID_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
@@ -486,6 +491,7 @@ public:
                 *  file contains the CPL filename
                 */
                EMPTY_CONTENT_VERSION_LABEL_TEXT,
+               VALID_CONTENT_VERSION_LABEL_TEXT,
        };
 
        VerificationNote (Type type, Code code)
@@ -669,14 +675,14 @@ struct VerificationOptions
 };
 
 
-struct VerifyResult
+struct VerificationResult
 {
        std::vector<VerificationNote> notes;
        std::vector<std::shared_ptr<dcp::DCP>> dcps;
 };
 
 
-VerifyResult verify(
+VerificationResult verify(
        std::vector<boost::filesystem::path> directories,
        std::vector<dcp::DecryptedKDM> kdms,
        std::function<void (std::string, boost::optional<boost::filesystem::path>)> stage,
@@ -685,7 +691,11 @@ VerifyResult verify(
        boost::optional<boost::filesystem::path> xsd_dtd_directory = boost::optional<boost::filesystem::path>()
        );
 
-std::string note_to_string (dcp::VerificationNote note);
+std::string note_to_string(
+       dcp::VerificationNote note,
+       std::function<std::string (std::string)> process_string = [](std::string s) { return s; },
+       std::function<std::string (std::string)> process_filename = [](std::string s) { return s; }
+       );
 
 bool operator== (dcp::VerificationNote const& a, dcp::VerificationNote const& b);
 bool operator!=(dcp::VerificationNote const& a, dcp::VerificationNote const& b);