6 * Copyright (C) 2010-2015 SIPE Project <http://sipe.sourceforge.net/>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 * MIME backend initialization
26 void sipe_mime_init(void);
29 * MIME backend shutdown
31 void sipe_mime_shutdown(void);
34 * Callback type for sipe_mime_parts_foreach().
36 * @param user_data callback data.
37 * @param fields list of @c sipnameval structures with the header fields
38 * @param body text of the MIME part.
39 * @param length length of the body text.
41 typedef void (*sipe_mime_parts_cb
)(gpointer user_data
,
47 * Parse MIME document and call a function for each part.
49 * @param type content type of the MIME document.
50 * @param body body of the MIME document.
51 * @param callback function to call for each MIME part.
52 * @param user_data callback data.
54 void sipe_mime_parts_foreach(const gchar
*type
,
56 sipe_mime_parts_cb callback
,
60 * Checks whether MIME document contains a part with given type.
62 * @param type content type of the whole MIME document.
63 * @param body body of the MIME document.
64 * @param part_type the MIME type to search for in document parts.
66 * @return @c TRUE if @c body contains such part, otherwise @c FALSE.
68 gboolean
sipe_mime_parts_contain(const gchar
*type
,
70 const gchar
*part_type
);