pa_mod.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. /*
  2. * Presence Agent, module interface
  3. *
  4. * $Id$
  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. #ifndef PA_MOD_H
  30. #define PA_MOD_H
  31. #include "../../parser/msg_parser.h"
  32. #include "../../modules/tm/tm_load.h"
  33. #include "../../lib/srdb2/db.h"
  34. #include "../dialog/dlg_mod.h"
  35. #include "auth.h"
  36. /* we have to use something from this module */
  37. #include "../xcap/xcap_mod.h"
  38. extern int default_expires;
  39. extern int max_subscription_expiration; /* max expires value for SUBSCRIBE */
  40. extern int max_publish_expiration; /* max expires value for PUBLISH */
  41. extern double default_priority;
  42. extern int timer_interval;
  43. /* TM bind */
  44. extern struct tm_binds tmb;
  45. extern dlg_func_t dlg_func;
  46. /* DB module bind */
  47. extern db_func_t pa_dbf;
  48. extern db_con_t* pa_db;
  49. extern fill_xcap_params_func fill_xcap_params;
  50. /* PA database */
  51. extern int use_db;
  52. extern int use_place_table;
  53. extern str db_url;
  54. extern str pa_domain;
  55. extern char *presentity_table;
  56. extern char *presentity_contact_table;
  57. extern char *presentity_notes_table;
  58. extern char *extension_elements_table;
  59. extern char *watcherinfo_table;
  60. extern char *place_table;
  61. extern char *tuple_notes_table;
  62. extern char *tuple_extensions_table;
  63. /* columns in DB tables */
  64. extern char *col_uri;
  65. extern char *col_pdomain;
  66. extern char *col_uid;
  67. extern char *col_pres_id;
  68. extern char *col_xcap_params;
  69. extern char *col_tupleid;
  70. extern char *col_basic;
  71. extern char *col_contact;
  72. extern char *col_etag;
  73. extern char *col_published_id;
  74. extern char *col_priority;
  75. extern char *col_expires;
  76. extern char *col_dbid;
  77. extern char *col_note;
  78. extern char *col_lang;
  79. extern char *col_element;
  80. extern char *col_status_extension;
  81. extern char *col_s_id;
  82. extern char *col_w_uri;
  83. extern char *col_package;
  84. extern char *col_status;
  85. extern char *col_display_name;
  86. extern char *col_accepts;
  87. extern char *col_event;
  88. extern char *col_dialog;
  89. extern char *col_server_contact;
  90. extern char *col_doc_index;
  91. extern char *col_watcher;
  92. extern char *col_events;
  93. extern char *col_domain;
  94. extern char *col_created_on;
  95. extern char *col_expires_on;
  96. extern int use_bsearch;
  97. extern int use_location_package;
  98. extern auth_params_t pa_auth_params;
  99. extern auth_params_t winfo_auth_params;
  100. extern int watcherinfo_notify;
  101. extern int use_callbacks;
  102. extern int subscribe_to_users;
  103. extern str pa_subscription_uri;
  104. extern int use_offline_winfo;
  105. extern char *offline_winfo_table;
  106. extern int ignore_408_on_notify;
  107. extern int notify_is_refresh;
  108. extern str pres_rules_file; /* filename for XCAP queries */
  109. db_con_t* create_pa_db_connection();
  110. void close_pa_db_connection(db_con_t* db);
  111. #endif /* PA_MOD_H */