2
0

xmlops_mod.c 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /**
  2. *
  3. * Copyright (C) 2009 Daniel-Constantin Mierla (asipto.com)
  4. *
  5. * This file is part of kamailio, a free SIP server.
  6. *
  7. * Kamailio is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version
  11. *
  12. * Kamailio is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  20. */
  21. /*! \file
  22. * \brief Kamailio xmlops :: Core
  23. * \ingroup xmlops
  24. */
  25. /*! \defgroup xmlops Xmlops :: This module implements a range of XML-based
  26. * operations
  27. */
  28. #include <stdio.h>
  29. #include <stdlib.h>
  30. #include <string.h>
  31. #include <libxml/parser.h>
  32. #include <time.h>
  33. #include "../../sr_module.h"
  34. #include "../../dprint.h"
  35. #include "pv_xml.h"
  36. MODULE_VERSION
  37. extern int pv_xml_buf_size;
  38. static pv_export_t mod_pvs[] = {
  39. { {"xml", sizeof("xml")-1}, PVT_OTHER, pv_get_xml, pv_set_xml,
  40. pv_parse_xml_name, 0, 0, 0 },
  41. { {0, 0}, 0, 0, 0, 0, 0, 0, 0 }
  42. };
  43. static param_export_t params[]={
  44. { "buf_size", INT_PARAM, &pv_xml_buf_size },
  45. { "xml_ns", PARAM_STRING|USE_FUNC_PARAM, (void*)pv_xml_ns_param },
  46. { 0, 0, 0}
  47. };
  48. /** module exports */
  49. struct module_exports exports= {
  50. "xmlops", /* module name */
  51. DEFAULT_DLFLAGS, /* dlopen flags */
  52. 0, /* exported functions */
  53. params, /* exported parameters */
  54. 0, /* exported statistics */
  55. 0, /* exported MI functions */
  56. mod_pvs, /* exported pseudo-variables */
  57. 0, /* extra processes */
  58. 0, /* module initialization function */
  59. 0, /* response handling function */
  60. 0, /* destroy function */
  61. 0 /* per-child init function */
  62. };