]> git.notmuchmail.org Git - notmuch/blob - gmime-filter-headers.h
emacs: Combine string faces and combine under existing faces
[notmuch] / gmime-filter-headers.h
1 /*
2  * Copyright © 2009 Keith Packard <keithp@keithp.com>
3  * Copyright © 2010 Michal Sojka <sojkam1@fel.cvut.cz>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
18  */
19
20 #ifndef _GMIME_FILTER_HEADERS_H_
21 #define _GMIME_FILTER_HEADERS_H_
22
23 #include <gmime/gmime-filter.h>
24
25 G_BEGIN_DECLS
26
27 #define GMIME_TYPE_FILTER_HEADERS            (g_mime_filter_headers_get_type ())
28 #define GMIME_FILTER_HEADERS(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMIME_TYPE_FILTER_HEADERS, GMimeFilterHeaders))
29 #define GMIME_FILTER_HEADERS_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GMIME_TYPE_FILTER_HEADERS, GMimeFilterHeadersClass))
30 #define GMIME_IS_FILTER_HEADERS(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GMIME_TYPE_FILTER_HEADERS))
31 #define GMIME_IS_FILTER_HEADERS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GMIME_TYPE_FILTER_HEADERS))
32 #define GMIME_FILTER_HEADERS_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GMIME_TYPE_FILTER_HEADERS, GMimeFilterHeadersClass))
33
34 typedef struct _GMimeFilterHeaders GMimeFilterHeaders;
35 typedef struct _GMimeFilterHeadersClass GMimeFilterHeadersClass;
36
37 /**
38  * GMimeFilterHeaders:
39  * @parent_object: parent #GMimeFilter
40  * @saw_nl: previous char was a \n
41  * @line: temporary buffer for line unfolding
42  * @line_size: size of currently allocated memory for @line
43  * @lineptr: pointer to the first unused character in @line
44  *
45  * A filter to decode rfc2047 encoded headers
46  **/
47 struct _GMimeFilterHeaders {
48         GMimeFilter parent_object;
49
50         gboolean saw_nl;
51         char *line;
52         size_t line_size;
53         char *lineptr;
54 };
55
56 struct _GMimeFilterHeadersClass {
57         GMimeFilterClass parent_class;
58
59 };
60
61
62 GType g_mime_filter_headers_get_type (void);
63
64 GMimeFilter *g_mime_filter_headers_new (void);
65
66 G_END_DECLS
67
68
69 #endif /* _GMIME_FILTER_HEADERS_H_ */