Add pop before smtp
[claws.git] / src / inc.h
index 184f0fcd0ecfea478562ce2bb392da14bec9b462..0c444b761cf2f5f757b809c683204a1d97d2f280 100644 (file)
--- a/src/inc.h
+++ b/src/inc.h
@@ -25,6 +25,7 @@
 #endif
 
 #include <glib.h>
+#include <time.h>
 
 #include "mainwindow.h"
 #include "progressdialog.h"
 
 typedef struct _IncProgressDialog      IncProgressDialog;
 typedef struct _IncSession             IncSession;
-typedef struct _Pop3State              Pop3State;
 
 typedef enum
 {
        INC_SUCCESS,
        INC_CONNECT_ERROR,
        INC_AUTH_FAILED,
+       INC_LOCKED,
        INC_ERROR,
        INC_NOSPACE,
        INC_CANCEL
@@ -62,40 +63,11 @@ struct _IncSession
 {
        Pop3State *pop3_state;
        Automaton *atm;
-
-       gpointer data;
-};
-
-struct _Pop3State
-{
-       gboolean cancelled;
-       PrefsAccount *ac_prefs;
-       GHashTable *folder_table;
-
-       gchar *prev_folder;
-
-       SockInfo *sockinfo;
-
-       gchar *greeting;
-       gchar *user;
-       gchar *pass;
-       gint count;
-       gint new;
-       gint total_bytes;
-       gint cur_msg;
-       gint cur_total_num;
-       gint cur_total_bytes;
-
-       Pop3MsgInfo *msg;
-
-       GHashTable *uidl_table;
-
-       gboolean uidl_is_valid;
-
-       gint error_val;
        IncState inc_state;
 
-       IncSession *session;
+       GHashTable *folder_table;       /* table of destination folders */
+
+       gpointer data;
 };
 
 #define TIMEOUT_ITV    200
@@ -104,13 +76,20 @@ void inc_mail                      (MainWindow     *mainwin,
                                 gboolean notify);
 void inc_all_account_mail      (MainWindow     *mainwin,
                                 gboolean notify);
-gint inc_selective_download     (MainWindow    *mainwin, 
-                                gint           session_type);
+void inc_selective_download     (MainWindow    *mainwin, 
+                                PrefsAccount   *acc,
+                                gint            session);
 void inc_progress_update       (Pop3State      *state,
                                 Pop3Phase       phase);
 gint inc_drop_message          (const gchar    *file,
                                 Pop3State      *state);
 
+void inc_pop_before_smtp       (PrefsAccount   *acc);
+
+gboolean inc_is_active         (void);
+
+void inc_cancel_all            (void);
+
 void inc_lock                  (void);
 void inc_unlock                        (void);