config_parser.h

Go to the documentation of this file.
00001 /*
00002  * Asterisk -- An open source telephony toolkit.
00003  *
00004  * Copyright (C) 2010, Digium, Inc.
00005  *
00006  * See http://www.asterisk.org for more information about
00007  * the Asterisk project. Please do not directly contact
00008  * any of the maintainers of this project for assistance;
00009  * the project provides a web site, mailing lists and IRC
00010  * channels for your use.
00011  *
00012  * This program is free software, distributed under the terms of
00013  * the GNU General Public License Version 2. See the LICENSE file
00014  * at the top of the source tree.
00015  */
00016 
00017 /*!
00018  * \file
00019  * \brief sip.conf parser header file
00020  */
00021 
00022 #include "sip.h"
00023 
00024 #ifndef _SIP_CONF_PARSE_H
00025 #define _SIP_CONF_PARSE_H
00026 
00027 /*!
00028  * \brief Parse register=> line in sip.conf
00029  *
00030  * \retval 0 on success
00031  * \retval -1 on failure
00032  */
00033 int sip_parse_register_line(struct sip_registry *reg, int default_expiry, const char *value, int lineno);
00034 
00035 /*!
00036  * \brief parses a config line for a host with a transport
00037  *
00038  * An example input would be: 
00039  *     <code>tls://www.google.com:8056</code>
00040  *
00041  * \retval 0 on success
00042  * \retval -1 on failure
00043  */
00044 int sip_parse_host(char *line, int lineno, char **hostname, int *portnum, enum ast_transport *transport);
00045 
00046 /*! \brief Parse the comma-separated nat= option values
00047  * \param value The comma-separated value
00048  * \param mask An array of ast_flags that will be set by this function
00049  *             and used as a mask for copying the flags later
00050  * \param flags An array of ast_flags that will be set by this function
00051  *
00052  * \note The nat-related values in both mask and flags are assumed to empty. This function
00053  * will treat the first "yes" or "no" value in a list of values as overiding all other values
00054  * and will stop parsing. Auto values will override their non-auto counterparts.
00055  */
00056 void sip_parse_nat_option(const char *value, struct ast_flags *mask, struct ast_flags *flags);
00057 
00058 /*!
00059  * \brief register config parsing tests
00060  */
00061 void sip_config_parser_register_tests(void);
00062 
00063 /*!
00064  * \brief unregister config parsing tests
00065  */
00066 void sip_config_parser_unregister_tests(void);
00067 
00068 #endif

Generated on Thu Apr 16 06:27:31 2015 for Asterisk - The Open Source Telephony Project by  doxygen 1.5.6