1 /*
2 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261-)
3 Copyright (C) 2001-2015 Aymeric MOIZARD amoizard@antisip.com
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_BODY_H_
22 #define _OSIP_BODY_H_
23
25
43
54 };
55
56
57 #ifdef __cplusplus
58 extern "C" {
59 #endif
60
98
105
113
114 #ifdef __cplusplus
115 }
116 #endif
117
118 #endif
Structure for referencing a list of elements.
size_t length
length of data
Structure for holding Body.
osip_content_type_t * content_type
Content-Type (when mime is used)
Definition of the Content-Type header.
int osip_body_set_header(osip_body_t *body, const char *hname, const char *hvalue)
Add a header in the osip_body_t element.
int osip_body_init(osip_body_t **body)
Allocate a osip_body_t element.
void osip_body_free(osip_body_t *body)
Free a osip_body_t element.
int osip_body_parse_mime(osip_body_t *body, const char *buf, size_t length)
Parse a osip_body_t element.
int osip_body_set_contenttype(osip_body_t *body, const char *hvalue)
Set the Content-Type header in the osip_body_t element.
int osip_body_parse(osip_body_t *body, const char *buf, size_t length)
Parse a osip_body_t element.
char * body
buffer containing data
int osip_body_to_str(const osip_body_t *body, char **dest, size_t *length)
Get a string representation of a osip_body_t element.
oSIP osip_content_type header definition.
osip_list_t * headers
List of headers (when mime is used)
int osip_body_clone(const osip_body_t *body, osip_body_t **dest)
Clone a osip_body_t element.