MOBILISIS-Calculator/library/include/mobilisis/calculate_price.h

46 lines
1.0 KiB
C
Raw Normal View History

#ifndef CALCULATE_PRICE_H
#define CALCULATE_PRICE_H
#include <time.h>
#include <inttypes.h>
2023-05-02 09:09:18 +02:00
#ifdef WIN32
#ifdef CALCULATE_LIBRARY_EXPORTS
#define CALCULATE_LIBRARY_API __declspec(dllexport)
#else
#define CALCULATE_LIBRARY_API __declspec(dllimport)
#endif
#else
#define CALCULATE_LIBRARY_API
#endif
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;
};
2023-05-02 09:09:18 +02:00
bool CALCULATE_LIBRARY_API init_tariff(parking_tariff_t **tariff, char const *config_file);
void CALCULATE_LIBRARY_API free_tariff(parking_tariff_t *tariff);
int CALCULATE_LIBRARY_API get_zone_nr();
2023-05-02 09:09:18 +02:00
bool CALCULATE_LIBRARY_API 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