1 /*
2  * e-source-weather.h
3  *
4  * This library is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation.
7  *
8  * This library is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
11  * for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this library. If not, see <http://www.gnu.org/licenses/>.
15  *
16  */
17 
18 #if !defined (__LIBEDATASERVER_H_INSIDE__) && !defined (LIBEDATASERVER_COMPILATION)
19 #error "Only <libedataserver/libedataserver.h> should be included directly."
20 #endif
21 
22 #ifndef E_SOURCE_WEATHER_H
23 #define E_SOURCE_WEATHER_H
24 
25 #include <libedataserver/e-source-extension.h>
26 #include <libedataserver/e-source-enums.h>
27 
28 /* Standard GObject macros */
29 #define E_TYPE_SOURCE_WEATHER \
30 	(e_source_weather_get_type ())
31 #define E_SOURCE_WEATHER(obj) \
32 	(G_TYPE_CHECK_INSTANCE_CAST \
33 	((obj), E_TYPE_SOURCE_WEATHER, ESourceWeather))
34 #define E_SOURCE_WEATHER_CLASS(cls) \
35 	(G_TYPE_CHECK_CLASS_CAST \
36 	((cls), E_TYPE_SOURCE_WEATHER, ESourceWeatherClass))
37 #define E_IS_SOURCE_WEATHER(obj) \
38 	(G_TYPE_CHECK_INSTANCE_TYPE \
39 	((obj), E_TYPE_SOURCE_WEATHER))
40 #define E_IS_SOURCE_WEATHER_CLASS(cls) \
41 	(G_TYPE_CHECK_CLASS_TYPE \
42 	((cls), E_TYPE_SOURCE_WEATHER))
43 #define E_SOURCE_WEATHER_GET_CLASS(obj) \
44 	(G_TYPE_INSTANCE_GET_CLASS \
45 	((obj), E_TYPE_SOURCE_WEATHER, ESourceWeatherClass))
46 
47 /**
48  * E_SOURCE_EXTENSION_WEATHER_BACKEND:
49  *
50  * Pass this extension name to e_source_get_extension() to access
51  * #ESourceWeather.  This is also used as a group name in key files.
52  *
53  * Since: 3.18
54  **/
55 #define E_SOURCE_EXTENSION_WEATHER_BACKEND "Weather Backend"
56 
57 G_BEGIN_DECLS
58 
59 typedef struct _ESourceWeather ESourceWeather;
60 typedef struct _ESourceWeatherClass ESourceWeatherClass;
61 typedef struct _ESourceWeatherPrivate ESourceWeatherPrivate;
62 
63 struct _ESourceWeather {
64 	/*< private >*/
65 	ESourceExtension parent;
66 	ESourceWeatherPrivate *priv;
67 };
68 
69 struct _ESourceWeatherClass {
70 	ESourceExtensionClass parent_class;
71 };
72 
73 GType		e_source_weather_get_type	(void);
74 const gchar *	e_source_weather_get_location	(ESourceWeather *extension);
75 gchar *		e_source_weather_dup_location	(ESourceWeather *extension);
76 void		e_source_weather_set_location	(ESourceWeather *extension,
77 						 const gchar *location);
78 ESourceWeatherUnits
79 		e_source_weather_get_units	(ESourceWeather *extension);
80 void		e_source_weather_set_units	(ESourceWeather *extension,
81 						 ESourceWeatherUnits units);
82 
83 G_END_DECLS
84 
85 #endif /* E_SOURCE_WEATHER_H */
86