aboutsummaryrefslogtreecommitdiff
path: root/dbfp.h
diff options
context:
space:
mode:
Diffstat (limited to 'dbfp.h')
-rw-r--r--dbfp.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/dbfp.h b/dbfp.h
index 7c786c7..ca92ed1 100644
--- a/dbfp.h
+++ b/dbfp.h
@@ -9,16 +9,16 @@
#include <stddef.h>
-struct dbfp {
- char *key;
+enum dbfp_error {
+ DBFP_ERROR_CURL = -1,
+ DBFP_ERROR_FORMAT = -2,
+ DBFP_ERROR_STRUCTURE = -3,
+ DBFP_ERROR_API = -4,
+ DBFP_ERROR_PARSE = -5
};
-struct dbfp_status {
- int error;
- int run_error;
- int parse_error;
- int curl_error;
- int api_error;
+struct dbfp {
+ char *key;
};
struct dbfp_location {
@@ -29,7 +29,7 @@ struct dbfp_location {
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);
+int dbfp_query_location_name(struct dbfp *dbfp, char *input,
+ size_t *n, struct dbfp_location **locations);
#endif /* DBFP_H_ */