summaryrefslogtreecommitdiff
path: root/libmateweather/mateweather-mateconf.h
blob: 5132d819b3b947530b7f3831af99bfda0d6fcfd6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/*
 * mateweather-mateconf.h: MateConf interaction methods for mateweather.
 *
 * Copyright (C) 2005 Philip Langdale, Papadimitriou Spiros
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public
 * License along with this library; if not, see
 * <http://www.gnu.org/licenses/>.
 *
 * Authors:
 *     Philip Langdale <philipl@mail.utexas.edu>
 *     Papadimitriou Spiros <spapadim+@cs.cmu.edu>
 */

#ifndef __MATEWEATHER_MATECONF_WRAPPER_H__
#define __MATEWEATHER_MATECONF_WRAPPER_H__


#ifndef MATEWEATHER_I_KNOW_THIS_IS_UNSTABLE
#error "libmateweather should only be used if you understand that it's subject to change, and is not supported as a fixed API/ABI or as part of the platform"
#endif


#include <glib.h>
#include <mateconf/mateconf-client.h>
#include <mateconf/mateconf-value.h>

#include <libmateweather/weather.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef struct		_MateWeatherMateConf			MateWeatherMateConf;

MateWeatherMateConf *		mateweather_mateconf_new		(const char *prefix);
void			mateweather_mateconf_free		(MateWeatherMateConf *ctx);

MateConfClient *		mateweather_mateconf_get_client	(MateWeatherMateConf *ctx);

WeatherLocation *	mateweather_mateconf_get_location	(MateWeatherMateConf *ctx);

gchar *			mateweather_mateconf_get_full_key	(MateWeatherMateConf *ctx,
							 const gchar *key);

void			mateweather_mateconf_set_bool		(MateWeatherMateConf *ctx,
							 const gchar *key,
							 gboolean the_bool,
							 GError **opt_error);
void			mateweather_mateconf_set_int		(MateWeatherMateConf *ctx,
							 const gchar *key,
							 gint the_int,
							 GError **opt_error);
void			mateweather_mateconf_set_string	(MateWeatherMateConf *ctx,
							 const gchar *key,
							 const gchar *the_string,
							 GError **opt_error);

gboolean		mateweather_mateconf_get_bool		(MateWeatherMateConf *ctx,
							 const gchar *key,
							 GError **opt_error);
gint			mateweather_mateconf_get_int		(MateWeatherMateConf *ctx,
							 const gchar *key,
							 GError **opt_error);
gchar *			mateweather_mateconf_get_string	(MateWeatherMateConf *ctx,
							 const gchar *key,
							 GError **opt_error);

#ifdef __cplusplus
}
#endif

#endif /* __MATEWEATHER_MATECONF_WRAPPER_H__ */