2 The oSIP library implements the Session Initiation Protocol (SIP -rfc2543-)
3 Copyright (C) 2001 Aymeric MOIZARD jack@atosc.org
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef _OSIP_RECORD_ROUTE_H_
22 #define _OSIP_RECORD_ROUTE_H_
24 #include <osipparser2/headers/osip_from.h>
27 * @file osip_record_route.h
28 * @brief oSIP osip_record_route header definition.
32 * @defgroup oSIP_RECORD_ROUTE oSIP record-route header definition.
33 * @ingroup oSIP_HEADERS
38 * Structure for Route headers.
39 * @defvar osip_route_t
41 typedef osip_from_t osip_record_route_t;
49 * Allocate a Record-Route element.
50 * @param header The element to work on.
52 int osip_record_route_init (osip_record_route_t ** header);
54 * Free a Record-Route element.
55 * @param header The element to work on.
57 void osip_record_route_free (osip_record_route_t * header);
59 * Parse a Record-Route element.
60 * @param header The element to work on.
61 * @param hvalue The string to parse.
63 int osip_record_route_parse (osip_record_route_t * header, const char *hvalue);
65 * Get a string representation of a Record-Route element.
66 * @param header The element to work on.
67 * @param dest A pointer on the new allocated string.
69 int osip_record_route_to_str (const osip_record_route_t * header, char **dest);
71 * Clone a Record-Route element.
72 * @param header The element to work on.
73 * @param dest A pointer on the copy of the element.
75 #define osip_record_route_clone(header,dest) osip_from_clone(header,dest)
77 * Set the url in the Record-Route element.
78 * @param header The element to work on.
79 * @param url The value of the element.
81 #define osip_record_route_set_url(header,url) osip_from_set_url((osip_from_t*)header,url)
83 * Get the url from a Record-Route header.
84 * @param header The element to work on.
86 #define osip_record_route_get_url(header) osip_from_get_url((osip_from_t*)header)
88 * Get a header parameter from a Record-Route element.
89 * @param header The element to work on.
90 * @param pos The index of the element to get.
91 * @param dest A pointer on the element found.
93 #define osip_record_route_param_get(header,pos,dest) osip_from_param_get((osip_from_t*)header,pos,dest)
95 * Allocate and add a generic parameter element in a list.
96 * @param header The element to work on.
97 * @param name The token name.
98 * @param value The token value.
100 #define osip_record_route_param_add(header,name,value) osip_generic_param_add((header)->gen_params,name,value)
102 * Find a header parameter in a Record-Route element.
103 * @param header The element to work on.
104 * @param name The token name to search.
105 * @param dest A pointer on the element found.
107 #define osip_record_route_param_get_byname(header,name,dest) osip_generic_param_get_byname((header)->gen_params,name,dest)