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_ACCEPT_LANGUAGE_H_
22 #define _OSIP_ACCEPT_LANGUAGE_H_
24 #include <osipparser2/headers/osip_accept_encoding.h>
27 * @file osip_accept_language.h
28 * @brief oSIP osip_accept_language header definition.
32 * @defgroup oSIP_ACCEPT_LANGUAGE oSIP accept-language header definition.
33 * @ingroup oSIP_HEADERS
38 * Structure for Accept-Language headers.
39 * @defvar osip_accept_language_t
41 typedef osip_accept_encoding_t osip_accept_language_t;
49 * Allocate an Accept-Language element.
50 * @param header The element to work on.
52 #define osip_accept_language_init(header) osip_accept_encoding_init(header)
54 * Parse an Accept-Language element.
55 * @param header The element to work on.
56 * @param hvalue The string to parse.
58 #define osip_accept_language_parse(header, hvalue) osip_accept_encoding_parse(header, hvalue)
60 * Get a string representation of an Accept-Language element.
61 * @param header The element to work on.
62 * @param dest A pointer on the new allocated string.
64 #define osip_accept_language_to_str(header, dest) osip_accept_encoding_to_str(header, dest)
66 * Free an Accept-Language element.
67 * @param header The element to work on.
69 #define osip_accept_language_free(header) osip_accept_encoding_free(header)
71 * Clone an Accept-Language element.
72 * @param header The element to work on.
73 * @param dest A pointer on the copy of the element.
75 #define osip_accept_language_clone(header, dest) osip_accept_encoding_clone(header, dest)
78 * Get the value of an Accept-Language element.
79 * @param header The element to work on.
81 #define osip_accept_language_get_element(header) osip_accept_encoding_get_element(header)
83 * Set the value of an Accept-Language element.
84 * @param header The element to work on.
85 * @param value The value to set.
87 #define osip_accept_language_set_element(header, value) osip_accept_encoding_set_element(header, value)
89 * Allocate and add a generic parameter element in an Accept-Language element.
90 * @param header The element to work on.
91 * @param name The token name.
92 * @param value The token value.
94 #define osip_accept_language_param_add(header,name,value) osip_generic_param_add((header)->gen_params,name,value)
96 * Find a header parameter in a Accept-Language element.
97 * @param header The element to work on.
98 * @param name The token name to search.
99 * @param dest A pointer on the element found.
101 #define osip_accept_language_param_get_byname(header,name,dest) osip_generic_param_get_byname((header)->gen_params,name,dest)