2005-09-14 [paul] 1.9.14cvs26
[claws.git] / src / prefs_account.h
index 379e1377b86dcaeffaba58205a81fef4ddf4fe16..ece169258b1809df1c18a4e3d4d9d15137a8b9d7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2003 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
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-#ifndef __PREFS_ACCOUNT_H__
-#define __PREFS_ACCOUNT_H__
+#ifndef PREFS_ACCOUNT_H
+#define PREFS_ACCOUNT_H
 
 #ifdef HAVE_CONFIG_H
 #  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 {
@@ -50,25 +42,11 @@ typedef enum {
        SIG_DIRECT
 } SigType;
 
-typedef enum {
-       /* login and retrieve messages, as before */
-       STYPE_NORMAL,
-       /* 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;
+#include <glib.h>
 
-typedef enum {
-       GNUPG_MODE_DETACH,
-       GNUPG_MODE_INLINE
-} DefaultGnuPGMode;
-#endif /* USE_GPGME */
+#include "smtp.h"
+#include "folder.h"
+#include "gtk/prefswindow.h"
 
 struct _PrefsAccount
 {
@@ -98,12 +76,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,9 +96,7 @@ struct _PrefsAccount
        gchar *inbox;
        gint max_articles;
 
-       /* selective Download */
-       gint   session;
-       GSList *msg_list;
+       gint imap_auth_type;
 
        /* Send */
        gboolean add_date;
@@ -150,14 +128,12 @@ 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_encrypt_reply;
+       gboolean  default_sign;
+       gboolean  save_encrypted_as_clear_text;
 
        /* Advanced */
        gboolean  set_smtpport;
@@ -188,6 +164,8 @@ struct _PrefsAccount
 
        gboolean set_sent_folder;
        gchar *sent_folder;
+       gboolean set_queue_folder;
+       gchar *queue_folder;
        gboolean set_draft_folder;
        gchar *draft_folder;
        gboolean set_trash_folder;
@@ -198,17 +176,27 @@ struct _PrefsAccount
        /* Unique account ID */
        gint account_id;
 
-       RemoteFolder *folder;
+       Folder *folder;
+       GHashTable *privacy_prefs;
+       SMTPSession *session;
 };
 
+void prefs_account_init                        (void);
+
 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);
 
 PrefsAccount *prefs_account_open       (PrefsAccount   *ac_prefs);
 
-#endif /* __PREFS_ACCOUNT_H__ */
+const gchar *prefs_account_get_privacy_prefs(PrefsAccount *account, gchar *id);
+void prefs_account_set_privacy_prefs(PrefsAccount *account, gchar *id, gchar *new_value);
+
+void prefs_account_register_page       (PrefsPage      *page);
+void prefs_account_unregister_page     (PrefsPage      *page);
+
+#endif /* PREFS_ACCOUNT_H */