ul_mod.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*
  2. * $Id$
  3. *
  4. * User location module interface
  5. *
  6. * Copyright (C) 2001-2003 FhG Fokus
  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. * History:
  30. * ---------
  31. * 2003-03-12 added replication and state column (nils)
  32. */
  33. #ifndef UL_MOD_H
  34. #define UL_MOD_H
  35. #include "../../lib/srdb2/db.h"
  36. #include "../../str.h"
  37. /*
  38. * Module parameters
  39. */
  40. enum ul_db_type {
  41. NO_DB = 0, /* No DB access */
  42. WRITE_THROUGH, /* Propagate changes to DB immediately */
  43. WRITE_BACK, /* Propagate changes with delay */
  44. READONLY, /* Perform initial raad and don't update */
  45. UL_DB_MAX
  46. };
  47. #define NO_DB 0
  48. #define WRITE_THROUGH 1
  49. #define WRITE_BACK 2
  50. #define READONLY 3
  51. extern str uid_col;
  52. extern str contact_col;
  53. extern str expires_col;
  54. extern str q_col;
  55. extern str callid_col;
  56. extern str cseq_col;
  57. extern str method_col;
  58. extern str flags_col;
  59. extern str user_agent_col;
  60. extern str received_col;
  61. extern str instance_col;
  62. extern str aor_col;
  63. extern str server_id_col;
  64. extern str db_url;
  65. extern int timer_interval;
  66. extern int db_mode;
  67. extern int desc_time_order;
  68. extern int db_skip_delete;
  69. extern db_ctx_t* db;
  70. extern db_cmd_t** del_rec;
  71. extern db_cmd_t** del_contact;
  72. extern db_cmd_t** ins_contact;
  73. extern int cmd_n, cur_cmd;
  74. #endif /* UL_MOD_H */