2 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3 * Copyright (C) 1999-2012 Hiroyuki Yamamoto and the Claws Mail team
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef PREFS_ACCOUNT_H
21 #define PREFS_ACCOUNT_H
24 #include "claws-features.h"
27 typedef struct _PrefsAccount PrefsAccount
;
34 A_NONE
, /* SMTP only */
46 POPAUTH_APOP
= 1 << 0,
47 POPAUTH_OAUTH2
= 1 << 1
54 #include "gtk/prefswindow.h"
58 /* Changes to this data structure might need to be reflected
59 * in account_clone() */
70 RecvProtocol protocol
;
74 gboolean use_nntp_auth
;
75 gboolean use_nntp_auth_onconnect
;
78 gchar
*session_passwd
;
81 gboolean use_mail_command
;
89 gchar
*out_ssl_client_cert_file
;
90 gchar
*out_ssl_client_cert_pass
;
91 gchar
*in_ssl_client_cert_file
;
92 gchar
*in_ssl_client_cert_pass
;
94 gboolean ssl_certs_auto_accept
;
95 gboolean use_nonblocking_ssl
;
99 gboolean use_pop_auth
;
100 POPAuthType pop_auth_type
;
101 gboolean use_apop_auth
; /* deprecated */
105 gboolean recv_at_getall
;
106 gboolean sd_rmmail_on_download
;
107 gboolean enable_size_limit
;
109 gboolean filter_on_recv
;
110 gboolean filterhook_on_recv
;
114 gboolean autochk_use_default
;
115 gboolean autochk_use_custom
;
117 guint autocheck_timer
;
121 gboolean receive_in_progress
;
125 gboolean gen_xmailer
;
126 gboolean add_customhdr
;
127 gboolean use_smtp_auth
;
128 SMTPAuthType smtp_auth_type
;
131 gchar
*session_smtp_passwd
;
133 gboolean pop_before_smtp
;
134 gint pop_before_smtp_timeout
;
135 time_t last_pop_login_time
;
137 GSList
*customhdr_list
;
140 gint oauth2_provider
;
142 gchar
*oauth2_authcode
;
143 gchar
*oauth2_client_id
;
144 gchar
*oauth2_client_secret
;
153 gboolean set_autobcc
;
155 gboolean set_autoreplyto
;
157 gboolean enable_default_dictionary
;
158 gchar
*default_dictionary
;
159 gboolean enable_default_alt_dictionary
;
160 gchar
*default_alt_dictionary
;
161 gboolean compose_with_format
;
162 gchar
*compose_subject_format
;
163 gchar
*compose_body_format
;
164 gboolean reply_with_format
;
165 gchar
*reply_quotemark
;
166 gchar
*reply_body_format
;
167 gboolean forward_with_format
;
168 gchar
*forward_quotemark
;
169 gchar
*forward_body_format
;
172 gchar
*default_privacy_system
;
173 gboolean default_encrypt
;
174 gboolean default_encrypt_reply
;
175 gboolean default_sign
;
176 gboolean default_sign_reply
;
177 gboolean save_encrypted_as_clear_text
;
178 gboolean encrypt_to_self
;
181 gboolean set_smtpport
;
183 gboolean set_popport
;
185 gboolean set_imapport
;
187 gboolean set_nntpport
;
191 gboolean set_gnutls_priority
;
192 gchar
*gnutls_priority
;
193 gboolean msgid_with_addr
;
194 gboolean mark_crosspost_read
;
198 /* Use this command to open a socket, rather than doing so
199 * directly. Good if you want to perhaps use a special socks
200 * tunnel command, or run IMAP-over-SSH. In this case the
201 * server, port etc are only for the user's own information
202 * and are not used. username and password are used to
203 * authenticate the account only if necessary, since some
204 * tunnels will implicitly authenticate by running e.g. imapd
205 * as a particular user. */
206 gboolean set_tunnelcmd
;
211 gboolean imap_subsonly
;
212 gboolean low_bandwidth
;
214 gboolean set_sent_folder
;
216 gboolean set_queue_folder
;
218 gboolean set_draft_folder
;
220 gboolean set_trash_folder
;
225 /* Unique account ID */
230 gboolean use_default_proxy
;
231 gboolean use_proxy_for_send
;
232 ProxyInfo proxy_info
;
234 struct _Folder
*folder
;
235 GHashTable
*privacy_prefs
;
236 SMTPSession
*session
;
241 void prefs_account_init (void);
243 PrefsAccount
*prefs_account_new (void);
244 PrefsAccount
*prefs_account_new_from_config (const gchar
*label
);
246 void prefs_account_write_config_all (GList
*account_list
);
248 void prefs_account_free (PrefsAccount
*ac_prefs
);
250 PrefsAccount
*prefs_account_open (PrefsAccount
*ac_prefs
, gboolean
*dirty
);
252 const gchar
*prefs_account_get_privacy_prefs(PrefsAccount
*account
, gchar
*id
);
253 void prefs_account_set_privacy_prefs(PrefsAccount
*account
, gchar
*id
, gchar
*new_value
);
254 gchar
*prefs_account_generate_msgid(PrefsAccount
*account
);
256 void prefs_account_register_page (PrefsPage
*page
);
257 void prefs_account_unregister_page (PrefsPage
*page
);
259 gchar
*prefs_account_cache_dir (PrefsAccount
*ac_prefs
, gboolean for_server
);
261 #endif /* PREFS_ACCOUNT_H */