1
/*
2
 * Copyright (C) 2009 Pierre-Luc Beaudoin <pierre-luc@pierlux.com>
3
 * Copyright (C) 2010-2012 Jiri Techet <techet@gmail.com>
4
 *
5
 * This library is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU Lesser General Public
7
 * License as published by the Free Software Foundation; either
8
 * version 2.1 of the License, or (at your option) any later version.
9
 *
10
 * This library is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
 * Lesser General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU Lesser General Public
16
 * License along with this library; if not, write to the Free Software
17
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
 */
19
20
#if !defined (__CHAMPLAIN_CHAMPLAIN_H_INSIDE__) && !defined (CHAMPLAIN_COMPILATION)
21
#error "Only <champlain/champlain.h> can be included directly."
22
#endif
23
24
#ifndef CHAMPLAIN_MAP_SOURCE_FACTORY_H
25
#define CHAMPLAIN_MAP_SOURCE_FACTORY_H
26
27
#include <champlain/champlain-features.h>
28
#include <champlain/champlain-defines.h>
29
#include <champlain/champlain-map-source.h>
30
#include <champlain/champlain-map-source-desc.h>
31
32
#include <glib-object.h>
33
34
G_BEGIN_DECLS
35
36
#define CHAMPLAIN_TYPE_MAP_SOURCE_FACTORY champlain_map_source_factory_get_type ()
37
38
#define CHAMPLAIN_MAP_SOURCE_FACTORY(obj) \
39
  (G_TYPE_CHECK_INSTANCE_CAST ((obj), CHAMPLAIN_TYPE_MAP_SOURCE_FACTORY, ChamplainMapSourceFactory))
40
41
#define CHAMPLAIN_MAP_SOURCE_FACTORY_CLASS(klass) \
42
  (G_TYPE_CHECK_CLASS_CAST ((klass), CHAMPLAIN_TYPE_MAP_SOURCE_FACTORY, ChamplainMapSourceFactoryClass))
43
44
#define CHAMPLAIN_IS_MAP_SOURCE_FACTORY(obj) \
45
  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CHAMPLAIN_TYPE_MAP_SOURCE_FACTORY))
46
47
#define CHAMPLAIN_IS_MAP_SOURCE_FACTORY_CLASS(klass) \
48
  (G_TYPE_CHECK_CLASS_TYPE ((klass), CHAMPLAIN_TYPE_MAP_SOURCE_FACTORY))
49
50
#define CHAMPLAIN_MAP_SOURCE_FACTORY_GET_CLASS(obj) \
51
  (G_TYPE_INSTANCE_GET_CLASS ((obj), CHAMPLAIN_TYPE_MAP_SOURCE_FACTORY, ChamplainMapSourceFactoryClass))
52
53
typedef struct _ChamplainMapSourceFactoryPrivate ChamplainMapSourceFactoryPrivate;
54
55
typedef struct _ChamplainMapSourceFactory ChamplainMapSourceFactory;
56
typedef struct _ChamplainMapSourceFactoryClass ChamplainMapSourceFactoryClass;
57
58
/**
59
 * ChamplainMapSourceFactory:
60
 *
61
 * The #ChamplainMapSourceFactory structure contains only private data
62
 * and should be accessed using the provided API
63
 *
64
 * Since: 0.4
65
 */
66
struct _ChamplainMapSourceFactory
67
{
68
  GObject parent;
69
  ChamplainMapSourceFactoryPrivate *priv;
70
};
71
72
struct _ChamplainMapSourceFactoryClass
73
{
74
  GObjectClass parent_class;
75
};
76
77
GType champlain_map_source_factory_get_type (void);
78
79
ChamplainMapSourceFactory *champlain_map_source_factory_dup_default (void);
80
81
ChamplainMapSource *champlain_map_source_factory_create (ChamplainMapSourceFactory *factory,
82
    const gchar *id);
83
ChamplainMapSource *champlain_map_source_factory_create_cached_source (ChamplainMapSourceFactory *factory,
84
    const gchar *id);
85
ChamplainMapSource *champlain_map_source_factory_create_error_source (ChamplainMapSourceFactory *factory,
86
    guint tile_size);
87
88
gboolean champlain_map_source_factory_register (ChamplainMapSourceFactory *factory,
89
    ChamplainMapSourceDesc *desc);
90
GSList *champlain_map_source_factory_get_registered (ChamplainMapSourceFactory *factory);
91
92
#ifndef CHAMPLAIN_HAS_MAEMO
93
/**
94
 * CHAMPLAIN_MAP_SOURCE_OSM_MAPNIK:
95
 *
96
 * OpenStreetMap Mapnik
97
 */
98
#define CHAMPLAIN_MAP_SOURCE_OSM_MAPNIK "osm-mapnik"
99
/**
100
 * CHAMPLAIN_MAP_SOURCE_OSM_OSMARENDER:
101
 *
102
 * OpenStreetMap Osmarender
103
 */
104
#define CHAMPLAIN_MAP_SOURCE_OSM_OSMARENDER "osm-osmarender"
105
/**
106
 * CHAMPLAIN_MAP_SOURCE_OSM_MAPQUEST:
107
 *
108
 * Mapquest OpenStreetMap
109
 */
110
#define CHAMPLAIN_MAP_SOURCE_OSM_MAPQUEST "osm-mapquest"
111
/**
112
 * CHAMPLAIN_MAP_SOURCE_OSM_CYCLE_MAP:
113
 *
114
 * OpenStreetMap Cycle Map
115
 */
116
#define CHAMPLAIN_MAP_SOURCE_OSM_CYCLE_MAP "osm-cyclemap"
117
/**
118
 * CHAMPLAIN_MAP_SOURCE_OSM_TRANSPORT_MAP:
119
 *
120
 * OpenStreetMap Transport Map
121
 */
122
#define CHAMPLAIN_MAP_SOURCE_OSM_TRANSPORT_MAP "osm-transportmap"
123
/**
124
 * CHAMPLAIN_MAP_SOURCE_OAM:
125
 *
126
 * OpenAerialMap
127
 */
128
#define CHAMPLAIN_MAP_SOURCE_OAM "OpenAerialMap"
129
/**
130
 * CHAMPLAIN_MAP_SOURCE_MFF_RELIEF:
131
 *
132
 * Maps for Free Relief
133
 */
134
#define CHAMPLAIN_MAP_SOURCE_MFF_RELIEF "mff-relief"
135
#else
136
#define CHAMPLAIN_MAP_SOURCE_OSM_MAPNIK "OpenStreetMap I"
137
#define CHAMPLAIN_MAP_SOURCE_OSM_OSMARENDER "OpenStreetMap II"
138
#define CHAMPLAIN_MAP_SOURCE_OSM_MAPQUEST "Mapquest OSM"
139
#define CHAMPLAIN_MAP_SOURCE_OSM_CYCLE_MAP "OpenCycleMap"
140
#define CHAMPLAIN_MAP_SOURCE_OSM_TRANSPORT_MAP "Public Transport"
141
#define CHAMPLAIN_MAP_SOURCE_OAM "OpenAerialMap"
142
#define CHAMPLAIN_MAP_SOURCE_MFF_RELIEF "MapsForFree Relief"
143
#endif
144
145
#ifdef CHAMPLAIN_HAS_MEMPHIS
146
/**
147
 * CHAMPLAIN_MAP_SOURCE_MEMPHIS_LOCAL:
148
 *
149
 * OpenStreetMap Memphis Local Map
150
 */
151
#define CHAMPLAIN_MAP_SOURCE_MEMPHIS_LOCAL "memphis-local"
152
/**
153
 * CHAMPLAIN_MAP_SOURCE_MEMPHIS_NETWORK:
154
 *
155
 * OpenStreetMap Memphis Network Map
156
 */
157
#define CHAMPLAIN_MAP_SOURCE_MEMPHIS_NETWORK "memphis-network"
158
#endif
159
160
G_END_DECLS
161
162
#endif