config_parser.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * Asterisk -- An open source telephony toolkit.
  3. *
  4. * Copyright (C) 2010, Digium, Inc.
  5. *
  6. * See http://www.asterisk.org for more information about
  7. * the Asterisk project. Please do not directly contact
  8. * any of the maintainers of this project for assistance;
  9. * the project provides a web site, mailing lists and IRC
  10. * channels for your use.
  11. *
  12. * This program is free software, distributed under the terms of
  13. * the GNU General Public License Version 2. See the LICENSE file
  14. * at the top of the source tree.
  15. */
  16. /*!
  17. * \file
  18. * \brief sip.conf parser header file
  19. */
  20. #include "sip.h"
  21. #ifndef _SIP_CONF_PARSE_H
  22. #define _SIP_CONF_PARSE_H
  23. /*!
  24. * \brief Parse register=> line in sip.conf
  25. *
  26. * \retval 0 on success
  27. * \retval -1 on failure
  28. */
  29. int sip_parse_register_line(struct sip_registry *reg, int default_expiry, const char *value, int lineno);
  30. /*!
  31. * \brief parses a config line for a host with a transport
  32. *
  33. * An example input would be:
  34. * <code>tls://www.google.com:8056</code>
  35. *
  36. * \retval 0 on success
  37. * \retval -1 on failure
  38. */
  39. int sip_parse_host(char *line, int lineno, char **hostname, int *portnum, enum sip_transport *transport);
  40. /*!
  41. * \brief register config parsing tests
  42. */
  43. void sip_config_parser_register_tests(void);
  44. /*!
  45. * \brief unregister config parsing tests
  46. */
  47. void sip_config_parser_unregister_tests(void);
  48. #endif