Change interface: use QDateTime
- use QDateTime instead of char*-string - GetCostFromDuration: add end_datetime as a return value
This commit is contained in:
		| @@ -109,7 +109,7 @@ CalcState CALCULATE_LIBRARY_API init_tariff(parking_tariff_t **tariff, | ||||
| void CALCULATE_LIBRARY_API free_tariff(parking_tariff_t *tariff); | ||||
| int CALCULATE_LIBRARY_API get_zone_nr(int zone = -1); | ||||
|  | ||||
| CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket( | ||||
| CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket(       // deprecated | ||||
|                                             parking_tariff_t *tariff, | ||||
|                                             time_t start_parking_time, | ||||
|                                             time_t end_parking_time, | ||||
| @@ -118,10 +118,11 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket( | ||||
| CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket( | ||||
|                                             parking_tariff_t *tariff, | ||||
|                                             QDateTime const &start_parking_time, | ||||
|                                             QDateTime const &end_parking_time, | ||||
|                                             struct price_t *price); | ||||
|                                             int netto_parking_time, | ||||
|                                             QDateTime &end_parking_time,    // return value | ||||
|                                             struct price_t *price);         // return value | ||||
|  | ||||
| CalcState CALCULATE_LIBRARY_API compute_duration_for_parking_ticket( | ||||
| CalcState CALCULATE_LIBRARY_API compute_duration_for_parking_ticket(        // deprecated | ||||
|                                             parking_tariff_t *tariff, | ||||
|                                             time_t start_parking_time, | ||||
|                                             double cost, | ||||
| @@ -131,7 +132,7 @@ CalcState CALCULATE_LIBRARY_API compute_duration_for_parking_ticket( | ||||
|                                             parking_tariff_t *tariff, | ||||
|                                             QDateTime const &start_parking_time, | ||||
|                                             double cost, | ||||
|                                             QDateTime &ticketEndTime); | ||||
|                                             QDateTime &ticketEndTime);      // return value | ||||
|  | ||||
| CalcState CALCULATE_LIBRARY_API compute_duration_for_daily_ticket( | ||||
|                                             parking_tariff_t *tariff, | ||||
|   | ||||
| @@ -23,9 +23,10 @@ public: | ||||
| 	/// <param name="tariff_cfg">Pointer to configuration</param> | ||||
| 	/// <param name="vehicle_type">Type of vehicle</param> | ||||
| 	/// <param name="start_datetime">Date/time of payment to be conducted in ISO8601 format (e.g. 2022-12-25T08:00:00Z) </param> | ||||
|     /// <param name="end_datetime">Date/time of park end to be conducted in ISO8601 format (e.g. 2022-12-25T08:00:00Z) </param> | ||||
| 	/// <param name="durationMin">Duration of parking in minutes</param> | ||||
| 	/// <returns>Returns cost (data type: double)</returns> | ||||
| 	double GetCostFromDuration(Configuration* cfg, uint8_t vehicle_type, char const* start_datetime, double durationMin, bool nextDay = false, bool prepaid = false); | ||||
|     double GetCostFromDuration(Configuration* cfg, uint8_t vehicle_type, const QDateTime start_datetime, QDateTime & end_datetime, double durationMin, bool nextDay = false, bool prepaid = false); | ||||
|  | ||||
|     // Daily ticket | ||||
|     QString GetDailyTicketDuration(Configuration* cfg, QString start_datetime, uint8_t payment_option, bool carry_over); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user