1 | /* $Id: config_shared.h,v 1.9 2011/06/28 00:13:48 sbajic Exp $ */ |
---|
2 | |
---|
3 | /* |
---|
4 | DSPAM |
---|
5 | COPYRIGHT (C) 2002-2012 DSPAM PROJECT |
---|
6 | |
---|
7 | This program is free software: you can redistribute it and/or modify |
---|
8 | it under the terms of the GNU Affero General Public License as |
---|
9 | published by the Free Software Foundation, either version 3 of the |
---|
10 | License, or (at your option) any later version. |
---|
11 | |
---|
12 | This program is distributed in the hope that it will be useful, |
---|
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
15 | GNU Affero General Public License for more details. |
---|
16 | |
---|
17 | You should have received a copy of the GNU Affero General Public License |
---|
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
19 | |
---|
20 | */ |
---|
21 | |
---|
22 | #ifndef _CONFIG_SHARED_H |
---|
23 | #define _CONFIG_SHARED_H |
---|
24 | |
---|
25 | #ifdef HAVE_CONFIG_H |
---|
26 | #include <auto-config.h> |
---|
27 | #endif |
---|
28 | |
---|
29 | typedef struct attribute { |
---|
30 | char *key; |
---|
31 | char *value; |
---|
32 | struct attribute *next; |
---|
33 | } *attribute_t; |
---|
34 | |
---|
35 | typedef attribute_t *config_t; |
---|
36 | |
---|
37 | struct attribute *_ds_find_attribute(config_t config, const char *key); |
---|
38 | char *_ds_read_attribute(config_t config, const char *key); |
---|
39 | int _ds_add_attribute(config_t config, const char *key, const char *val); |
---|
40 | int _ds_overwrite_attribute(config_t config, const char *key, const char *val); |
---|
41 | int _ds_match_attribute(config_t config, const char *key, const char *val); |
---|
42 | void _ds_destroy_config(config_t config); |
---|
43 | |
---|
44 | #endif /* _CONFIG_SHARED_H */ |
---|