2 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261-)
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_ENCONDING_H_
22 #define _OSIP_ACCEPT_ENCONDING_H_
24 #include <osipparser2/osip_list.h>
27 * @file osip_accept_encoding.h
28 * @brief oSIP osip_accept_encoding header definition.
32 * @defgroup oSIP_ACCEPT_ENCODING oSIP accept-encoding header definition.
33 * @ingroup oSIP_HEADERS
38 * Structure for Accept-Encoding header.
39 * @defvar osip_accept_encoding_t
41 typedef struct osip_accept_encoding osip_accept_encoding_t;
43 struct osip_accept_encoding
46 osip_list_t *gen_params;
56 * Allocate a Accept-Encoding element.
57 * @param header The element to work on.
59 int osip_accept_encoding_init (osip_accept_encoding_t ** header);
61 * Parse a Accept-Encoding element.
62 * @param header The element to work on.
63 * @param hvalue The string to parse.
65 int osip_accept_encoding_parse (osip_accept_encoding_t * header, const char *hvalue);
67 * Get a string representation of a Accept-Encoding element.
68 * @param header The element to work on.
69 * @param dest A pointer on the new allocated string.
71 int osip_accept_encoding_to_str (const osip_accept_encoding_t * header, char **dest);
73 * Free a Accept-Encoding element.
74 * @param header The element to work on.
76 void osip_accept_encoding_free (osip_accept_encoding_t * header);
78 * Clone a Accept-Encoding element.
79 * @param header The element to work on.
80 * @param dest A pointer on the copy of the element.
82 int osip_accept_encoding_clone (const osip_accept_encoding_t * header,
83 osip_accept_encoding_t ** dest);
86 * Set the value of an Accept-Encoding element.
87 * @param header The element to work on.
88 * @param value The token value to set.
90 void osip_accept_encoding_set_element (osip_accept_encoding_t * header,
93 * Get the value of an Accept-Encoding element.
94 * @param header The element to work on.
96 char *osip_accept_encoding_get_element (const osip_accept_encoding_t * header);
98 * Allocate and Add a header parameter in an Accept-Encoding element.
99 * @param header The element to work on.
100 * @param name The token name for the new parameter.
101 * @param value The token value for the new parameter.
103 #define osip_accept_encoding_param_add(header,name,value) osip_generic_param_add((header)->gen_params,name,value)
105 * Find a header parameter in an Accept-Encoding element.
106 * @param header The element to work on.
107 * @param name The token name to search.
108 * @param dest A pointer on the element found.
110 #define osip_accept_encoding_param_get_byname(header,name,dest) osip_generic_param_get_byname((header)->gen_params,name,dest)