2 * Claws Mail -- a GTK based, lightweight, and fast e-mail client
3 * Copyright (C) 1999-2023 the Claws Mail team and Hiroyuki Yamamoto
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
;
120 guint imap_batch_size
;
122 gboolean receive_in_progress
;
126 gboolean gen_xmailer
;
127 gboolean add_customhdr
;
128 gboolean use_smtp_auth
;
129 SMTPAuthType smtp_auth_type
;
132 gchar
*session_smtp_passwd
;
134 gboolean pop_before_smtp
;
135 gint pop_before_smtp_timeout
;
136 time_t last_pop_login_time
;
138 GSList
*customhdr_list
;
141 gint oauth2_provider
;
143 gchar
*oauth2_authcode
;
144 gchar
*oauth2_client_id
;
145 gchar
*oauth2_client_secret
;
154 gboolean set_autobcc
;
156 gboolean set_autoreplyto
;
158 gboolean enable_default_dictionary
;
159 gchar
*default_dictionary
;
160 gboolean enable_default_alt_dictionary
;
161 gchar
*default_alt_dictionary
;
162 gboolean compose_with_format
;
163 gchar
*compose_subject_format
;
164 gchar
*compose_body_format
;
165 gboolean reply_with_format
;
166 gchar
*reply_quotemark
;
167 gchar
*reply_body_format
;
168 gboolean forward_with_format
;
169 gchar
*forward_quotemark
;
170 gchar
*forward_body_format
;
173 gchar
*default_privacy_system
;
174 gboolean default_encrypt
;
175 gboolean default_encrypt_reply
;
176 gboolean default_sign
;
177 gboolean default_sign_reply
;
178 gboolean save_encrypted_as_clear_text
;
179 gboolean encrypt_to_self
;
182 gboolean set_smtpport
;
184 gboolean set_popport
;
186 gboolean set_imapport
;
188 gboolean set_nntpport
;
192 gboolean set_gnutls_priority
;
193 gchar
*gnutls_priority
;
194 gboolean msgid_with_addr
;
195 gboolean mark_crosspost_read
;
199 /* Use this command to open a socket, rather than doing so
200 * directly. Good if you want to perhaps use a special socks
201 * tunnel command, or run IMAP-over-SSH. In this case the
202 * server, port etc are only for the user's own information
203 * and are not used. username and password are used to
204 * authenticate the account only if necessary, since some
205 * tunnels will implicitly authenticate by running e.g. imapd
206 * as a particular user. */
207 gboolean set_tunnelcmd
;
212 gboolean imap_subsonly
;
213 gboolean low_bandwidth
;
215 gboolean set_sent_folder
;
217 gboolean set_queue_folder
;
219 gboolean set_draft_folder
;
221 gboolean set_trash_folder
;
226 /* Unique account ID */
231 gboolean use_default_proxy
;
232 gboolean use_proxy_for_send
;
233 ProxyInfo proxy_info
;
235 struct _Folder
*folder
;
236 GHashTable
*privacy_prefs
;
237 SMTPSession
*session
;
242 void prefs_account_init (void);
244 PrefsAccount
*prefs_account_new (void);
245 PrefsAccount
*prefs_account_new_from_config (const gchar
*label
);
247 void prefs_account_write_config_all (GList
*account_list
);
249 void prefs_account_free (PrefsAccount
*ac_prefs
);
251 PrefsAccount
*prefs_account_open (PrefsAccount
*ac_prefs
, gboolean
*dirty
);
253 const gchar
*prefs_account_get_privacy_prefs(PrefsAccount
*account
, gchar
*id
);
254 void prefs_account_set_privacy_prefs(PrefsAccount
*account
, gchar
*id
, gchar
*new_value
);
255 gchar
*prefs_account_generate_msgid(PrefsAccount
*account
);
257 void prefs_account_register_page (PrefsPage
*page
);
258 void prefs_account_unregister_page (PrefsPage
*page
);
260 gchar
*prefs_account_cache_dir (PrefsAccount
*ac_prefs
, gboolean for_server
);
262 #endif /* PREFS_ACCOUNT_H */