#include "dialogs.h"
#include "filter-gui.h"
#include "help.h"
+#include "map-repo.h"
static void
track_tree_view_update_store(GtkWidget *tree_view, Path *track)
#include "settings.h"
#include "gpx.h"
#include "filter.h"
+#include "dialogs.h"
#define PROXY_PORT (8080)
#include <gconf/gconf-client.h>
#include "filter.h"
#include "mapper-types.h"
+#include "map-repo.h"
GConfClient *gconf_client;
#include "gpx.h"
#include "map-download.h"
#include "iap.h"
+#include "map-repo.h"
static guint _num_downloads=0;
static guint _curr_download=0;
#include <curl/multi.h>
#include <glib.h>
#include "mapper-types.h"
+#include "map-repo.h"
#define INITIAL_DOWNLOAD_RETRIES (3)
#include "ui-common.h"
#include "map-poi.h"
#include "latlon.h"
+#include "osm-db.h"
#define POI_FONT_SIZE_BIG (10)
#define POI_FONT_SIZE_SMALL (8)
#include "ui-common.h"
#include "dialogs.h"
#include "help.h"
+#include "map-repo.h"
#define MAP_REPO_LIST_URL "http://www.gnuite.com/nokia770/maemo-mapper/repos.txt"
--- /dev/null
+#ifndef _MAP_REPO_H
+#define _MAP_REPO_H
+
+/** This enumerated type defines the supported types of repositories. */
+typedef enum {
+ REPOTYPE_NONE, /* No URL set. */
+ REPOTYPE_XYZ, /* x=%d, y=%d, and zoom=%d */
+ REPOTYPE_XYZ_INV, /* zoom=%0d, x=%d, y=%d */
+ REPOTYPE_QUAD_QRST, /* t=%s (%s = {qrst}*) */
+ REPOTYPE_QUAD_ZERO, /* t=%0s (%0s = {0123}*) */
+ REPOTYPE_WMS /* "service=wms" */
+} RepoType;
+
+/** Data regarding a map repository. */
+typedef struct _RepoData RepoData;
+struct _RepoData {
+ gchar *name;
+ gchar *url;
+ gchar *cache_dir;
+ guint dl_zoom_steps;
+ guint view_zoom_steps;
+ gboolean double_size;
+ gboolean nextable;
+ RepoType type;
+ GtkWidget *menu_item;
+};
+
+/** Data used during the asynchronous progress update phase of automatic map
+ * downloading. */
+typedef struct _ProgressUpdateInfo ProgressUpdateInfo;
+struct _ProgressUpdateInfo {
+ gchar *src_str;
+ gchar *dest_str;
+ RepoData *repo;
+ guint tilex, tiley, zoom; /* for refresh. */
+ gint retries; /* if equal to zero, it means we're DELETING maps. */
+ guint priority;
+ FILE *file;
+};
+
+GList *_repo_list;
+RepoData *_curr_repo;
+
+#endif
#include <gtk/gtk.h>
#include <curl/multi.h>
-/** 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;
-
-/** This enumerated type defines the supported types of repositories. */
-typedef enum {
- REPOTYPE_NONE, /* No URL set. */
- REPOTYPE_XYZ, /* x=%d, y=%d, and zoom=%d */
- REPOTYPE_XYZ_INV, /* zoom=%0d, x=%d, y=%d */
- REPOTYPE_QUAD_QRST, /* t=%s (%s = {qrst}*) */
- REPOTYPE_QUAD_ZERO, /* t=%0s (%0s = {0123}*) */
- REPOTYPE_WMS /* "service=wms" */
-} RepoType;
-
/* Route list */
typedef enum {
ROUTE_LATLON,
ROUTE_NUM_COLUMNS
} RouteList;
-/** Category list **/
-typedef enum {
- CAT_ID,
- CAT_ENABLED,
- CAT_LABEL,
- CAT_DESC,
- CAT_POI_CNT,
- CAT_ICON,
- CAT_NUM_COLUMNS
-} CategoryList;
-
/** This enum defines the possible font sizes. */
typedef enum {
INFO_FONT_XXSMALL,
} SpeedLocation;
gchar *SPEED_LOCATION_TEXT[SPEED_LOCATION_ENUM_COUNT];
-/** Data regarding a map repository. */
-typedef struct _RepoData RepoData;
-struct _RepoData {
- gchar *name;
- gchar *url;
- gchar *cache_dir;
- guint dl_zoom_steps;
- guint view_zoom_steps;
- gboolean double_size;
- gboolean nextable;
- RepoType type;
- GtkWidget *menu_item;
-};
-
-/** Data used during the asynchronous progress update phase of automatic map
- * downloading. */
-typedef struct _ProgressUpdateInfo ProgressUpdateInfo;
-struct _ProgressUpdateInfo {
- gchar *src_str;
- gchar *dest_str;
- RepoData *repo;
- guint tilex, tiley, zoom; /* for refresh. */
- gint retries; /* if equal to zero, it means we're DELETING maps. */
- guint priority;
- FILE *file;
-};
-
typedef struct _RouteDownloadData RouteDownloadData;
struct _RouteDownloadData {
gchar *bytes;
#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,
OSM_NODE_PREV,
#include "settings.h"
#include "poi-gui.h"
#include "osm.h"
+#include "osm-db.h"
#include "help.h"
#include "osm.h"
+/** Category list **/
+typedef enum {
+ CAT_ID,
+ CAT_ENABLED,
+ CAT_LABEL,
+ CAT_DESC,
+ CAT_POI_CNT,
+ CAT_ICON,
+ CAT_NUM_COLUMNS
+} CategoryList;
+
typedef enum {
POI_TYPE_POINT=0,
POI_TYPE_LANDMARK=1,
SpeedLocation _speed_location;
InfoFontSize _info_font_size;
-GList *_repo_list;
-RepoData *_curr_repo;
-
#endif
#include "filter.h"
#include "dialogs.h"
#include "settings-gui.h"
+#include "map-repo.h"
/* Callbacks */
#include "cb.h"