and added files
[bcm963xx.git] / userapps / opensource / libosip2 / include / osipparser2 / headers / osip_content_length.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_CONTENT_LENGTH_H_
22 #define _OSIP_CONTENT_LENGTH_H_
23
24
25 /**
26  * @file osip_content_length.h
27  * @brief oSIP osip_content_length header definition.
28  */
29
30 /**
31  * @defgroup oSIP_CONTENT_LENGTH oSIP content-length definition.
32  * @ingroup oSIP_HEADERS
33  * @{
34  */
35
36 /**
37  * Structure for Content-Length headers.
38  * @defvar osip_content_length_t
39  */
40   typedef struct osip_content_length osip_content_length_t;
41
42   struct osip_content_length
43   {
44     char *value;
45   };
46
47 #ifdef __cplusplus
48 extern "C"
49 {
50 #endif
51
52 /**
53  * Allocate a Content-Length element.
54  * @param header The element to work on.
55  */
56   int osip_content_length_init (osip_content_length_t ** header);
57 /**
58  * Free a Content-Length element.
59  * @param header The element to work on.
60  */
61   void osip_content_length_free (osip_content_length_t * header);
62 /**
63  * Parse a Content-Length element.
64  * @param header The element to work on.
65  * @param hvalue The string to parse.
66  */
67   int osip_content_length_parse (osip_content_length_t * header, const char *hvalue);
68 /**
69  * Get a string representation of a Content-Length element.
70  * @param header The element to work on.
71  * @param dest A pointer on the new allocated string.
72  */
73   int osip_content_length_to_str (const osip_content_length_t * header, char **dest);
74 /**
75  * Clone a Content-Length element.
76  * @param header The element to work on.
77  * @param dest A pointer on the copy of the element.
78  */
79   int osip_content_length_clone (const osip_content_length_t * header,
80                             osip_content_length_t ** dest);
81
82
83 #ifdef __cplusplus
84 }
85 #endif
86
87 /** @} */
88
89 #endif