/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2002 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2004 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
# include "config.h"
#endif
-#include <glib.h>
-
typedef struct _PrefsAccount PrefsAccount;
-#include "folder.h"
-
-#ifdef USE_GPGME
-# include "rfc2015.h"
-#endif
-
typedef enum {
A_POP3,
- A_APOP,
- A_RPOP,
+ A_APOP, /* deprecated */
+ A_RPOP, /* deprecated */
A_IMAP4,
A_NNTP,
- A_LOCAL
+ A_LOCAL,
+ A_NONE, /* SMTP only */
} RecvProtocol;
typedef enum {
- /* login and retrieve messages, as before */
- RETR_NORMAL,
- /* send TOP to server and retrieve Header */
- RETR_HEADER,
- /* delete selected Headers on Server */
- DELE_HEADER
-} Pop3SessionType;
-
-#if USE_GPGME
-typedef enum {
- SIGN_KEY_DEFAULT,
- SIGN_KEY_BY_FROM,
- SIGN_KEY_CUSTOM
-} SignKeyType;
-#endif /* USE_GPGME */
+ SIG_FILE,
+ SIG_COMMAND,
+ SIG_DIRECT
+} SigType;
-#if USE_SSL
-typedef enum {
- SSL_SMTP_NONE,
- SSL_SMTP_TUNNEL,
- SSL_SMTP_STARTTLS
-} SSLSMTPType;
-#endif /* USE_SSL */
+#include <glib.h>
+
+#include "smtp.h"
+#include "folder.h"
struct _PrefsAccount
{
gchar *smtp_server;
gchar *nntp_server;
gboolean use_nntp_auth;
+ gboolean use_nntp_auth_onconnect;
gchar *userid;
gchar *passwd;
gboolean use_mail_command;
gchar * mail_command;
-#if USE_SSL
- /* SSL */
- gboolean ssl_pop;
- gboolean ssl_imap;
- SSLSMTPType ssl_smtp;
-#endif /* USE_SSL */
+#if USE_OPENSSL
+ SSLType ssl_pop;
+ SSLType ssl_imap;
+ SSLType ssl_nntp;
+ SSLType ssl_smtp;
+ gboolean use_nonblocking_ssl;
+#endif /* USE_OPENSSL */
/* Temporarily preserved password */
gchar *tmp_pass;
/* Receive */
+ gboolean use_apop_auth;
gboolean rmmail;
- gchar *leave_time;
+ gint msg_leave_time;
gboolean getall;
gboolean recv_at_getall;
+ gboolean sd_rmmail_on_download;
+ gboolean sd_filter_on_recv;
gboolean enable_size_limit;
gint size_limit;
gboolean filter_on_recv;
gchar *inbox;
+ gint max_articles;
- /* selective Download */
- gint session_type;
- GSList *to_delete;
-
- gchar *imap_dir;
+ gint imap_auth_type;
/* Send */
gboolean add_date;
gboolean gen_msgid;
gboolean add_customhdr;
gboolean use_smtp_auth;
+ SMTPAuthType smtp_auth_type;
gchar *smtp_userid;
gchar *smtp_passwd;
gchar *tmp_smtp_pass;
gboolean pop_before_smtp;
+ gint pop_before_smtp_timeout;
+ time_t last_pop_login_time;
GSList *customhdr_list;
/* Compose */
- gchar *sig_path;
+ SigType sig_type;
+ gchar *sig_path;
+ gboolean auto_sig;
+ gchar *sig_sep;
gboolean set_autocc;
gchar *auto_cc;
gboolean set_autobcc;
gboolean set_autoreplyto;
gchar *auto_replyto;
-#if USE_GPGME
/* Privacy */
- gboolean default_encrypt;
- gboolean ascii_armored;
- gboolean default_sign;
- SignKeyType sign_key;
- gchar *sign_key_id;
-#endif /* USE_GPGME */
+ gchar *default_privacy_system;
+ gboolean default_encrypt;
+ gboolean default_sign;
+ gboolean save_encrypted_as_clear_text;
/* Advanced */
gboolean set_smtpport;
gboolean set_tunnelcmd;
gchar *tunnelcmd;
+ gchar *imap_dir;
+
+ gboolean set_sent_folder;
+ gchar *sent_folder;
+ gboolean set_draft_folder;
+ gchar *draft_folder;
+ gboolean set_trash_folder;
+ gchar *trash_folder;
+
/* Default or not */
gboolean is_default;
/* Unique account ID */
gint account_id;
- RemoteFolder *folder;
+ Folder *folder;
};
+PrefsAccount *prefs_account_new (void);
+
void prefs_account_read_config (PrefsAccount *ac_prefs,
const gchar *label);
-void prefs_account_save_config (PrefsAccount *ac_prefs);
-void prefs_account_save_config_all (GList *account_list);
+void prefs_account_write_config_all (GList *account_list);
+
void prefs_account_free (PrefsAccount *ac_prefs);
+
PrefsAccount *prefs_account_open (PrefsAccount *ac_prefs);
#endif /* __PREFS_ACCOUNT_H__ */