aboutsummaryrefslogtreecommitdiffstats
path: root/mail/e-mail-reader-utils.h
blob: 110c5dfa374bd23c3427cebfcca1c132e69cf075 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/*
 * e-mail-reader-utils.h
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) version 3.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with the program; if not, see <http://www.gnu.org/licenses/>
 *
 *
 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
 *
 */

/* Miscellaneous utility functions used by EMailReader actions. */

#ifndef E_MAIL_READER_UTILS_H
#define E_MAIL_READER_UTILS_H

#include <mail/e-mail-reader.h>

G_BEGIN_DECLS

typedef struct _EMailReaderHeader EMailReaderHeader;

struct _EMailReaderHeader {
    gchar *name;
    guint enabled : 1;
    guint is_default : 1;
};

gboolean    e_mail_reader_confirm_delete    (EMailReader *reader);
void        e_mail_reader_delete_folder (EMailReader *reader,
                         CamelFolder *folder);
void        e_mail_reader_delete_folder_name
                        (EMailReader *reader,
                         CamelStore *store,
                         const gchar *folder_name);
void        e_mail_reader_expunge_folder    (EMailReader *reader,
                         CamelFolder *folder);
void        e_mail_reader_expunge_folder_name
                        (EMailReader *reader,
                         CamelStore *store,
                         const gchar *folder_name);
void        e_mail_reader_refresh_folder    (EMailReader *reader,
                         CamelFolder *folder);
void        e_mail_reader_refresh_folder_name
                        (EMailReader *reader,
                         CamelStore *store,
                         const gchar *folder_name);
void        e_mail_reader_unsubscribe_folder_name
                        (EMailReader *reader,
                         CamelStore *store,
                         const gchar *folder_name);
guint       e_mail_reader_mark_selected (EMailReader *reader,
                         guint32 mask,
                         guint32 set);
guint       e_mail_reader_open_selected (EMailReader *reader);
void        e_mail_reader_print     (EMailReader *reader,
                         GtkPrintOperationAction action);
void        e_mail_reader_remove_attachments
                        (EMailReader *reader);
void        e_mail_reader_remove_duplicates (EMailReader *reader);
void        e_mail_reader_reply_to_message  (EMailReader *reader,
                         CamelMimeMessage *message,
                         EMailReplyType reply_type);
void        e_mail_reader_save_messages (EMailReader *reader);
void        e_mail_reader_select_next_message
                        (EMailReader *reader,
                         gboolean or_else_previous);
void        e_mail_reader_create_filter_from_selected
                        (EMailReader *reader,
                         gint filter_type);
void        e_mail_reader_create_vfolder_from_selected
                        (EMailReader *reader,
                         gint filter_type);

EMailReaderHeader *
        e_mail_reader_header_from_xml   (const gchar *xml);
gchar *     e_mail_reader_header_to_xml (EMailReaderHeader *header);
void        e_mail_reader_header_free   (EMailReaderHeader *header);

void        e_mail_reader_parse_message (EMailReader *reader,
                         CamelFolder *folder,
                         const gchar *message_uid,
                         CamelMimeMessage *message,
                         GCancellable *cancellable,
                         GAsyncReadyCallback callback,
                         gpointer user_data);
EMailPartList * e_mail_reader_parse_message_finish
                        (EMailReader *reader,
                         GAsyncResult *result);

G_END_DECLS

#endif /* E_MAIL_READER_UTILS_H */