diff --git a/library/include/mobilisis/tariff_carryover_settings.h b/library/include/mobilisis/tariff_carryover_settings.h index 076caad..a65b495 100644 --- a/library/include/mobilisis/tariff_carryover_settings.h +++ b/library/include/mobilisis/tariff_carryover_settings.h @@ -10,7 +10,9 @@ struct ATBTariffCarryOverSettings { // parking time limit not violated: return false, otherwise: return true. using ParkingTimeLimitChecker = std::function; + QDateTime const &startTime, + QDateTime const &endTime, + int paymentOptionIndex)>; int m_duration; QTime m_start; @@ -24,7 +26,8 @@ struct ATBTariffCarryOverSettings { : m_duration(0) , m_start(QTime()) , m_end(QTime()) - , m_parkingTimeLimitChecker([](ATBTariffCarryOverSettings const&, QDateTime const &, int) { return false; }) + , m_parkingTimeLimitChecker([](ATBTariffCarryOverSettings const&, + QDateTime const&, QDateTime const&, int) { return false; }) , m_parking_time_limit(QTime()) , m_about_to_exceed_parking_time_limit(QTime()) {} @@ -41,8 +44,10 @@ struct ATBTariffCarryOverSettings { , m_about_to_exceed_parking_time_limit(about_to_exceed_parking_time_limit) { } - bool parkingTimeLimitExceeded(QDateTime const &endTime, int paymentOptionIndex) const { - return m_parkingTimeLimitChecker(*this, endTime, paymentOptionIndex); + bool parkingTimeLimitExceeded(QDateTime const &startTime, + QDateTime const &endTime, + int paymentOptionIndex) const { + return m_parkingTimeLimitChecker(*this, startTime, endTime, paymentOptionIndex); } friend QDebug operator<<(QDebug debug, ATBTariffCarryOverSettings const &co) {