2
0

dp_db.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * $Id$
  3. *
  4. * Copyright (C) 2007-2008 Voice Sistem SRL
  5. *
  6. * This file is part of SIP-router, a free SIP server.
  7. *
  8. * SIP-router is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version
  12. *
  13. * SIP-router is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  21. *
  22. * History:
  23. * --------
  24. * 2007-08-01 initial version (ancuta onofrei)
  25. */
  26. /*!
  27. * \file
  28. * \brief SIP-router dialplan :: Database interface
  29. * \ingroup dialplan
  30. * Module: \ref dialplan
  31. */
  32. #ifndef _DP_DB_H_
  33. #define _DP_DB_H_
  34. #include "../../str.h"
  35. #include "../../lib/srdb1/db.h"
  36. #define DP_TABLE_NAME "dialplan"
  37. #define DPID_COL "dpid"
  38. #define PR_COL "pr"
  39. #define MATCH_OP_COL "match_op"
  40. #define MATCH_EXP_COL "match_exp"
  41. #define MATCH_LEN_COL "match_len"
  42. #define SUBST_EXP_COL "subst_exp"
  43. #define REPL_EXP_COL "repl_exp"
  44. #define ATTRS_COL "attrs"
  45. #define DP_TABLE_VERSION 2
  46. #define DP_TABLE_COL_NO 8
  47. extern str dp_db_url;
  48. extern str dp_table_name;
  49. extern str dpid_column;
  50. extern str pr_column;
  51. extern str match_op_column;
  52. extern str match_exp_column;
  53. extern str match_len_column;
  54. extern str subst_exp_column;
  55. extern str repl_exp_column;
  56. extern str attrs_column;
  57. int init_db_data();
  58. int dp_connect_db();
  59. void dp_disconnect_db();
  60. #endif