bdb_api.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /* $Id$
  2. *
  3. * Copyright (C) 2006-2007 Sippy Software, Inc. <[email protected]>
  4. *
  5. * This file is part of ser, a free SIP server.
  6. *
  7. * ser is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version
  11. *
  12. * For a license to use the ser software under conditions
  13. * other than those described here, or to purchase support for this
  14. * software, please contact iptel.org by e-mail at the following addresses:
  15. * [email protected]
  16. *
  17. * ser is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU General Public License
  23. * along with this program; if not, write to the Free Software
  24. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  25. *
  26. */
  27. #ifndef _BDB_API_H_
  28. #define _BDB_API_H_
  29. int bdb_open_table(db_con_t* _h, const char* _t);
  30. int bdb_use_table(db_con_t* _h, const char* _t);
  31. int bdb_close_table(db_con_t* _h);
  32. int bdb_describe_table(modparam_t type, void* val);
  33. bdb_table_p bdb_find_table(const char* _t);
  34. void bdb_push_table(bdb_table_p _t);
  35. void bdb_free_table(bdb_table_p _t);
  36. void bdb_free_table_list(bdb_table_p _t);
  37. bdb_column_p bdb_find_column(bdb_table_p _t, const char* _c);
  38. void bdb_push_column(bdb_table_p _t, bdb_column_p _c);
  39. void bdb_free_column(bdb_column_p _c);
  40. void bdb_free_column_list(bdb_column_p _c);
  41. int bdb_query_table(db_con_t* _h, bdb_srow_p s_r, bdb_rrow_p r_r, int _n, db_res_t** _r);
  42. int bdb_row_match(db_con_t* _h, bdb_val_p _v, bdb_srow_p s_r);
  43. int bdb_push_res_row(db_con_t* _h, db_res_t** _r, bdb_rrow_p _r_r, int _n, bdb_val_p _v);
  44. int bdb_update_table(db_con_t* _h, bdb_srow_p s_r, bdb_urow_p u_r);
  45. int bdb_delete_table(db_con_t* _h, bdb_srow_p s_r);
  46. #endif