db_mod.c 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*
  2. * Module interface
  3. *
  4. * Copyright (C) 2005 RingCentral Inc.
  5. * Created by Dmitry Semyonov <[email protected]>
  6. *
  7. *
  8. * This file is part of ser, a free SIP server.
  9. *
  10. * ser is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License as published by
  12. * the Free Software Foundation; either version 2 of the License, or
  13. * (at your option) any later version
  14. *
  15. * For a license to use the ser software under conditions
  16. * other than those described here, or to purchase support for this
  17. * software, please contact iptel.org by e-mail at the following addresses:
  18. * [email protected]
  19. *
  20. * ser is distributed in the hope that it will be useful,
  21. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  22. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  23. * GNU General Public License for more details.
  24. *
  25. * You should have received a copy of the GNU General Public License
  26. * along with this program; if not, write to the Free Software
  27. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  28. */
  29. #include "../../sr_module.h"
  30. #include "dbase.h"
  31. MODULE_VERSION
  32. /*
  33. * Oracle database module interface
  34. */
  35. static cmd_export_t cmds[] = {
  36. {"db_use_table", (cmd_function)db_use_table, 2, 0, 0},
  37. {"db_init", (cmd_function)db_init, 1, 0, 0},
  38. {"db_close", (cmd_function)db_close, 2, 0, 0},
  39. {"db_query", (cmd_function)db_query, 2, 0, 0},
  40. {"db_raw_query", (cmd_function)db_raw_query, 2, 0, 0},
  41. {"db_free_result", (cmd_function)db_free_result, 2, 0, 0},
  42. {"db_insert", (cmd_function)db_insert, 2, 0, 0},
  43. {"db_delete", (cmd_function)db_delete, 2, 0, 0},
  44. {"db_update", (cmd_function)db_update, 2, 0, 0},
  45. {0, 0, 0, 0, 0}
  46. };
  47. struct module_exports exports = {
  48. "oracle",
  49. cmds,
  50. 0, /* module paramers */
  51. 0, /* module initialization function */
  52. 0, /* response function*/
  53. 0, /* destroy function */
  54. 0, /* oncancel function */
  55. 0 /* per-child init function */
  56. };