|
libosip 3.6.0
|
00001 /* 00002 The oSIP library implements the Session Initiation Protocol (SIP -rfc3261-) 00003 Copyright (C) 2001,2002,2003,2004,2005,2006,2007 Aymeric MOIZARD jack@atosc.org 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Lesser General Public 00007 License as published by the Free Software Foundation; either 00008 version 2.1 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Lesser General Public License for more details. 00014 00015 You should have received a copy of the GNU Lesser General Public 00016 License along with this library; if not, write to the Free Software 00017 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 */ 00019 00020 00021 #ifndef _OSIP_BODY_H_ 00022 #define _OSIP_BODY_H_ 00023 00024 #include <osipparser2/headers/osip_content_type.h> 00025 00042 typedef struct osip_body osip_body_t; 00043 00048 struct osip_body { 00049 char *body; 00050 size_t length; 00051 osip_list_t *headers; 00052 osip_content_type_t *content_type; 00054 }; 00055 00056 00057 #ifdef __cplusplus 00058 extern "C" { 00059 #endif 00060 00065 int osip_body_init(osip_body_t ** body); 00070 void osip_body_free(osip_body_t * body); 00077 int osip_body_parse(osip_body_t * body, const char *buf, size_t length); 00083 int osip_body_clone(const osip_body_t * body, osip_body_t ** dest); 00090 int osip_body_parse_mime(osip_body_t * body, const char *buf, size_t length); 00097 int osip_body_to_str(const osip_body_t * body, char **dest, size_t * length); 00098 00104 int osip_body_set_contenttype(osip_body_t * body, const char *hvalue); 00105 00112 int osip_body_set_header(osip_body_t * body, const char *hname, 00113 const char *hvalue); 00114 00115 #ifdef __cplusplus 00116 } 00117 #endif 00118 00119 #endif
1.7.3