]> err.no Git - mapper/blobdiff - src/osm-db.h
More map widget integration changes
[mapper] / src / osm-db.h
index a83662229da6b61ec325ac49df51d5fe70cb8a38..77775e67b3d8c4963824ea71095c39f425d68706 100644 (file)
 #include <glib.h>
 #include "osm.h"
 
-#define OSM_RANGE_WAY (20000)
+/** Generic search item list indexes */
+typedef enum {
+       ITEM_ID,
+       ITEM_CATID,
+       ITEM_LAT,
+       ITEM_LON,
+       ITEM_DIST,
+       ITEM_LATLON,
+       ITEM_LABEL,
+       ITEM_DESC,
+       ITEM_CATLAB,
+       ITEM_ICON,
+       ITEM_COLOR,
+       ITEM_NUM_COLUMNS
+} item_list_id;
 
 typedef enum {
         OSM_NODE_NEXT,
@@ -34,6 +48,8 @@ typedef enum {
 gboolean osm_init(sqlite3 **db);
 void osm_deinit(void);
 
+gboolean osm_db_create(sqlite3 *db);
+
 GSList *osm_get_route_node(guint nid, osm_node_direction d);
 
 void osm_set_way_range_from_speed(gfloat speed);
@@ -41,8 +57,8 @@ void osm_set_way_range(guint sr);
 
 gboolean osm_way_search(gdouble lat, gdouble lon, gchar *text, GtkListStore **store);
 
+void osm_db_enable_mainloop(sqlite3 *db, gboolean eml);
 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);
 
@@ -54,8 +70,10 @@ gboolean osm_find_nearest_place(node_type_t type, gint lat, gint lon, osm_place
 osm_way *osm_find_nearest_way(gint lat, gint lon);
 gboolean osm_way_distance(gint lat, gint lon, osm_way_node *f, osm_way_node *t, gdouble *d);
 
+gboolean osm_place_search(gdouble lat, gdouble lon, gchar *text, GtkListStore **store);
 gboolean osm_place_get(guint32 id, gint lat, gint lon, osm_place **nr);
 
+gboolean osm_check_location(osm_location *map_loc, gint lat, gint lon);
 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);