xmlops_mod.c 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /**
  2. * $Id$
  3. *
  4. * Copyright (C) 2009 Daniel-Constantin Mierla (asipto.com)
  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 Kamailio xmlops :: Core
  24. * \ingroup xmlops
  25. */
  26. /*! \defgroup xmlops Xmlops :: This module implements a range of XML-based
  27. * operations
  28. */
  29. #include <stdio.h>
  30. #include <stdlib.h>
  31. #include <string.h>
  32. #include <libxml/parser.h>
  33. #include <time.h>
  34. #include "../../sr_module.h"
  35. #include "../../dprint.h"
  36. #include "pv_xml.h"
  37. MODULE_VERSION
  38. extern int pv_xml_buf_size;
  39. static pv_export_t mod_pvs[] = {
  40. { {"xml", sizeof("xml")-1}, PVT_OTHER, pv_get_xml, pv_set_xml,
  41. pv_parse_xml_name, 0, 0, 0 },
  42. { {0, 0}, 0, 0, 0, 0, 0, 0, 0 }
  43. };
  44. static param_export_t params[]={
  45. { "buf_size", INT_PARAM, &pv_xml_buf_size },
  46. { "xml_ns", PARAM_STRING|USE_FUNC_PARAM, (void*)pv_xml_ns_param },
  47. { 0, 0, 0}
  48. };
  49. /** module exports */
  50. struct module_exports exports= {
  51. "xmlops", /* module name */
  52. DEFAULT_DLFLAGS, /* dlopen flags */
  53. 0, /* exported functions */
  54. params, /* exported parameters */
  55. 0, /* exported statistics */
  56. 0, /* exported MI functions */
  57. mod_pvs, /* exported pseudo-variables */
  58. 0, /* extra processes */
  59. 0, /* module initialization function */
  60. 0, /* response handling function */
  61. 0, /* destroy function */
  62. 0 /* per-child init function */
  63. };