1 /*
2  * Copyright © 2009 Keith Packard <keithp@keithp.com>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
17  */
18 
19 #ifndef _GMIME_FILTER_REPLY_H_
20 #define _GMIME_FILTER_REPLY_H_
21 
22 #include <gmime/gmime-filter.h>
23 
24 void g_mime_filter_reply_module_init (void);
25 
26 G_BEGIN_DECLS
27 
28 #define GMIME_TYPE_FILTER_REPLY            (g_mime_filter_reply_get_type ())
29 #define GMIME_FILTER_REPLY(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
30 									GMIME_TYPE_FILTER_REPLY, \
31 									GMimeFilterReply))
32 #define GMIME_FILTER_REPLY_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GMIME_TYPE_FILTER_REPLY, \
33 								     GMimeFilterReplyClass))
34 #define GMIME_IS_FILTER_REPLY(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
35 									GMIME_TYPE_FILTER_REPLY))
36 #define GMIME_IS_FILTER_REPLY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), \
37 								     GMIME_TYPE_FILTER_REPLY))
38 #define GMIME_FILTER_REPLY_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GMIME_TYPE_FILTER_REPLY, \
39 								       GMimeFilterReplyClass))
40 
41 typedef struct _GMimeFilterReply GMimeFilterReply;
42 typedef struct _GMimeFilterReplyClass GMimeFilterReplyClass;
43 
44 /**
45  * GMimeFilterReply:
46  * @parent_object: parent #GMimeFilter
47  * @encode: encoding vs decoding reply markers
48  * @saw_nl: previous char was a \n
49  * @saw_angle: previous char was a >
50  *
51  * A filter to insert/remove reply markers (lines beginning with >)
52  **/
53 struct _GMimeFilterReply {
54     GMimeFilter parent_object;
55 
56     gboolean encode;
57     gboolean saw_nl;
58     gboolean saw_angle;
59 };
60 
61 struct _GMimeFilterReplyClass {
62     GMimeFilterClass parent_class;
63 
64 };
65 
66 
67 GType g_mime_filter_reply_get_type (void);
68 
69 GMimeFilter *g_mime_filter_reply_new (gboolean encode);
70 
71 G_END_DECLS
72 
73 
74 #endif /* _GMIME_FILTER_REPLY_H_ */
75