X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fkdm_util.h;h=8dba1ff98048fd623a2cecf3fa825f4b723840ce;hb=16557827b252bd653b15eead479ec5699eda7360;hp=398819ae0a6213d5dba701be0619003b00f749eb;hpb=9d1d75e474bc92d8b0f823141073ad9dd639c8e0;p=dcpomatic.git diff --git a/src/lib/kdm_util.h b/src/lib/kdm_util.h index 398819ae0..8dba1ff98 100644 --- a/src/lib/kdm_util.h +++ b/src/lib/kdm_util.h @@ -32,21 +32,43 @@ namespace dcp { } -enum class KDMCertificatePeriod { +enum class KDMCertificateOverlap { KDM_WITHIN_CERTIFICATE, KDM_OVERLAPS_CERTIFICATE, KDM_OUTSIDE_CERTIFICATE }; +struct KDMCertificatePeriod +{ + KDMCertificatePeriod(std::string cinema_name_, std::string screen_name_, dcp::LocalTime from_, dcp::LocalTime to_) + : cinema_name(std::move(cinema_name_)) + , screen_name(std::move(screen_name_)) + , from(std::move(from_)) + , to(std::move(to_)) + {} + + std::string cinema_name; + std::string screen_name; + KDMCertificateOverlap overlap = KDMCertificateOverlap::KDM_WITHIN_CERTIFICATE; + dcp::LocalTime from; + dcp::LocalTime to; +}; + + /** @param recipient Some KDM recipient certificate. * @param kdm_from Proposed KDM start time. * @param kdm_to Proposed KDM end time. * @return Relationship between certificate and KDM validity periods. */ -KDMCertificatePeriod -check_kdm_and_certificate_validity_periods(dcp::Certificate const& recipient, dcp::LocalTime kdm_from, dcp::LocalTime kdm_to); +KDMCertificatePeriod check_kdm_and_certificate_validity_periods( + std::string const& cinema_name, + std::string const& screen_name, + dcp::Certificate const& recipient, + dcp::LocalTime kdm_from, + dcp::LocalTime kdm_to + ); #endif