aboutsummaryrefslogtreecommitdiff
path: root/dbfp.h
diff options
context:
space:
mode:
Diffstat (limited to 'dbfp.h')
-rw-r--r--dbfp.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/dbfp.h b/dbfp.h
index 2efd5e1..7c786c7 100644
--- a/dbfp.h
+++ b/dbfp.h
@@ -7,13 +7,29 @@
#ifndef DBFP_H_
#define DBFP_H_
-#define DBFP_BASE_URL "http://open-api.bahn.de/bin/rest.exe"
+#include <stddef.h>
struct dbfp {
char *key;
};
+struct dbfp_status {
+ int error;
+ int run_error;
+ int parse_error;
+ int curl_error;
+ int api_error;
+};
+
+struct dbfp_location {
+ char *name;
+ char *id;
+};
+
int dbfp_init(struct dbfp *dbfp, char *key);
void dbfp_close(struct dbfp *dbfp);
+struct dbfp_status dbfp_query_location_name(struct dbfp *dbfp, char *input,
+ size_t *n, struct dbfp_location **out);
+
#endif /* DBFP_H_ */