OpenDNSSEC-enforcer  2.1.3
db_configuration.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Jerry Lundström <lundstrom.jerry@gmail.com>
3  * Copyright (c) 2014 .SE (The Internet Infrastructure Foundation).
4  * Copyright (c) 2014 OpenDNSSEC AB (svb)
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  * 1. Redistributions of source code must retain the above copyright
11  * notice, this list of conditions and the following disclaimer.
12  * 2. Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
20  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
22  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
24  * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
25  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  *
28  */
29 
30 #ifndef __db_configuration_h
31 #define __db_configuration_h
32 
33 struct db_configuration;
37 
43  char* name;
44  char* value;
45 };
46 
52 
57 void db_configuration_free(db_configuration_t* configuration);
58 
65 const char* db_configuration_value(const db_configuration_t* configuration);
66 
73 int db_configuration_set_name(db_configuration_t* configuration, const char* name);
74 
81 int db_configuration_set_value(db_configuration_t* configuration, const char* value);
82 
88 int db_configuration_not_empty(const db_configuration_t* configuration);
89 
96 };
97 
103 
109 void db_configuration_list_free(db_configuration_list_t* configuration_list);
110 
122 int db_configuration_list_add(db_configuration_list_t* configuration_list, db_configuration_t* configuration);
123 
131 const db_configuration_t* db_configuration_list_find(const db_configuration_list_t* configuration_list, const char* name);
132 
133 #endif
int db_configuration_not_empty(const db_configuration_t *configuration)
db_configuration_list_t * db_configuration_list_new(void)
db_configuration_t * next
int db_configuration_set_value(db_configuration_t *configuration, const char *value)
const db_configuration_t * db_configuration_list_find(const db_configuration_list_t *configuration_list, const char *name)
db_configuration_t * end
void db_configuration_list_free(db_configuration_list_t *configuration_list)
int db_configuration_list_add(db_configuration_list_t *configuration_list, db_configuration_t *configuration)
const char * db_configuration_value(const db_configuration_t *configuration)
db_configuration_t * db_configuration_new(void)
int db_configuration_set_name(db_configuration_t *configuration, const char *name)
db_configuration_t * begin
void db_configuration_free(db_configuration_t *configuration)