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_CONTENT_LENGTH_H_
22 #define _OSIP_CONTENT_LENGTH_H_
26 * @file osip_content_length.h
27 * @brief oSIP osip_content_length header definition.
31 * @defgroup oSIP_CONTENT_LENGTH oSIP content-length definition.
32 * @ingroup oSIP_HEADERS
37 * Structure for Content-Length headers.
38 * @defvar osip_content_length_t
40 typedef struct osip_content_length osip_content_length_t;
42 struct osip_content_length
53 * Allocate a Content-Length element.
54 * @param header The element to work on.
56 int osip_content_length_init (osip_content_length_t ** header);
58 * Free a Content-Length element.
59 * @param header The element to work on.
61 void osip_content_length_free (osip_content_length_t * header);
63 * Parse a Content-Length element.
64 * @param header The element to work on.
65 * @param hvalue The string to parse.
67 int osip_content_length_parse (osip_content_length_t * header, const char *hvalue);
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.
73 int osip_content_length_to_str (const osip_content_length_t * header, char **dest);
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.
79 int osip_content_length_clone (const osip_content_length_t * header,
80 osip_content_length_t ** dest);