2015-08-20 10:16:26 -07:00
|
|
|
#ifndef _STORAGE_H_INCL_
|
|
|
|
# define _STORAGE_H_INCL_
|
|
|
|
|
2015-08-21 12:11:42 -07:00
|
|
|
#include <time.h>
|
2015-09-01 04:31:49 -07:00
|
|
|
#include "gcache.h"
|
2015-08-20 10:16:26 -07:00
|
|
|
#include "json.h"
|
|
|
|
|
2015-08-29 07:34:20 -07:00
|
|
|
typedef enum {
|
|
|
|
GEOJSON = 0,
|
|
|
|
CSV,
|
|
|
|
JSON,
|
|
|
|
RAW,
|
2015-08-29 12:11:03 -07:00
|
|
|
GPX,
|
2015-08-29 07:34:20 -07:00
|
|
|
} output_type;
|
2015-08-20 10:16:26 -07:00
|
|
|
|
2015-08-29 11:50:13 -07:00
|
|
|
JsonNode *lister(char *username, char *device, time_t s_lo, time_t s_hi, int reverse);
|
2015-08-29 13:20:49 -07:00
|
|
|
void locations(char *filename, JsonNode *obj, JsonNode *arr, time_t s_lo, time_t s_hi, output_type otype, int limit, JsonNode *fields);
|
2015-08-21 12:11:42 -07:00
|
|
|
int make_times(char *time_from, time_t *s_lo, char *time_to, time_t *s_to);
|
2015-08-22 07:42:35 -07:00
|
|
|
JsonNode *geo_json(JsonNode *json);
|
2015-08-23 06:04:54 -07:00
|
|
|
JsonNode *kill_datastore(char *username, char *device);
|
2015-08-25 09:01:50 -07:00
|
|
|
JsonNode *last_users();
|
2015-08-29 12:11:03 -07:00
|
|
|
char *gpx_string(JsonNode *json);
|
2015-09-01 04:31:49 -07:00
|
|
|
void storage_init();
|
2015-08-20 10:16:26 -07:00
|
|
|
|
|
|
|
#endif
|