From 9da4e19c65d6c22732d5d000fa7cd0e620cbc356 Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Tue, 19 Jun 2007 14:48:56 +0300 Subject: [PATCH] Start to add track storage things. --- src/track.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/track.h b/src/track.h index 309ec1d..4b4ab6f 100644 --- a/src/track.h +++ b/src/track.h @@ -1,10 +1,25 @@ #ifndef _MAPPER_TRACK_H #define _MAPPER_TRACK_H +#include +#include + 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 -- 2.39.5