00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
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 {
00050 char *body;
00051 size_t length;
00052 osip_list_t *headers;
00053 osip_content_type_t *content_type;
00054 };
00055
00056
00057 #ifdef __cplusplus
00058 extern "C"
00059 {
00060 #endif
00061
00066 int osip_body_init (osip_body_t ** body);
00071 void osip_body_free (osip_body_t * body);
00078 int osip_body_parse (osip_body_t * body, const char *buf, size_t length);
00084 int osip_body_clone (const osip_body_t * body, osip_body_t ** dest);
00091 int osip_body_parse_mime (osip_body_t * body, const char *buf, size_t length);
00098 int osip_body_to_str (const osip_body_t * body, char **dest, size_t *length);
00099
00105 int osip_body_set_contenttype (osip_body_t * body, const char *hvalue);
00106
00113 int osip_body_set_header (osip_body_t * body, const char *hname,
00114 const char *hvalue);
00115
00116 #ifdef __cplusplus
00117 }
00118 #endif
00119
00122 #endif