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_NETWORK_TILE_SOURCE_H_
25
#define _CHAMPLAIN_NETWORK_TILE_SOURCE_H_
26
27
#include <champlain/champlain-defines.h>
28
#include <champlain/champlain-tile-source.h>
29
30
G_BEGIN_DECLS
31
32
#define CHAMPLAIN_TYPE_NETWORK_TILE_SOURCE champlain_network_tile_source_get_type ()
33
34
#define CHAMPLAIN_NETWORK_TILE_SOURCE(obj) \
35
  (G_TYPE_CHECK_INSTANCE_CAST ((obj), CHAMPLAIN_TYPE_NETWORK_TILE_SOURCE, ChamplainNetworkTileSource))
36
37
#define CHAMPLAIN_NETWORK_TILE_SOURCE_CLASS(klass) \
38
  (G_TYPE_CHECK_CLASS_CAST ((klass), CHAMPLAIN_TYPE_NETWORK_TILE_SOURCE, ChamplainNetworkTileSourceClass))
39
40
#define CHAMPLAIN_IS_NETWORK_TILE_SOURCE(obj) \
41
  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CHAMPLAIN_TYPE_NETWORK_TILE_SOURCE))
42
43
#define CHAMPLAIN_IS_NETWORK_TILE_SOURCE_CLASS(klass) \
44
  (G_TYPE_CHECK_CLASS_TYPE ((klass), CHAMPLAIN_TYPE_NETWORK_TILE_SOURCE))
45
46
#define CHAMPLAIN_NETWORK_TILE_SOURCE_GET_CLASS(obj) \
47
  (G_TYPE_INSTANCE_GET_CLASS ((obj), CHAMPLAIN_TYPE_NETWORK_TILE_SOURCE, ChamplainNetworkTileSourceClass))
48
49
typedef struct _ChamplainNetworkTileSourcePrivate ChamplainNetworkTileSourcePrivate;
50
51
typedef struct _ChamplainNetworkTileSource ChamplainNetworkTileSource;
52
typedef struct _ChamplainNetworkTileSourceClass ChamplainNetworkTileSourceClass;
53
54
/**
55
 * ChamplainNetworkTileSource:
56
 *
57
 * The #ChamplainNetworkTileSource structure contains only private data
58
 * and should be accessed using the provided API
59
 *
60
 * Since: 0.6
61
 */
62
struct _ChamplainNetworkTileSource
63
{
64
  ChamplainTileSource parent_instance;
65
66
  ChamplainNetworkTileSourcePrivate *priv;
67
};
68
69
struct _ChamplainNetworkTileSourceClass
70
{
71
  ChamplainTileSourceClass parent_class;
72
};
73
74
GType champlain_network_tile_source_get_type (void);
75
76
ChamplainNetworkTileSource *champlain_network_tile_source_new_full (const gchar *id,
77
    const gchar *name,
78
    const gchar *license,
79
    const gchar *license_uri,
80
    guint min_zoom,
81
    guint max_zoom,
82
    guint tile_size,
83
    ChamplainMapProjection projection,
84
    const gchar *uri_format,
85
    ChamplainRenderer *renderer);
86
87
const gchar *champlain_network_tile_source_get_uri_format (ChamplainNetworkTileSource *tile_source);
88
void champlain_network_tile_source_set_uri_format (ChamplainNetworkTileSource *tile_source,
89
    const gchar *uri_format);
90
91
gboolean champlain_network_tile_source_get_offline (ChamplainNetworkTileSource *tile_source);
92
void champlain_network_tile_source_set_offline (ChamplainNetworkTileSource *tile_source,
93
    gboolean offline);
94
95
const gchar *champlain_network_tile_source_get_proxy_uri (ChamplainNetworkTileSource *tile_source);
96
void champlain_network_tile_source_set_proxy_uri (ChamplainNetworkTileSource *tile_source,
97
    const gchar *proxy_uri);
98
99
G_END_DECLS
100
101
#endif /* _CHAMPLAIN_NETWORK_TILE_SOURCE_H_ */