Revert "Revert "and added files""
[bcm963xx.git] / userapps / opensource / libosip2 / include / osipparser2 / headers / osip_accept.h
1 /*
2   The oSIP library implements the Session Initiation Protocol (SIP -rfc2543-)
3   Copyright (C) 2001  Aymeric MOIZARD jack@atosc.org
4   
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.
9   
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.
14   
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
18 */
19
20
21 #ifndef _OSIP_ACCEPT_H_
22 #define _OSIP_ACCEPT_H_
23
24 #include <osipparser2/headers/osip_content_type.h>
25
26 /**
27  * @file osip_accept.h
28  * @brief oSIP osip_accept header definition.
29  */
30
31 /**
32  * @defgroup oSIP_ACCEPT oSIP accept header definition.
33  * @ingroup oSIP_HEADERS
34  * @{
35  */
36
37 /**
38  * Structure for accept headers.
39  * @defvar osip_accept_t
40  */
41   typedef osip_content_type_t osip_accept_t;
42
43 #ifdef __cplusplus
44 extern "C"
45 {
46 #endif
47
48
49 /**
50  * Allocate an Accept element.
51  * @param header The element to work on.
52  */
53 #define accept_init(header)     osip_content_type_init(header)
54 /**
55  * Free an Accept element.
56  * @param header The element to work on.
57  */
58 #define osip_accept_free(header)     osip_content_type_free(header)
59 /**
60  * Parse an Accept element.
61  * @param header The element to work on.
62  * @param hvalue The string to parse.
63  */
64 #define osip_accept_parse(header, hvalue) osip_content_type_parse(header, hvalue)
65 /**
66  * Get a string representation of an Accept element.
67  * @param header The element to work on.
68  * @param dest A pointer on the new allocated string.
69  */
70 #define osip_accept_to_str(header, dest) osip_content_type_to_str(header, dest)
71 /**
72  * Clone an Accept element.
73  * @param header The element to work on.
74  * @param dest A pointer on the copy of the element.
75  */
76 #define osip_accept_clone(header, dest) osip_content_type_clone(header, dest)
77
78 /**
79  * Allocate and add a header parameter in an Accept element.
80  * @param header The element to work on.
81  * @param name The token name.
82  * @param value The token value.
83  */
84 #define osip_accept_param_add(header,name,value)  osip_generic_param_add((header)->gen_params,name,value)
85 /**
86  * Find a header parameter in an Accept element.
87  * @param header The element to work on.
88  * @param name The token name to search.
89  * @param dest A pointer on the element found.
90  */
91 #define osip_accept_param_get_byname(header,name,dest) osip_generic_param_get_byname((header)->gen_params,name,dest)
92
93
94 #ifdef __cplusplus
95 }
96 #endif
97
98 /** @} */
99
100 #endif