1
/*
2
 * Copyright (C) 2008-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_TILE_SOURCE_H_
25
#define _CHAMPLAIN_TILE_SOURCE_H_
26
27
#include <champlain/champlain-defines.h>
28
#include <champlain/champlain-map-source.h>
29
#include <champlain/champlain-tile-cache.h>
30
31
G_BEGIN_DECLS
32
33
#define CHAMPLAIN_TYPE_TILE_SOURCE champlain_tile_source_get_type ()
34
35
#define CHAMPLAIN_TILE_SOURCE(obj) \
36
  (G_TYPE_CHECK_INSTANCE_CAST ((obj), CHAMPLAIN_TYPE_TILE_SOURCE, ChamplainTileSource))
37
38
#define CHAMPLAIN_TILE_SOURCE_CLASS(klass) \
39
  (G_TYPE_CHECK_CLASS_CAST ((klass), CHAMPLAIN_TYPE_TILE_SOURCE, ChamplainTileSourceClass))
40
41
#define CHAMPLAIN_IS_TILE_SOURCE(obj) \
42
  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CHAMPLAIN_TYPE_TILE_SOURCE))
43
44
#define CHAMPLAIN_IS_TILE_SOURCE_CLASS(klass) \
45
  (G_TYPE_CHECK_CLASS_TYPE ((klass), CHAMPLAIN_TYPE_TILE_SOURCE))
46
47
#define CHAMPLAIN_TILE_SOURCE_GET_CLASS(obj) \
48
  (G_TYPE_INSTANCE_GET_CLASS ((obj), CHAMPLAIN_TYPE_TILE_SOURCE, ChamplainTileSourceClass))
49
50
typedef struct _ChamplainTileSourcePrivate ChamplainTileSourcePrivate;
51
52
typedef struct _ChamplainTileSource ChamplainTileSource;
53
typedef struct _ChamplainTileSourceClass ChamplainTileSourceClass;
54
55
/**
56
 * ChamplainTileSource:
57
 *
58
 * The #ChamplainTileSource structure contains only private data
59
 * and should be accessed using the provided API
60
 *
61
 * Since: 0.6
62
 */
63
struct _ChamplainTileSource
64
{
65
  ChamplainMapSource parent_instance;
66
67
  ChamplainTileSourcePrivate *priv;
68
};
69
70
struct _ChamplainTileSourceClass
71
{
72
  ChamplainMapSourceClass parent_class;
73
};
74
75
GType champlain_tile_source_get_type (void);
76
77
ChamplainTileCache *champlain_tile_source_get_cache (ChamplainTileSource *tile_source);
78
void champlain_tile_source_set_cache (ChamplainTileSource *tile_source,
79
    ChamplainTileCache *cache);
80
81
void champlain_tile_source_set_id (ChamplainTileSource *tile_source,
82
    const gchar *id);
83
void champlain_tile_source_set_name (ChamplainTileSource *tile_source,
84
    const gchar *name);
85
void champlain_tile_source_set_license (ChamplainTileSource *tile_source,
86
    const gchar *license);
87
void champlain_tile_source_set_license_uri (ChamplainTileSource *tile_source,
88
    const gchar *license_uri);
89
90
void champlain_tile_source_set_min_zoom_level (ChamplainTileSource *tile_source,
91
    guint zoom_level);
92
void champlain_tile_source_set_max_zoom_level (ChamplainTileSource *tile_source,
93
    guint zoom_level);
94
void champlain_tile_source_set_tile_size (ChamplainTileSource *tile_source,
95
    guint tile_size);
96
void champlain_tile_source_set_projection (ChamplainTileSource *tile_source,
97
    ChamplainMapProjection projection);
98
99
G_END_DECLS
100
101
#endif /* _CHAMPLAIN_TILE_SOURCE_H_ */