aboutsummaryrefslogtreecommitdiff
path: root/dbfp.h
blob: 7c786c774dfc940f27f07c6b31fca8dbb308ddd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
 * Copyright (C) 2016 Robin Krahl <robin.krahl@ireas.org>
 *
 * dbfp.h
 */

#ifndef DBFP_H_
#define DBFP_H_

#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_ */