start repository for mobilisis tariff-calculation
This commit is contained in:
35
library/include/mobilisis/calculate_price.h
Normal file
35
library/include/mobilisis/calculate_price.h
Normal file
@@ -0,0 +1,35 @@
|
||||
#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
|
Reference in New Issue
Block a user