36 lines
777 B
C
36 lines
777 B
C
|
#ifndef CALCULATE_PRICE_H
|
||
|
#define CALCULATE_PRICE_H
|
||
|
|
||
|
#include <time.h>
|
||
|
#include <inttypes.h>
|
||
|
|
||
|
class Configuration;
|
||
|
|
||
|
typedef Configuration parking_tariff_t;
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
extern "C" {
|
||
|
#endif
|
||
|
|
||
|
struct price_t {
|
||
|
uint32_t units;
|
||
|
double netto;
|
||
|
double brutto;
|
||
|
double vat_percentage;
|
||
|
double vat;
|
||
|
};
|
||
|
|
||
|
bool init_tariff(parking_tariff_t **tariff, char const *config_file);
|
||
|
void free_tariff(parking_tariff_t *tariff);
|
||
|
int get_zone_nr();
|
||
|
|
||
|
bool compute_price_for_parking_ticket(parking_tariff_t *tariff,
|
||
|
time_t start_parking_time,
|
||
|
time_t end_parking_time,
|
||
|
struct price_t *price);
|
||
|
#ifdef __cplusplus
|
||
|
} // extern "C"
|
||
|
#endif
|
||
|
|
||
|
#endif // CALCULATE_PRICE_H
|