#ifndef _MAPPER_TRACK_H
#define _MAPPER_TRACK_H
+#include <glib.h>
+#include <sqlite3.h>
+
void track_add(time_t time, gboolean newly_fixed);
void track_insert_break(void);
gboolean track_insert_mark(void);
gboolean track_save(void);
gboolean track_open(void);
+#define TRACK_SQL_SELECT_TRACKS "select id,name,sloc,eloc,sdate,edate from tracks order by sdate"
+#define TRACK_SQL_INSERT_TRACK "insert into tracks (id,name,sloc,sdate) values (?,?,?,?);
+#define TRACK_SQL_INSERT_TRACK_POINT "insert into trackpoints (tid,dt,lat,lon,alt,hdop,vdop,pdop,sat,fix) values (?,?,?,?,?,?,?,?,?,?)"
+#define TRACK_SQL_SELECT_TRACK_POINTS "select tid,dt,lat,lon,alt,hdop,vdop,pdop,sat,fix from trackpoints where tid=? order by dt"
+
+struct {
+ sqlite3_stmt *_insert_track;
+ sqlite3_stmt *_select_tracks;
+ sqlite3_stmt *_insert_track_point;
+ sqlite3_stmt *_select_track_points;
+} track_sql;
+
#endif