summary file read/write routines.
[platform/upstream/evolution-data-server.git] / camel / gmime-utils.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /* mime-utils.h : misc utilities for mime  */
3
4 /* 
5  *
6  * Author : 
7  *  Bertrand Guiheneuf <bertrand@helixcode.com>
8  *
9  * Copyright 1999, 2000 HelixCode (http://www.helixcode.com) .
10  *
11  * This program is free software; you can redistribute it and/or 
12  * modify it under the terms of the GNU General Public License as 
13  * published by the Free Software Foundation; either version 2 of the
14  * License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
24  * USA
25  */
26
27
28 #ifndef GMIME_UTILS_H
29 #define GMIME_UTILS_H 1
30
31
32 #ifdef __cplusplus
33 extern "C" {
34 #pragma }
35 #endif /* __cplusplus }*/
36
37 #include <glib.h>
38 #include <stdio.h>
39 #include <camel-stream.h>
40
41 typedef struct 
42 {
43         gchar *name;
44         gchar *value;   
45
46 } Rfc822Header;
47
48
49 void gmime_write_header_pair_to_stream (CamelStream *stream, 
50                                         const gchar* name, 
51                                         const gchar *value);
52
53 void gmime_write_header_table_to_stream (CamelStream *stream, 
54                                          GHashTable *header_table);
55
56 void gmime_write_header_with_glist_to_stream (CamelStream *stream, 
57                                               const gchar *header_name, 
58                                               GList *header_values, 
59                                               const gchar *separator);
60
61 GArray *get_header_array_from_stream (CamelStream *stream);
62 gchar *gmime_read_line_from_stream (CamelStream *stream);
63
64
65
66 #ifdef __cplusplus
67 }
68 #endif /* __cplusplus */
69
70 #endif /* GMIME_UTILS_H */