ul_mi.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /*
  2. * $Id: ul_mi.h 5194 2008-11-13 10:38:11Z henningw $
  3. *
  4. * Copyright (C) 2006 Voice Sistem SRL
  5. *
  6. * This file is part of Kamailio, a free SIP server.
  7. *
  8. * Kamailio 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. * Kamailio 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. /*! \file
  23. * \brief USRLOC - Usrloc MI functions
  24. * \ingroup usrloc
  25. */
  26. #ifndef _USRLOC_MI_H_
  27. #define _USRLOC_MI_H_
  28. #include "../../lib/kmi/mi.h"
  29. #define MI_USRLOC_RM "ul_rm"
  30. #define MI_USRLOC_RM_CONTACT "ul_rm_contact"
  31. #define MI_USRLOC_DUMP "ul_dump"
  32. #define MI_USRLOC_FLUSH "ul_flush"
  33. #define MI_USRLOC_ADD "ul_add"
  34. #define MI_USRLOC_SHOW_CONTACT "ul_show_contact"
  35. /*!
  36. * \brief Delete a address of record including its contacts
  37. * \param cmd mi_root containing the parameter
  38. * \param param not used
  39. * \note expects 2 nodes: the table name and the AOR
  40. * \return mi_root with the result
  41. */
  42. struct mi_root* mi_usrloc_rm_aor(struct mi_root *cmd, void *param);
  43. /*!
  44. * \brief Delete a contact from an AOR record
  45. * \param cmd mi_root containing the parameter
  46. * \param param not used
  47. * \note expects 3 nodes: the table name, the AOR and contact
  48. * \return mi_root with the result or 0 on failure
  49. */
  50. struct mi_root* mi_usrloc_rm_contact(struct mi_root *cmd, void *param);
  51. /*!
  52. * \brief Dump the content of the usrloc
  53. * \param cmd mi_root containing the parameter
  54. * \param param not used
  55. * \return mi_root with the result or 0 on failure
  56. */
  57. struct mi_root* mi_usrloc_dump(struct mi_root *cmd, void *param);
  58. /*!
  59. * \brief Flush the usrloc memory cache to DB
  60. * \param cmd mi_root containing the parameter
  61. * \param param not used
  62. * \return mi_root with the result or 0 on failure
  63. */
  64. struct mi_root* mi_usrloc_flush(struct mi_root *cmd, void *param);
  65. /*!
  66. * \brief Add a new contact for an address of record
  67. * \param cmd mi_root containing the parameter
  68. * \param param not used
  69. * \note Expects 7 nodes: table name, AOR, contact, expires, Q,
  70. * useless - backward compatible, flags, cflags, methods
  71. * \return mi_root with the result
  72. */
  73. struct mi_root* mi_usrloc_add(struct mi_root *cmd, void *param);
  74. /*!
  75. * \brief Dumps the contacts of an AOR
  76. * \param cmd mi_root containing the parameter
  77. * \param param not used
  78. * \note expects 2 nodes: the table name and the AOR
  79. * \return mi_root with the result or 0 on failure
  80. */
  81. struct mi_root* mi_usrloc_show_contact(struct mi_root *cmd, void *param);
  82. #endif