2 * Claws Mail -- a GTK based, lightweight, and fast e-mail client
3 * Copyright (C) 1999-2012 Hiroyuki Yamamoto and the Claws Mail team
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
24 #include "claws-features.h"
29 #include "mainwindow.h"
30 #include "progressdialog.h"
31 #include "prefs_account.h"
35 typedef struct _IncProgressDialog IncProgressDialog
;
36 typedef struct _IncSession IncSession
;
53 struct _IncProgressDialog
55 ProgressDialog
*dialog
;
61 GDateTime
*progress_tv
;
64 GList
*queue_list
; /* list of IncSession */
78 #define TIMEOUT_ITV 200
80 void inc_mail (MainWindow
*mainwin
,
82 gint
inc_account_mail (MainWindow
*mainwin
,
83 PrefsAccount
*account
);
85 /* This function just blindly checks all accounts in the passed
86 * account_list, and doesn't care about whether the configuration
87 * says they should be checked or not. These checks should be done
88 * by the caller, and account_list should look accordingly.
89 * The caller is responsible for freeing the list afterwards. */
90 void inc_account_list_mail (MainWindow
*mainwin
,
91 GList
*list
, /* linked list of PrefsAccount* pointers */
95 /* This function is used by the global autocheck interval (autocheck TRUE),
96 * or check at startup (check_at_startup TRUE)
97 * or by the manual 'Receive all' feature (autocheck FALSE). It makes
98 * sure correct list of accounts is marked for checking, based on
99 * global and account configuration, and calls inc_account_list_mail(). */
100 void inc_all_account_mail (MainWindow
*mainwin
,
102 gboolean check_at_startup
,
105 void inc_progress_update (Pop3Session
*session
);
107 void inc_pop_before_smtp (PrefsAccount
*acc
);
109 gboolean
inc_is_active (void);
111 void inc_cancel_all (void);
113 extern guint inc_lock_count
;
114 #define inc_lock() { \
116 debug_print("called inc_lock (lock count %d)\n", inc_lock_count); \
119 #define inc_unlock() { \
121 debug_print("called inc_unlock (lock count %d)\n", inc_lock_count); \
124 void inc_lock_real (void);
125 void inc_unlock_real (void);
127 void inc_autocheck_timer_init (MainWindow
*mainwin
);
128 void inc_autocheck_timer_set (void);
129 void inc_autocheck_timer_remove (void);
130 gboolean
inc_offline_should_override(gboolean force_ask
, const gchar
*msg
);
132 void inc_account_autocheck_timer_remove(PrefsAccount
*account
);
133 void inc_account_autocheck_timer_set_interval(PrefsAccount
*account
);
135 void inc_reset_offline_override_timers();
137 #endif /* __INC_H__ */