]> err.no Git - mapper/blobdiff - src/osm-db.h
Parse directly but update informations in callbacks only if we got a sentence that...
[mapper] / src / osm-db.h
index dbee04396212927ee5bebae539b56b73b5f8bb3f..a83662229da6b61ec325ac49df51d5fe70cb8a38 100644 (file)
@@ -1,3 +1,23 @@
+/*
+ * This file is part of mapper
+ *
+ * Copyright (C) 2007 Kaj-Michael Lang
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
 #ifndef _OSM_DB_H
 #define _OSM_DB_H
 
 
 #define OSM_RANGE_WAY (20000)
 
-gboolean osm_init(void);
+typedef enum {
+        OSM_NODE_NEXT,
+        OSM_NODE_PREV,
+} osm_node_direction;
+
+gboolean osm_init(sqlite3 **db);
 void osm_deinit(void);
 
+GSList *osm_get_route_node(guint nid, osm_node_direction d);
+
 void osm_set_way_range_from_speed(gfloat speed);
 void osm_set_way_range(guint sr);
 
+gboolean osm_way_search(gdouble lat, gdouble lon, gchar *text, GtkListStore **store);
+
 void osm_progress_set_widget(sqlite3 *db, GtkProgressBar *w);
 gboolean osm_db_prepare(sqlite3 *db);
 
+gboolean osm_way_search(gdouble lat, gdouble lon, gchar *text, GtkListStore **store);
+
 gboolean osm_way_get_nodes(osm_way *w);
 gboolean osm_way_get_name(osm_way *w);
 gboolean osm_way_get_ref(osm_way *w);
@@ -25,7 +56,7 @@ gboolean osm_way_distance(gint lat, gint lon, osm_way_node *f, osm_way_node *t,
 
 gboolean osm_place_get(guint32 id, gint lat, gint lon, osm_place **nr);
 
-gboolean osm_get_location_data(gint lat, gint lon, osm_location *map_loc);
+gboolean osm_get_location_data(gint lat, gint lon, gfloat heading, osm_location *map_loc);
 
 osm_way_node *osm_way_node_new(guint id, gint lat, gint lon, gint flags);