libosip 3.6.0

parser.h

00001 /*
00002   The oSIP library implements the Session Initiation Protocol (SIP -rfc3261-)
00003   Copyright (C) 2001,2002,2003,2004,2005,2006,2007 Aymeric MOIZARD jack@atosc.org
00004   
00005   This library is free software; you can redistribute it and/or
00006   modify it under the terms of the GNU Lesser General Public
00007   License as published by the Free Software Foundation; either
00008   version 2.1 of the License, or (at your option) any later version.
00009   
00010   This library is distributed in the hope that it will be useful,
00011   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013   Lesser General Public License for more details.
00014   
00015   You should have received a copy of the GNU Lesser General Public
00016   License along with this library; if not, write to the Free Software
00017   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 */
00019 
00020 
00021 #ifndef _MSG_H_
00022 #define _MSG_H_
00023 
00024 #ifndef DOXYGEN
00025 
00026 #ifndef MINISIZE
00027 #define NUMBER_OF_HEADERS 33
00028 #else
00029 #define NUMBER_OF_HEADERS 22
00030 #endif
00031 
00032 /* internal type for parser's config */
00033 typedef struct ___osip_message_config_t {
00034         char *hname;
00035         int (*setheader) (osip_message_t *, const char *);
00036         int ignored_when_invalid;
00037 } __osip_message_config_t;
00038 
00039 int __osip_message_call_method(int i, osip_message_t * dest, const char *hvalue);
00040 int __osip_message_is_known_header(const char *hname);
00041 
00042 int __osip_find_next_occurence(const char *str, const char *buf,
00043                                                            const char **index_of_str, const char *end_of_buf);
00044 int __osip_find_next_crlf(const char *start_of_header, const char **end_of_header);
00045 int __osip_find_next_crlfcrlf(const char *start_of_part, const char **end_of_part);
00046 
00047 int __osip_quoted_string_set(const char *name, const char *str,
00048                                                          char **result, const char **next);
00049 int __osip_token_set(const char *name, const char *str,
00050                                          char **result, const char **next);
00051 
00052 
00053 int __osip_generic_param_parseall(osip_list_t * gen_params, const char *params);
00054 #endif
00055 
00056 #endif