aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/config.h
blob: a1e876ecb27f6a2a3f79a4be24dd0f1ccf423752 (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
/*
 * Asterisk -- A telephony toolkit for Linux.
 *
 * Configuration File Parser
 * 
 * Copyright (C) 1999, Mark Spencer
 *
 * Mark Spencer <markster@linux-support.net>
 *
 * This program is free software, distributed under the terms of
 * the GNU General Public License
 */

#ifndef _ASTERISK_CONFIG_H
#define _ASTERISK_CONFIG_H

#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif

struct ast_config;

struct ast_variable {
	char *name;
	char *value;
	struct ast_variable *next;
};

/* Create a config structure from a given configuration file */
struct ast_config *ast_load(char *configfile);
/* Free memory associated with a given config */
void ast_destroy(struct ast_config *config);
/* List categories of config file */
char *ast_category_browse(struct ast_config *config, char *prev);
/* List variables of config file */
struct ast_variable *ast_variable_browse(struct ast_config *config, char *category);
/* Retrieve a specific variable */
char *ast_variable_retrieve(struct ast_config *config, char *category, char *value);
/* Determine affermativeness of a boolean value */
int ast_true(char *val);

#if defined(__cplusplus) || defined(c_plusplus)
}
#endif



#endif