]> err.no Git - mapper/blob - src/map-repo.h
Add header and cast properly.
[mapper] / src / map-repo.h
1 #ifndef _MAP_REPO_H
2 #define _MAP_REPO_H
3
4 /** This enumerated type defines the supported types of repositories. */
5 typedef enum {
6         REPOTYPE_NONE,          /* No URL set. */
7         REPOTYPE_XYZ,           /* x=%d, y=%d, and zoom=%d */
8         REPOTYPE_XYZ_INV,       /* zoom=%0d, x=%d, y=%d */
9         REPOTYPE_QUAD_QRST,     /* t=%s   (%s = {qrst}*) */
10         REPOTYPE_QUAD_ZERO,     /* t=%0s  (%0s = {0123}*) */
11         REPOTYPE_WMS            /* "service=wms" */
12 } RepoType;
13
14 /** Data regarding a map repository. */
15 typedef struct _RepoData RepoData;
16 struct _RepoData {
17         gchar *name;
18         gchar *url;
19         gchar *cache_dir;
20         guint dl_zoom_steps;
21         guint view_zoom_steps;
22         gboolean double_size;
23         gboolean nextable;
24         RepoType type;
25         GtkWidget *menu_item;
26 };
27
28 /** Data used during the asynchronous progress update phase of automatic map
29  * downloading. */
30 typedef struct _ProgressUpdateInfo ProgressUpdateInfo;
31 struct _ProgressUpdateInfo {
32         gchar *src_str;
33         gchar *dest_str;
34         RepoData *repo;
35         guint tilex, tiley, zoom;       /* for refresh. */
36         gint retries;           /* if equal to zero, it means we're DELETING maps. */
37         guint priority;
38         FILE *file;
39 };
40
41 GList *_repo_list;
42 RepoData *_curr_repo;
43
44 #endif