2004-11-17 [colin] 0.9.12cvs156.1
[claws.git] / src / prefs_account.h
index 99b719d5047a29480784be399f19a6b4fc6aba7f..5f71af6250c67eb7213fcf818b53f5df250b2d25 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * 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"
-#include "smtp.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 */
-       STYPE_NORMAL,
-       /* send TOP to server and retrieve all available Headers */
-       STYPE_PREVIEW_ALL,
-       /* send TOP to server and retrieve new Headers */
-       STYPE_PREVIEW_NEW,
-       /* delete selected Headers on Server */
-       STYPE_DELETE, 
-       /* download + remove Mail from Server */
-       STYPE_DOWNLOAD,
-       /* just login (pop before smtp) */
-       STYPE_POP_BEFORE_SMTP,
-} Pop3SessionType;
-
-#if USE_GPGME
-typedef enum {
-       SIGN_KEY_DEFAULT,
-       SIGN_KEY_BY_FROM,
-       SIGN_KEY_CUSTOM
-} SignKeyType;
+       SIG_FILE,
+       SIG_COMMAND,
+       SIG_DIRECT
+} SigType;
 
-typedef enum {
-       GNUPG_MODE_DETACH,
-       GNUPG_MODE_INLINE
-} DefaultGnuPGMode;
-#endif /* USE_GPGME */
+#include <glib.h>
+
+#include "smtp.h"
+#include "folder.h"
 
 struct _PrefsAccount
 {
@@ -100,12 +75,14 @@ struct _PrefsAccount
        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;
        gint msg_leave_time;
        gboolean getall;
@@ -116,10 +93,9 @@ struct _PrefsAccount
        gint size_limit;
        gboolean filter_on_recv;
        gchar *inbox;
+       gint max_articles;
 
-       /* selective Download */
-       gint   session;
-       GSList *msg_list;
+       gint imap_auth_type;
 
        /* Send */
        gboolean add_date;
@@ -140,6 +116,7 @@ struct _PrefsAccount
        GSList *customhdr_list;
 
        /* Compose */
+       SigType sig_type;
        gchar    *sig_path;
        gboolean  auto_sig;
        gchar    *sig_sep;
@@ -150,14 +127,11 @@ struct _PrefsAccount
        gboolean  set_autoreplyto;
        gchar    *auto_replyto;
 
-#if USE_GPGME
        /* Privacy */
-       gboolean default_encrypt;
-       gboolean default_sign;
-       gboolean default_gnupg_mode;
-       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;
@@ -198,14 +172,14 @@ struct _PrefsAccount
        /* 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_all     (GList          *account_list);
+void prefs_account_write_config_all    (GList          *account_list);
 
 void prefs_account_free                        (PrefsAccount   *ac_prefs);