0.9.7claws10
[claws.git] / src / prefs_account.h
index 308a94a6d05d65485a1bcf27b24258911828ca8e..95c5e65593bda9f1b61275988a91535414f8db4b 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-2003 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,
@@ -45,19 +36,11 @@ typedef enum {
 } RecvProtocol;
 
 typedef enum {
-       /* just login (pop before smtp) */
-       STYPE_POP_BEFORE_SMTP,
-       /* 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,
-} Pop3SessionType;
+       SIG_FILE,
+       SIG_COMMAND,
+       SIG_DIRECT
+} SigType;
+
 
 #if USE_GPGME
 typedef enum {
@@ -65,8 +48,23 @@ typedef enum {
        SIGN_KEY_BY_FROM,
        SIGN_KEY_CUSTOM
 } SignKeyType;
+
+typedef enum {
+       GNUPG_MODE_DETACH,
+       GNUPG_MODE_INLINE
+} DefaultGnuPGMode;
 #endif /* USE_GPGME */
 
+#include <glib.h>
+
+#include "smtp.h"
+#include "folder.h"
+
+#ifdef USE_GPGME
+#  include "rfc2015.h"
+#endif
+
+
 struct _PrefsAccount
 {
        gchar *account_name;
@@ -82,6 +80,7 @@ struct _PrefsAccount
        gchar *smtp_server;
        gchar *nntp_server;
        gboolean use_nntp_auth;
+       gboolean use_nntp_auth_onconnect;
        gchar *userid;
        gchar *passwd;
 
@@ -89,12 +88,13 @@ struct _PrefsAccount
        gboolean use_mail_command;
        gchar * mail_command;
 
-#if USE_SSL
+#if USE_OPENSSL
        SSLType ssl_pop;
        SSLType ssl_imap;
        SSLType ssl_nntp;
        SSLType ssl_smtp;
-#endif /* USE_SSL */
+       gboolean use_nonblocking_ssl;
+#endif /* USE_OPENSSL */
 
        /* Temporarily preserved password */
        gchar *tmp_pass;
@@ -110,10 +110,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;
@@ -134,7 +133,10 @@ struct _PrefsAccount
        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;
@@ -146,8 +148,7 @@ struct _PrefsAccount
        /* Privacy */
        gboolean default_encrypt;
        gboolean default_sign;
-       gboolean ascii_armored;
-       gboolean clearsign;
+       gboolean default_gnupg_mode;
        SignKeyType sign_key;
        gchar *sign_key_id;
 #endif /* USE_GPGME */
@@ -191,14 +192,17 @@ 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         (PrefsAccount   *ac_prefs);
 void prefs_account_save_config_all     (GList          *account_list);
+
 void prefs_account_free                        (PrefsAccount   *ac_prefs);
+
 PrefsAccount *prefs_account_open       (PrefsAccount   *ac_prefs);
 
 #endif /* __PREFS_ACCOUNT_H__ */