Added INVALID_START_DATE.
Added compute_duration_for_parking_ticket().
This commit is contained in:
parent
c5960a031e
commit
01f2dc07ce
@ -39,6 +39,7 @@ struct CALCULATE_LIBRARY_API CalcState {
|
|||||||
ERROR_LOADING_TARIFF,
|
ERROR_LOADING_TARIFF,
|
||||||
ERROR_PARSING_TARIFF,
|
ERROR_PARSING_TARIFF,
|
||||||
NEGATIVE_PARING_TIME,
|
NEGATIVE_PARING_TIME,
|
||||||
|
INVALID_START_DATE,
|
||||||
WRONG_PARAM_VALUES,
|
WRONG_PARAM_VALUES,
|
||||||
ABOVE_MAX_PARKING_TIME,
|
ABOVE_MAX_PARKING_TIME,
|
||||||
BELOW_MIN_PARKING_TIME,
|
BELOW_MIN_PARKING_TIME,
|
||||||
@ -88,6 +89,9 @@ struct CALCULATE_LIBRARY_API CalcState {
|
|||||||
case State::OVERPAID:
|
case State::OVERPAID:
|
||||||
s = "OVERPAID";
|
s = "OVERPAID";
|
||||||
break;
|
break;
|
||||||
|
case State::INVALID_START_DATE:
|
||||||
|
s = "INVALID_START_DATE";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return s + ":" + m_desc;
|
return s + ":" + m_desc;
|
||||||
}
|
}
|
||||||
@ -101,10 +105,17 @@ CalcState CALCULATE_LIBRARY_API init_tariff(parking_tariff_t **tariff,
|
|||||||
void CALCULATE_LIBRARY_API free_tariff(parking_tariff_t *tariff);
|
void CALCULATE_LIBRARY_API free_tariff(parking_tariff_t *tariff);
|
||||||
int CALCULATE_LIBRARY_API get_zone_nr();
|
int CALCULATE_LIBRARY_API get_zone_nr();
|
||||||
|
|
||||||
CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket(parking_tariff_t *tariff,
|
CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket(
|
||||||
|
parking_tariff_t *tariff,
|
||||||
time_t start_parking_time,
|
time_t start_parking_time,
|
||||||
time_t end_parking_time,
|
time_t end_parking_time,
|
||||||
struct price_t *price);
|
struct price_t *price);
|
||||||
|
|
||||||
|
CalcState CALCULATE_LIBRARY_API compute_duration_for_parking_ticket(
|
||||||
|
parking_tariff_t *tariff,
|
||||||
|
time_t start_parking_time,
|
||||||
|
double cost,
|
||||||
|
QString &duration);
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user