Updated Spanish translation
[evolution.git] / em-format / e-mail-parser.h
blob202e28d26785757b5705b9482659f92e4113f380
1 /*
2 * e-mail-parser.h
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) version 3.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with the program; if not, see <http://www.gnu.org/licenses/>
19 #ifndef E_MAIL_PARSER_H_
20 #define E_MAIL_PARSER_H_
22 #include <em-format/e-mail-part-list.h>
23 #include <em-format/e-mail-extension-registry.h>
25 /* Standard GObject macros */
26 #define E_TYPE_MAIL_PARSER \
27 (e_mail_parser_get_type ())
28 #define E_MAIL_PARSER(obj) \
29 (G_TYPE_CHECK_INSTANCE_CAST \
30 ((obj), E_TYPE_MAIL_PARSER, EMailParser))
31 #define E_MAIL_PARSER_CLASS(cls) \
32 (G_TYPE_CHECK_CLASS_CAST \
33 ((cls), E_TYPE_MAIL_PARSER, EMailParserClass))
34 #define E_IS_MAIL_PARSER(obj) \
35 (G_TYPE_CHECK_INSTANCE_TYPE \
36 ((obj), E_TYPE_MAIL_PARSER))
37 #define E_IS_MAIL_PARSER_CLASS(cls) \
38 (G_TYPE_CHECK_CLASS_TYPE \
39 ((cls), E_TYPE_MAIL_PARSER))
40 #define E_MAIL_PARSER_GET_CLASS(obj) \
41 (G_TYPE_INSTANCE_GET_CLASS \
42 ((obj), E_TYPE_MAIL_PARSER, EMailParserClass))
44 G_BEGIN_DECLS
46 typedef struct _EMailParser EMailParser;
47 typedef struct _EMailParserClass EMailParserClass;
48 typedef struct _EMailParserPrivate EMailParserPrivate;
50 struct _EMailParser {
51 GObject parent;
52 EMailParserPrivate *priv;
55 struct _EMailParserClass {
56 GObjectClass parent_class;
58 EMailParserExtensionRegistry *extension_registry;
61 GType e_mail_parser_get_type (void);
63 EMailParser * e_mail_parser_new (CamelSession *session);
65 EMailPartList * e_mail_parser_parse_sync (EMailParser *parser,
66 CamelFolder *folder,
67 const gchar *message_uid,
68 CamelMimeMessage *message,
69 GCancellable *cancellable);
71 void e_mail_parser_parse (EMailParser *parser,
72 CamelFolder *folder,
73 const gchar *message_uid,
74 CamelMimeMessage *message,
75 GAsyncReadyCallback callback,
76 GCancellable *cancellable,
77 gpointer user_data);
79 EMailPartList * e_mail_parser_parse_finish (EMailParser *parser,
80 GAsyncResult *result,
81 GError **error);
83 GSList * e_mail_parser_parse_part (EMailParser *parser,
84 CamelMimePart *part,
85 GString *part_id,
86 GCancellable *cancellable);
88 GSList * e_mail_parser_parse_part_as (EMailParser *parser,
89 CamelMimePart *part,
90 GString *part_id,
91 const gchar *mime_type,
92 GCancellable *cancellable);
94 GSList * e_mail_parser_error (EMailParser *parser,
95 GCancellable *cancellable,
96 const gchar *format,
97 ...) G_GNUC_PRINTF (3, 4);
99 GSList * e_mail_parser_wrap_as_attachment
100 (EMailParser *parser,
101 CamelMimePart *part,
102 GSList *parts,
103 GString *part_id,
104 GCancellable *cancellable);
106 CamelSession * e_mail_parser_get_session (EMailParser *parser);
108 EMailExtensionRegistry *
109 e_mail_parser_get_extension_registry
110 (EMailParser *parser);
112 G_END_DECLS
114 #endif /* E_MAIL_PARSER_H_ */