mirror of
https://github.com/asterisk/asterisk.git
synced 2025-12-15 11:09:39 +00:00
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10 65c4cc65-6c06-0410-ace0-fbb531ad65f3
49 lines
1.2 KiB
C
Executable File
49 lines
1.2 KiB
C
Executable File
/*
|
|
* Asterisk -- A telephony toolkit for Linux.
|
|
*
|
|
* Configuration File Parser
|
|
*
|
|
* Copyright (C) 1999, Adtran Inc. and Linux Support Services, LLC
|
|
*
|
|
* 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
|