Adds DAHDI support alongside Zaptel. DAHDI usage favored, but all Zap stuff should...
[asterisk-bristuff.git] / include / asterisk / astdb.h
blob828fe97259178e5f68d932f57b2fc40e4c8eba1a
1 /*
2 * Asterisk -- An open source telephony toolkit.
4 * Copyright (C) 1999 - 2005, Digium, Inc.
6 * Mark Spencer <markster@digium.com>
8 * See http://www.asterisk.org for more information about
9 * the Asterisk project. Please do not directly contact
10 * any of the maintainers of this project for assistance;
11 * the project provides a web site, mailing lists and IRC
12 * channels for your use.
14 * This program is free software, distributed under the terms of
15 * the GNU General Public License Version 2. See the LICENSE file
16 * at the top of the source tree.
19 /*! \file
20 * \brief Persistant data storage (akin to *doze registry)
23 #ifndef _ASTERISK_ASTDB_H
24 #define _ASTERISK_ASTDB_H
26 #if defined(__cplusplus) || defined(c_plusplus)
27 extern "C" {
28 #endif
30 struct ast_db_entry {
31 struct ast_db_entry *next;
32 char *key;
33 char data[0];
36 int ast_db_get(const char *family, const char *key, char *out, int outlen);
38 int ast_db_put(const char *family, const char *key, char *value);
40 int ast_db_del(const char *family, const char *key);
42 int ast_db_deltree(const char *family, const char *keytree);
44 struct ast_db_entry *ast_db_gettree(const char *family, const char *keytree);
46 void ast_db_freetree(struct ast_db_entry *entry);
48 #if defined(__cplusplus) || defined(c_plusplus)
50 #endif
52 #endif /* _ASTERISK_ASTDB_H */