Add CALCULATE_LIBRARY_API to make symbols publicly available.
This commit is contained in:
parent
a7d7e61d9b
commit
194ecd2771
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
static Calculator calculator;
|
static Calculator calculator;
|
||||||
|
|
||||||
int get_zone_nr() {
|
int CALCULATE_LIBRARY_API get_zone_nr() {
|
||||||
QFile zone("/etc/zone_nr");
|
QFile zone("/etc/zone_nr");
|
||||||
if (zone.exists()) {
|
if (zone.exists()) {
|
||||||
QFileInfo finfo(zone);
|
QFileInfo finfo(zone);
|
||||||
@ -23,7 +23,7 @@ int get_zone_nr() {
|
|||||||
return -1;
|
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();
|
*tariff = new Configuration();
|
||||||
|
|
||||||
int const zone = get_zone_nr();
|
int const zone = get_zone_nr();
|
||||||
@ -52,11 +52,12 @@ bool init_tariff(parking_tariff_t **tariff, char const *config_file) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void free_tariff(parking_tariff_t *tariff) {
|
void CALCULATE_LIBRARY_API free_tariff(parking_tariff_t *tariff) {
|
||||||
delete 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 start_parking_time, // in minutes
|
||||||
time_t end_parking_time, // in minutes
|
time_t end_parking_time, // in minutes
|
||||||
struct price_t *price) {
|
struct price_t *price) {
|
||||||
|
Loading…
Reference in New Issue
Block a user