msg  1.12.11devel
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
msg_mime.h
Go to the documentation of this file.
1 /*
2  * This file is part of the Sofia-SIP package
3  *
4  * Copyright (C) 2005-2011 Nokia Corporation.
5  *
6  * Contact: Pekka Pessi <pekka.pessi@nokia-email.address.hidden>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public License
10  * as published by the Free Software Foundation; either version 2.1 of
11  * the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21  * 02110-1301 USA
22  *
23  */
24 
25 #ifndef MSG_MIME_H
26 
27 #define MSG_MIME_H
28 
40 #ifndef URL_H
41 #include <sofia-sip/url.h>
42 #endif
43 #ifndef MSG_TYPES_H
44 #include <sofia-sip/msg_types.h>
45 #endif
46 #ifndef SU_TYPES_H
47 #include <sofia-sip/su_types.h>
48 #endif
49 
50 SOFIA_BEGIN_DECLS
51 
52 typedef struct msg_accept_any_s msg_accept_any_t;
53 
54 typedef struct msg_accept_s msg_accept_t;
55 
59 
72 
75 
80 {
83  char const *ac_type;
84  char const *ac_subtype;
85  msg_param_t const *ac_params;
86  char const *ac_q;
87 };
88 
94 {
97  char const *aa_value;
98  msg_param_t const *aa_params;
99  char const *aa_q;
100 };
101 
106 {
109  char const *cd_type;
110  msg_param_t const *cd_params;
111  char const *cd_handling;
112  unsigned cd_required:1;
113  unsigned cd_optional:1;
114  unsigned :0; /* pad */
115 };
116 
121 {
124  unsigned long l_length;
125 };
126 
127 
132 {
135  char const *c_type;
136  char const *c_subtype;
137  msg_param_t const *c_params;
138 };
139 
140 
145 {
148  unsigned w_code;
149  char const *w_host;
150  char const *w_port;
151  char const *w_text;
152 };
153 
154 
160 {
163  /* Preamble for this part */
164  char *mp_data;
165  unsigned mp_len;
166  unsigned mp_flags;
167  msg_error_t *mp_error;
168 
169  /* === Headers start here */
179 #if 0
180  /* === Hash headers end here */
181  /* These MIME headers are here for msg_parser.awk */
182  msg_accept_t *mp_accept;
183  msg_accept_charset_t *mp_accept_charset;
184  msg_accept_encoding_t *mp_accept_encoding;
185  msg_accept_language_t *mp_accept_language;
186  msg_mime_version_t *mp_mime_version;
187  msg_content_md5_t *mp_content_md5;
188  msg_content_length_t *mp_content_length;
190  msg_warning_t *mp_warning;
191 #endif
192  /* === Headers end here */
193 
203 };
204 
206  char const *content_type,
207  void const *data,
208  isize_t dlen);
210  msg_content_type_t const *c,
211  msg_payload_t *pl);
214  msg_multipart_t *mp);
216  msg_multipart_t *mp);
217 
219  msg_multipart_t *mp,
220  int flags);
221 
223  isize_t offset);
224 
226  msg_header_t const *src,
227  char *b, isize_t xtra);
228 
230  uint32_t n);
231 
232 SOFIAPUBFUN unsigned msg_q_value(char const *q);
233 
235  msg_content_type_t const *);
236 
238 #define MSG_MULTIPART_VERSION_CURRENT msg_mime_version_1_0
239 SOFIAPUBVAR char const msg_mime_version_1_0[];
240 
242 #define MSG_MULTIPART_PROTOCOL_TAG ((void *)(uintptr_t)0x4d494d45) /* 'MIME' */
243 
244 SOFIA_END_DECLS
245 
246 #endif

Sofia-SIP 1.12.11devel - Copyright (C) 2006 Nokia Corporation. All rights reserved. Licensed under the terms of the GNU Lesser General Public License.