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
24 #include <osipparser2/headers/osip_content_type.h>
28 * @brief oSIP SIP Message Body Routines
33 * @defgroup oSIP_BODY oSIP body API
42 typedef struct osip_body osip_body_t;
48 osip_content_type_t *content_type;
58 * Allocate a osip_body_t element.
59 * @param body The element to work on.
61 int osip_body_init (osip_body_t ** body);
63 * Free a osip_body_t element.
64 * @param body The element to work on.
66 void osip_body_free (osip_body_t * body);
68 * Parse a osip_body_t element.
69 * @param body The element to work on.
70 * @param buf The buffer to parse.
72 int osip_body_parse (osip_body_t * body, const char *buf);
74 * Clone a osip_body_t element.
75 * @param body The element to clone.
76 * @param dest The cloned element.
78 int osip_body_clone (const osip_body_t * body, osip_body_t ** dest);
80 * Parse a osip_body_t element. (for mime message format) (NOT TESTED, use with care)
81 * @param body The element to work on.
82 * @param buf The buffer to parse.
84 int osip_body_parse_mime (osip_body_t * body, const char *buf);
86 * Get a string representation of a osip_body_t element.
87 * @param body The element to work on.
88 * @param dest The resulting buffer.
90 int osip_body_to_str (const osip_body_t * body, char **dest);
93 * Set the Content-Type header in the osip_body_t element.
94 * @param body The element to work on.
95 * @param hvalue The content type string value.
97 int osip_body_set_contenttype (osip_body_t * body, const char *hvalue);
100 * Add a header in the osip_body_t element.
101 * @param body The element to work on.
102 * @param hvalue The header string value.
104 int osip_body_set_header (osip_body_t * body, const char *hname,