2 * irreco - Ir Remote Control
3 * Copyright (C) 2007 Arto Karppinen (arto.karppinen@iki.fi)
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
10 * This program 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
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 * @addtogroup IrrecoKeyFile
27 * Header file of @ref IrrecoKeyFile.
30 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
32 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
34 * Make sure that typedefs are available before we include anything elese.
36 * This makes sure that whatever other structures that depend on structures
37 * defined in this file will compile OK recardles of header inclusion order.
39 #ifndef __IRRECO_KEYFILE_H_TYPEDEF__
40 #define __IRRECO_KEYFILE_H_TYPEDEF__
41 typedef struct _IrrecoKeyFile IrrecoKeyFile
;
42 #endif /* __IRRECO_KEYFILE_H_TYPEDEF__ */
46 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
48 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
49 #ifndef __IRRECO_KEYFILE_H__
50 #define __IRRECO_KEYFILE_H__
51 #include "irreco_util.h"
55 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
57 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
58 struct _IrrecoKeyFile
{
59 const gchar
*file
; /* Path to keyfile. */
60 const gchar
*dir
; /* Directory where the keyfile is located. */
62 const gchar
*group
; /* Group where to read values.*/
67 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
69 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
70 gboolean
irreco_gkeyfile_write_to_file(GKeyFile
* keyfile
,
72 gboolean
irreco_gkeyfile_write_to_config_file(GKeyFile
* keyfile
,
73 const gchar
* app_name
,
75 void irreco_gkeyfile_set_string(GKeyFile
* keyfile
,
78 const gchar
* string
);
79 void irreco_gkeyfile_set_guint(GKeyFile
* keyfile
,
83 void irreco_gkeyfile_set_glong(GKeyFile
* keyfile
,
87 void irreco_gkeyfile_set_gfloat(GKeyFile
*keyfile
,
91 IrrecoKeyFile
*irreco_keyfile_create(const gchar
*dir
, const gchar
*file
,
93 void irreco_keyfile_destroy(IrrecoKeyFile
* keyfile
);
94 gboolean
irreco_keyfile_set_group(IrrecoKeyFile
* keyfile
, const gchar
*group
);
95 const gchar
*irreco_keyfile_get_group(IrrecoKeyFile
* keyfile
);
96 gboolean
irreco_keyfile_get_str(IrrecoKeyFile
* keyfile
, const gchar
*key
,
98 gboolean
irreco_keyfile_get_path(IrrecoKeyFile
* keyfile
, const gchar
*key
,
100 gboolean
irreco_keyfile_get_int(IrrecoKeyFile
* keyfile
, const gchar
*key
,
102 gboolean
irreco_keyfile_get_uint(IrrecoKeyFile
* keyfile
, const gchar
*key
,
104 gboolean
irreco_keyfile_get_uint16(IrrecoKeyFile
* keyfile
, const gchar
*key
,
106 gboolean
irreco_keyfile_get_glong(IrrecoKeyFile
* keyfile
, const gchar
*key
,
108 gboolean
irreco_keyfile_get_double(IrrecoKeyFile
* keyfile
, const gchar
*key
,
110 gboolean
irreco_keyfile_get_float(IrrecoKeyFile
* keyfile
, const gchar
*key
,
112 gboolean
irreco_keyfile_get_bool(IrrecoKeyFile
* keyfile
, const gchar
*key
,
115 gboolean irreco_keyfile_get_keys(IrrecoKeyFile* keyfile, const gchar *group, gsize **length, gchar ***keys);
117 gboolean
irreco_keyfile_get_gkeyfile(IrrecoKeyFile
* keyfile
, GKeyFile
**gkeyfile
);
118 #endif /* __IRRECO_KEYFILE_H__ */