1 /*
2  *
3  * This program is free software; you can redistribute it and/or modify it
4  * under the terms of the GNU Lesser General Public License as published by
5  * the Free Software Foundation.
6  *
7  * This program is distributed in the hope that it will be useful, but
8  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
9  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
10  * for more details.
11  *
12  * You should have received a copy of the GNU Lesser General Public License
13  * along with this program; if not, see <http://www.gnu.org/licenses/>.
14  *
15  *
16  * Authors:
17  *		Jeffrey Stedfast <fejj@ximian.com>
18  *
19  * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
20  *
21  */
22 
23 #ifndef EM_COMPOSER_UTILS_H
24 #define EM_COMPOSER_UTILS_H
25 
26 #include <em-format/e-mail-part.h>
27 #include <em-format/e-mail-part-list.h>
28 
29 #include <composer/e-msg-composer.h>
30 
31 #include <mail/e-mail-backend.h>
32 #include <mail/e-mail-enums.h>
33 
34 G_BEGIN_DECLS
35 
36 void		em_utils_compose_new_message	(EMsgComposer *composer,
37 						 CamelFolder *folder);
38 void		em_utils_compose_new_message_with_selection
39 						(EMsgComposer *composer,
40 						 CamelFolder *folder,
41 						 const gchar *message_uid);
42 void		em_utils_compose_new_message_with_mailto
43 						(EShell *shell,
44 						 const gchar *mailto,
45 						 CamelFolder *folder);
46 void		em_utils_compose_new_message_with_mailto_and_selection
47 						(EShell *shell,
48 						 const gchar *mailto,
49 						 CamelFolder *folder,
50 						 const gchar *message_uid);
51 void		em_utils_edit_message		(EMsgComposer *composer,
52 						 CamelFolder *folder,
53 						 CamelMimeMessage *message,
54 						 const gchar *message_uid,
55 						 gboolean keep_signature);
56 void		em_utils_forward_message	(EMsgComposer *composer,
57 						 CamelMimeMessage *message,
58 						 EMailForwardStyle style,
59 						 CamelFolder *folder,
60 						 const gchar *uid);
61 void		em_utils_forward_attachment	(EMsgComposer *composer,
62 						 CamelMimePart *part,
63 						 const gchar *subject,
64 						 CamelFolder *folder,
65 						 GPtrArray *uids);
66 void		em_utils_redirect_message	(EMsgComposer *composer,
67 						 CamelMimeMessage *message);
68 gboolean	em_utils_is_munged_list_message	(CamelMimeMessage *message);
69 void		em_utils_get_reply_sender	(CamelMimeMessage *message,
70 						 CamelInternetAddress *to,
71 						 CamelNNTPAddress *postto);
72 void		em_utils_get_reply_all		(ESourceRegistry *registry,
73 						 CamelMimeMessage *message,
74 						 CamelInternetAddress *to,
75 						 CamelInternetAddress *cc,
76 						 CamelNNTPAddress *postto);
77 void		em_utils_reply_to_message	(EMsgComposer *composer,
78 						 CamelMimeMessage *message,
79 						 CamelFolder *folder,
80 						 const gchar *message_uid,
81 						 EMailReplyType type,
82 						 EMailReplyStyle style,
83 						 EMailPartList *source,
84 						 CamelInternetAddress *address,
85 						 guint32 reply_flags); /* bit-or of EMailReplyFlags */
86 void		em_utils_reply_alternative	(GtkWindow *parent,
87 						 EShell *shell,
88 						 EAlertSink *alert_sink,
89 						 CamelMimeMessage *message,
90 						 CamelFolder *folder,
91 						 const gchar *message_uid,
92 						 EMailReplyStyle default_style,
93 						 EMailPartList *source,
94 						 EMailPartValidityFlags validity_pgp_sum,
95 						 EMailPartValidityFlags validity_smime_sum);
96 EDestination **	em_utils_camel_address_to_destination
97 						(CamelInternetAddress *iaddr);
98 void		em_configure_new_composer	(EMsgComposer *composer,
99 						 EMailSession *session);
100 void		em_utils_get_real_folder_uri_and_message_uid
101 						(CamelFolder *folder,
102 						 const gchar *uid,
103 						 gchar **folder_uri,
104 						 gchar **message_uid);
105 ESource *	em_utils_check_send_account_override
106 						(EShell *shell,
107 						 CamelMimeMessage *message,
108 						 CamelFolder *folder,
109 						 gchar **out_alias_name,
110 						 gchar **out_alias_address);
111 void		em_utils_apply_send_account_override_to_composer
112 						(EMsgComposer *composer,
113 						 CamelFolder *folder);
114 gchar *		em_composer_utils_get_forward_marker
115 						(EMsgComposer *composer);
116 gchar *		em_composer_utils_get_original_marker
117 						(EMsgComposer *composer);
118 gchar *		em_composer_utils_get_reply_credits
119 						(ESource *identity_source,
120 						 CamelMimeMessage *message);
121 void		em_utils_add_installed_languages(GtkComboBoxText *combo);
122 ESource *	em_composer_utils_guess_identity_source
123 						(EShell *shell,
124 						 CamelMimeMessage *message,
125 						 CamelFolder *folder,
126 						 const gchar *message_uid,
127 						 gchar **out_identity_name,
128 						 gchar **out_identity_address);
129 void		em_composer_utils_update_security
130 						(EMsgComposer *composer,
131 						 EMailPartValidityFlags validity_pgp_sum,
132 						 EMailPartValidityFlags validity_smime_sum);
133 void		em_composer_utils_update_security_from_part_list
134 						(EMsgComposer *composer,
135 						 EMailPartList *part_list);
136 
137 G_END_DECLS
138 
139 #endif /* EM_COMPOSER_UTILS_H */
140