bdb_api.h

00001 /* $Id$
00002  *
00003  * Copyright (C) 2006-2007 Sippy Software, Inc. <sales@sippysoft.com>
00004  *
00005  * This file is part of ser, a free SIP server.
00006  *
00007  * ser is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License as published by
00009  * the Free Software Foundation; either version 2 of the License, or
00010  * (at your option) any later version
00011  *
00012  * For a license to use the ser software under conditions
00013  * other than those described here, or to purchase support for this
00014  * software, please contact iptel.org by e-mail at the following addresses:
00015  *    info@iptel.org
00016  *
00017  * ser is distributed in the hope that it will be useful,
00018  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020  * GNU General Public License for more details.
00021  *
00022  * You should have received a copy of the GNU General Public License
00023  * along with this program; if not, write to the Free Software
00024  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025  *
00026  */
00027 
00028 
00029 #ifndef _BDB_API_H_
00030 #define _BDB_API_H_
00031 
00032 int bdb_open_table(db_con_t* _h, const char* _t);
00033 int bdb_use_table(db_con_t* _h, const char* _t);
00034 int bdb_close_table(db_con_t* _h);
00035 
00036 int bdb_describe_table(modparam_t type, void* val);
00037 
00038 bdb_table_p bdb_find_table(const char* _t);
00039 void bdb_push_table(bdb_table_p _t);
00040 void bdb_free_table(bdb_table_p _t);
00041 void bdb_free_table_list(bdb_table_p _t);
00042 
00043 bdb_column_p bdb_find_column(bdb_table_p _t, const char* _c);
00044 void bdb_push_column(bdb_table_p _t, bdb_column_p _c);
00045 void bdb_free_column(bdb_column_p _c);
00046 void bdb_free_column_list(bdb_column_p _c);
00047 
00048 int bdb_query_table(db_con_t* _h, bdb_srow_p s_r, bdb_rrow_p r_r, int _n, db_res_t** _r);
00049 int bdb_row_match(db_con_t* _h, bdb_val_p _v, bdb_srow_p s_r);
00050 int bdb_push_res_row(db_con_t* _h, db_res_t** _r, bdb_rrow_p _r_r, int _n, bdb_val_p _v);
00051 
00052 int bdb_update_table(db_con_t* _h, bdb_srow_p s_r, bdb_urow_p u_r);
00053 
00054 int bdb_delete_table(db_con_t* _h, bdb_srow_p s_r);
00055 
00056 #endif