Add CALCULATE_LIBRARY_API to make symbols publicly available.

This commit is contained in:
Gerhard Hoffmann 2023-05-02 09:46:17 +02:00
parent a7d7e61d9b
commit 194ecd2771

View File

@ -10,7 +10,7 @@
static Calculator calculator;
int get_zone_nr() {
int CALCULATE_LIBRARY_API get_zone_nr() {
QFile zone("/etc/zone_nr");
if (zone.exists()) {
QFileInfo finfo(zone);
@ -23,7 +23,7 @@ int get_zone_nr() {
return -1;
}
bool init_tariff(parking_tariff_t **tariff, char const *config_file) {
bool CALCULATE_LIBRARY_API init_tariff(parking_tariff_t **tariff, char const *config_file) {
*tariff = new Configuration();
int const zone = get_zone_nr();
@ -52,11 +52,12 @@ bool init_tariff(parking_tariff_t **tariff, char const *config_file) {
return false;
}
void free_tariff(parking_tariff_t *tariff) {
void CALCULATE_LIBRARY_API free_tariff(parking_tariff_t *tariff) {
delete tariff;
}
bool compute_price_for_parking_ticket(parking_tariff_t *tariff,
bool CALCULATE_LIBRARY_API compute_price_for_parking_ticket(
parking_tariff_t *tariff,
time_t start_parking_time, // in minutes
time_t end_parking_time, // in minutes
struct price_t *price) {