* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+
+ /**
+ * SECTION:vikmaptype
+ * @short_description: the adapter class to support old map source declaration
+ *
+ * The #VikMapType class handles is an adapter to allow to reuse
+ * old map source (see #VikMapsLayer_MapType).
+ */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "vikmaptype.h"
#include "vikmapslayer_compat.h"
+#include "download.h"
-static guint8 map_type_get_uniq_id (VikMapSource *self);
+static guint16 map_type_get_uniq_id (VikMapSource *self);
static const gchar *map_type_get_label (VikMapSource *self);
static guint16 map_type_get_tilesize_x (VikMapSource *self);
static guint16 map_type_get_tilesize_y (VikMapSource *self);
static VikViewportDrawMode map_type_get_drawmode (VikMapSource *self);
static gboolean map_type_coord_to_mapcoord (VikMapSource *self, const VikCoord *src, gdouble xzoom, gdouble yzoom, MapCoord *dest );
static void map_type_mapcoord_to_center_coord (VikMapSource *self, MapCoord *src, VikCoord *dest);
-static int map_type_download (VikMapSource * self, MapCoord * src, const gchar * dest_fn, void * handle);
+static DownloadResult_t map_type_download (VikMapSource * self, MapCoord * src, const gchar * dest_fn, void * handle);
static void * map_type_download_handle_init (VikMapSource * self);
static void map_type_download_handle_cleanup (VikMapSource * self, void * handle);
object_class->finalize = vik_map_type_finalize;
}
-static guint8
+static guint16
map_type_get_uniq_id (VikMapSource *self)
{
VikMapTypePrivate *priv = VIK_MAP_TYPE_PRIVATE(self);
- g_return_val_if_fail (priv != NULL, (guint8)0);
+ g_return_val_if_fail (priv != NULL, (guint16)0);
return priv->map_type.uniq_id;
}
(priv->map_type.mapcoord_to_center_coord)(src, dest);
}
-static int
+static DownloadResult_t
map_type_download (VikMapSource * self, MapCoord * src, const gchar * dest_fn, void * handle)
{
VikMapTypePrivate *priv = VIK_MAP_TYPE_PRIVATE(self);
(priv->map_type.download_handle_cleanup)(handle);
}
-