TaPAS  0.2
genepi-plugin-config.h
Go to the documentation of this file.
1 /*
2  * genepi-plugin-config.h -- Configuration tables for plugin
3  *
4  * This file is a part of the GENEric Presburger programming Interface.
5  *
6  * Copyright (C) 2010 CNRS UMR 5800 & Université Bordeaux I (see AUTHORS file).
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21  * 02110-1301 USA
22  */
23 
29 #ifndef __GENEPI_PLUGIN_CONFIG_H__
30 # define __GENEPI_PLUGIN_CONFIG_H__
31 
32 # include <stdio.h>
33 # include <genepi/genepi-common.h>
34 
35 BEGIN_C_DECLS
36 
37 typedef struct genepi_plugconf_st genepi_plugconf;
38 
39 extern genepi_plugconf *
40 genepi_plugconf_create (void);
41 
42 extern int
43 genepi_plugconf_load (genepi_plugconf *conf, FILE *input, const char *location);
44 
45 extern void
46 genepi_plugconf_save (genepi_plugconf *conf, FILE *output);
47 
48 extern genepi_plugconf *
49 genepi_plugconf_add_reference (genepi_plugconf *conf);
50 
51 extern void
52 genepi_plugconf_del_reference (genepi_plugconf *conf);
53 
54 extern genepi_plugconf *
55 genepi_plugconf_duplicate (const genepi_plugconf *conf);
56 
57 extern void
58 genepi_plugconf_merge (genepi_plugconf *conf, const genepi_plugconf *other);
59 
60 extern void
61 genepi_plugconf_add_entry (genepi_plugconf *conf, const char *key,
62  const char *value);
63 
64 extern const char *
65 genepi_plugconf_get_entry (genepi_plugconf *conf, const char *key,
66  const char *default_value);
67 
68 extern int
69 genepi_plugconf_get_bool (genepi_plugconf *conf, const char *key,
70  int default_value);
71 
72 extern int
73 genepi_plugconf_get_int (genepi_plugconf *conf, const char *key,
74  int default_value);
75 
76 extern unsigned int
77 genepi_plugconf_get_unsigned_int (genepi_plugconf *conf, const char *key,
78  unsigned int default_value);
79 
80 END_C_DECLS
81 
82 #endif /* ! __GENEPI_PLUGIN_CONFIG_H__ */