claws-mail/src/prefs_account.h

186 lines
4.1 KiB
C
Raw Normal View History

2001-04-19 14:21:46 +02:00
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
2004-07-16 13:12:46 +02:00
* Copyright (C) 1999-2004 Hiroyuki Yamamoto
2001-04-19 14:21:46 +02:00
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __PREFS_ACCOUNT_H__
#define __PREFS_ACCOUNT_H__
2001-04-27 22:27:24 +02:00
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
2001-04-19 14:21:46 +02:00
typedef struct _PrefsAccount PrefsAccount;
typedef enum {
A_POP3,
A_APOP,
A_RPOP,
A_IMAP4,
A_NNTP,
2004-02-21 12:01:01 +01:00
A_LOCAL,
A_NONE, /* SMTP only */
2001-04-19 14:21:46 +02:00
} RecvProtocol;
2003-02-28 17:05:49 +01:00
typedef enum {
SIG_FILE,
SIG_COMMAND,
SIG_DIRECT
} SigType;
2004-01-12 22:28:31 +01:00
#include <glib.h>
#include "smtp.h"
#include "folder.h"
2001-04-19 14:21:46 +02:00
struct _PrefsAccount
{
gchar *account_name;
/* Personal info */
gchar *name;
gchar *address;
gchar *organization;
/* Server info */
RecvProtocol protocol;
gchar *recv_server;
gchar *smtp_server;
gchar *nntp_server;
gboolean use_nntp_auth;
gboolean use_nntp_auth_onconnect;
2001-04-19 14:21:46 +02:00
gchar *userid;
gchar *passwd;
gchar * local_mbox;
gboolean use_mail_command;
gchar * mail_command;
#if USE_OPENSSL
2002-05-29 10:28:56 +02:00
SSLType ssl_pop;
SSLType ssl_imap;
SSLType ssl_nntp;
SSLType ssl_smtp;
2003-07-16 13:53:42 +02:00
gboolean use_nonblocking_ssl;
#endif /* USE_OPENSSL */
2001-08-27 13:07:43 +02:00
2001-04-19 14:21:46 +02:00
/* Temporarily preserved password */
gchar *tmp_pass;
/* Receive */
gboolean rmmail;
2002-06-17 12:02:21 +02:00
gint msg_leave_time;
2001-04-19 14:21:46 +02:00
gboolean getall;
gboolean recv_at_getall;
2002-06-10 23:55:17 +02:00
gboolean sd_rmmail_on_download;
gboolean sd_filter_on_recv;
2002-02-21 15:56:09 +01:00
gboolean enable_size_limit;
gint size_limit;
2001-04-19 14:21:46 +02:00
gboolean filter_on_recv;
2001-10-30 11:25:49 +01:00
gchar *inbox;
gint max_articles;
2001-04-19 14:21:46 +02:00
gint imap_auth_type;
2001-04-19 14:21:46 +02:00
/* Send */
2002-02-21 15:56:09 +01:00
gboolean add_date;
gboolean gen_msgid;
gboolean add_customhdr;
2001-04-19 14:21:46 +02:00
gboolean use_smtp_auth;
2002-06-28 10:08:36 +02:00
SMTPAuthType smtp_auth_type;
2002-02-28 11:06:43 +01:00
gchar *smtp_userid;
gchar *smtp_passwd;
/* Temporarily preserved password */
gchar *tmp_smtp_pass;
2001-04-19 14:21:46 +02:00
gboolean pop_before_smtp;
gint pop_before_smtp_timeout;
time_t last_pop_login_time;
2001-04-19 14:21:46 +02:00
2001-04-24 17:44:45 +02:00
GSList *customhdr_list;
2001-04-19 14:21:46 +02:00
/* Compose */
2003-02-28 17:05:49 +01:00
SigType sig_type;
gchar *sig_path;
gboolean auto_sig;
gchar *sig_sep;
2001-10-30 11:25:49 +01:00
gboolean set_autocc;
gchar *auto_cc;
gboolean set_autobcc;
gchar *auto_bcc;
gboolean set_autoreplyto;
gchar *auto_replyto;
2001-04-19 14:21:46 +02:00
2001-04-21 15:18:13 +02:00
/* Privacy */
gboolean default_encrypt;
gboolean default_sign;
2001-04-21 15:18:13 +02:00
2001-04-19 14:21:46 +02:00
/* Advanced */
gboolean set_smtpport;
gushort smtpport;
gboolean set_popport;
gushort popport;
2001-07-04 12:14:20 +02:00
gboolean set_imapport;
gushort imapport;
2001-04-19 14:21:46 +02:00
gboolean set_nntpport;
gushort nntpport;
gboolean set_domain;
gchar *domain;
2002-03-17 10:50:46 +01:00
gboolean mark_crosspost_read;
gint crosspost_col;
2001-04-19 14:21:46 +02:00
2001-12-22 12:22:38 +01:00
/* Use this command to open a socket, rather than doing so
* directly. Good if you want to perhaps use a special socks
* tunnel command, or run IMAP-over-SSH. In this case the
* server, port etc are only for the user's own information
* and are not used. username and password are used to
* authenticate the account only if necessary, since some
* tunnels will implicitly authenticate by running e.g. imapd
* as a particular user. */
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;
2001-04-19 14:21:46 +02:00
/* Default or not */
gboolean is_default;
/* Unique account ID */
gint account_id;
2004-01-12 22:28:31 +01:00
Folder *folder;
2001-04-19 14:21:46 +02:00
};
2002-09-26 09:32:06 +02:00
PrefsAccount *prefs_account_new (void);
2001-04-19 14:21:46 +02:00
void prefs_account_read_config (PrefsAccount *ac_prefs,
const gchar *label);
2004-07-16 13:12:46 +02:00
void prefs_account_write_config_all (GList *account_list);
2002-09-26 09:32:06 +02:00
2001-04-19 14:21:46 +02:00
void prefs_account_free (PrefsAccount *ac_prefs);
2002-09-26 09:32:06 +02:00
2001-04-19 14:21:46 +02:00
PrefsAccount *prefs_account_open (PrefsAccount *ac_prefs);
#endif /* __PREFS_ACCOUNT_H__ */