]> git.itanic.dy.fi Git - maemo-mapper/blob - src/maps.h
Fixed a silly little seg fault on startup.
[maemo-mapper] / src / maps.h
1 /*
2  * Copyright (C) 2006, 2007 John Costigan.
3  *
4  * POI and GPS-Info code originally written by Cezary Jackiewicz.
5  *
6  * Default map data provided by http://www.openstreetmap.org/
7  *
8  * This file is part of Maemo Mapper.
9  *
10  * Maemo Mapper is free software: you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation, either version 3 of the License, or
13  * (at your option) any later version.
14  *
15  * Maemo Mapper is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with Maemo Mapper.  If not, see <http://www.gnu.org/licenses/>.
22  */
23
24 #ifndef MAEMO_MAPPER_MAPS_H
25 #define MAEMO_MAPPER_MAPS_H
26
27 size_t map_cache_resize(size_t cache_size);
28 void map_cache_clean (void);
29
30 void maps_init();
31 void maps_destroy();
32
33 RepoData *create_default_repo();
34
35 gboolean mapdb_exists(RepoData *repo, gint zoom, gint tilex, gint tiley);
36 GdkPixbuf* mapdb_get(RepoData *repo, gint zoom, gint tilex, gint tiley);
37
38 void set_repo_type(RepoData *repo);
39 gboolean repo_set_curr(RepoData *rd);
40 gboolean repo_is_layer (RepoData* base, RepoData* layer);
41
42 gboolean mapdb_initiate_update(RepoData *repo, gint zoom, gint tilex,
43         gint tiley, gint update_type, gint batch_id, gint priority,
44         ThreadLatch *refresh_latch);
45
46 guint mut_exists_hashfunc(const MapUpdateTask *a);
47 gboolean mut_exists_equalfunc(const MapUpdateTask *a, const MapUpdateTask *b);
48 gint mut_priority_comparefunc(const MapUpdateTask *a, const MapUpdateTask *b);
49 gboolean thread_proc_mut(void);
50
51 gboolean repoman_dialog(void);
52
53 gboolean repoman_download(void);
54
55 gboolean mapman_dialog(void);
56
57 gboolean map_layer_refresh_cb (gpointer data);
58
59 void maps_toggle_visible_layers ();
60
61 /* returns amount of seconds since tile downloaded */
62 gint get_tile_age (GdkPixbuf* pixbuf);
63
64 #endif /* ifndef MAEMO_MAPPER_MAPS_H */