]> err.no Git - mapper/blobdiff - src/mapper-types.h
Include settings.h so the banner macro hildon version works.
[mapper] / src / mapper-types.h
index ac1f859173548aa03b4ca36972cc86ccab794c47..1be33ac53de0ed5114e1d48f9078a559dcc48af4 100644 (file)
@@ -1,81 +1,22 @@
 #include "config.h"
 
-#define _GNU_SOURCE
-
-#include <math.h>
-#include <gtk/gtk.h>
-
 #ifndef _MAPPER_TYPES_H
 #define _MAPPER_TYPES_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;
-
-/** Possible center modes.  The "WAS" modes imply no current center mode;
- * they only hint at what the last center mode was, so that it can be
- * recalled. */
-typedef enum {
-       CENTER_WAS_LATLON = -2,
-       CENTER_WAS_LEAD = -1,
-       CENTER_MANUAL =0,
-       CENTER_LEAD = 1,
-       CENTER_LATLON = 2
-} CenterMode;
+#include <math.h>
+#include <gtk/gtk.h>
+#include <curl/multi.h>
 
 /* Route list */
 typedef enum {
        ROUTE_LATLON,
        ROUTE_DISTANCE,
        ROUTE_WAYPOINT,
+       ROUTE_LAT,
+       ROUTE_LON,
        ROUTE_NUM_COLUMNS
 } RouteList;
 
-/** Category list **/
-typedef enum {
-       CAT_ID,
-       CAT_ENABLED,
-       CAT_LABEL,
-       CAT_DESC,
-       CAT_POI_CNT,
-       CAT_NUM_COLUMNS
-} CategoryList;
-
-/** This enum defines the possible units we can use. */
-typedef enum {
-       UNITS_KM,
-       UNITS_MI,
-       UNITS_NM,
-       UNITS_ENUM_COUNT
-} UnitType;
-gchar *UNITS_TEXT[UNITS_ENUM_COUNT];
-
-/* UNITS_CONVERTS, when multiplied, converts from NM. */
-#define EARTH_RADIUS (3440.06479f)
-gfloat UNITS_CONVERT[UNITS_ENUM_COUNT];
-
 /** This enum defines the possible font sizes. */
 typedef enum {
        INFO_FONT_XXSMALL,
@@ -149,17 +90,6 @@ typedef enum {
 gchar *COLORABLE_GCONF[COLORABLE_ENUM_COUNT];
 GdkColor COLORABLE_DEFAULT[COLORABLE_ENUM_COUNT];
 
-typedef enum {
-       DDPDDDDD,
-       DD_MMPMMM,
-       DD_MM_SSPS,
-       DDPDDDDD_NSEW,
-       DD_MMPMMM_NSEW,
-       DD_MM_SSPS_NSEW,
-       DEG_FORMAT_ENUM_COUNT
-} DegFormat;
-gchar *DEG_FORMAT_TEXT[DEG_FORMAT_ENUM_COUNT];
-
 typedef enum {
        SPEED_LOCATION_TOP_LEFT,
        SPEED_LOCATION_TOP_RIGHT,
@@ -169,33 +99,6 @@ typedef enum {
 } 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;