Extending test-client-custom-summary to try e_book_client_get_contacts_uids()
[platform/upstream/evolution-data-server.git] / camel / camel-mime-filter-bestenc.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  *  Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
4  *
5  *  Authors: Michael Zucchi <notzed@ximian.com>
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of version 2 of the GNU Lesser General Public
9  * License as published by the Free Software Foundation.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this program; if not, write to the
18  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  */
21
22 #if !defined (__CAMEL_H_INSIDE__) && !defined (CAMEL_COMPILATION)
23 #error "Only <camel/camel.h> can be included directly."
24 #endif
25
26 #ifndef CAMEL_MIME_FILTER_BESTENC_H
27 #define CAMEL_MIME_FILTER_BESTENC_H
28
29 #include <camel/camel-mime-filter.h>
30 #include <camel/camel-mime-part.h>
31 #include <camel/camel-charset-map.h>
32
33 /* Standard GObject macros */
34 #define CAMEL_TYPE_MIME_FILTER_BESTENC \
35         (camel_mime_filter_bestenc_get_type ())
36 #define CAMEL_MIME_FILTER_BESTENC(obj) \
37         (G_TYPE_CHECK_INSTANCE_CAST \
38         ((obj), CAMEL_TYPE_MIME_FILTER_BESTENC, CamelMimeFilterBestenc))
39 #define CAMEL_MIME_FILTER_BESTENC_CLASS(cls) \
40         (G_TYPE_CHECK_CLASS_CAST \
41         ((cls), CAMEL_TYPE_MIME_FILTER_BESTENC, CamelMimeFilterBestencClass))
42 #define CAMEL_IS_MIME_FILTER_BESTENC(obj) \
43         (G_TYPE_CHECK_INSTANCE_TYPE \
44         ((obj), CAMEL_TYPE_MIME_FILTER_BESTENC))
45 #define CAMEL_IS_MIME_FILTER_BESTENC_CLASS(cls) \
46         (G_TYPE_CHECK_CLASS_TYPE \
47         ((cls), CAMEL_TYPE_MIME_FILTER_BESTENC))
48 #define CAMEL_MIME_FILTER_BESTENC_GET_CLASS(obj) \
49         (G_TYPE_INSTANCE_GET_CLASS \
50         ((obj), CAMEL_TYPE_MIME_FILTER_BESTENC, CamelMimeFilterBestencClass))
51
52 G_BEGIN_DECLS
53
54 typedef struct _CamelMimeFilterBestenc CamelMimeFilterBestenc;
55 typedef struct _CamelMimeFilterBestencClass CamelMimeFilterBestencClass;
56 typedef struct _CamelMimeFilterBestencPrivate CamelMimeFilterBestencPrivate;
57
58 typedef enum _CamelBestencRequired {
59         CAMEL_BESTENC_GET_ENCODING = 1 << 0,
60         CAMEL_BESTENC_GET_CHARSET = 1 << 1,
61
62         /* do we treat 'lf' as if it were crlf? */
63         CAMEL_BESTENC_LF_IS_CRLF = 1 << 8,
64         /* do we not allow "From " to appear at the start of a line in any part? */
65         CAMEL_BESTENC_NO_FROM = 1 << 9
66 } CamelBestencRequired;
67
68 typedef enum _CamelBestencEncoding {
69         CAMEL_BESTENC_7BIT,
70         CAMEL_BESTENC_8BIT,
71         CAMEL_BESTENC_BINARY,
72
73         /* is the content stream to be treated as text? */
74         CAMEL_BESTENC_TEXT = 1 << 8
75 } CamelBestencEncoding;
76
77 struct _CamelMimeFilterBestenc {
78         CamelMimeFilter parent;
79         CamelMimeFilterBestencPrivate *priv;
80 };
81
82 struct _CamelMimeFilterBestencClass {
83         CamelMimeFilterClass parent_class;
84 };
85
86 GType           camel_mime_filter_bestenc_get_type (void);
87 CamelMimeFilter *
88                 camel_mime_filter_bestenc_new   (guint flags);
89 CamelTransferEncoding
90                 camel_mime_filter_bestenc_get_best_encoding
91                                                 (CamelMimeFilterBestenc *filter,
92                                                  CamelBestencEncoding required);
93 const gchar *   camel_mime_filter_bestenc_get_best_charset
94                                                 (CamelMimeFilterBestenc *filter);
95 void            camel_mime_filter_bestenc_set_flags
96                                                 (CamelMimeFilterBestenc *filter,
97                                                  guint flags);
98
99 G_END_DECLS
100
101 #endif /* CAMEL_MIME_FILTER_BESTENC_H */