diff options
| author | Simeon Simeonov | 2018-02-26 11:23:00 +0100 |
|---|---|---|
| committer | Simeon Simeonov | 2018-02-26 11:23:00 +0100 |
| commit | 0b3cbf57875fd692e4ba0b336fefa4bee1ed00dc (patch) | |
| tree | af916a30553c78ce9d4f2d8658656a175c5b6921 /src/inc.h | |
Initial commit for sylpheed 3.7.0
Diffstat (limited to 'src/inc.h')
| -rw-r--r-- | src/inc.h | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/src/inc.h b/src/inc.h new file mode 100644 index 0000000..98ca198 --- /dev/null +++ b/src/inc.h | |||
| @@ -0,0 +1,115 @@ | |||
| 1 | /* | ||
| 2 | * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client | ||
| 3 | * Copyright (C) 1999-2012 Hiroyuki Yamamoto | ||
| 4 | * | ||
| 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 2 of the License, or | ||
| 8 | * (at your option) any later version. | ||
| 9 | * | ||
| 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. | ||
| 14 | * | ||
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with this program; if not, write to the Free Software | ||
| 17 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
| 18 | */ | ||
| 19 | |||
| 20 | #ifndef __INC_H__ | ||
| 21 | #define __INC_H__ | ||
| 22 | |||
| 23 | #ifdef HAVE_CONFIG_H | ||
| 24 | # include "config.h" | ||
| 25 | #endif | ||
| 26 | |||
| 27 | #include <glib.h> | ||
| 28 | |||
| 29 | #include "mainwindow.h" | ||
| 30 | #include "progressdialog.h" | ||
| 31 | #include "prefs_account.h" | ||
| 32 | #include "session.h" | ||
| 33 | #include "pop.h" | ||
| 34 | |||
| 35 | typedef struct _IncResult IncResult; | ||
| 36 | typedef struct _IncProgressDialog IncProgressDialog; | ||
| 37 | typedef struct _IncSession IncSession; | ||
| 38 | |||
| 39 | typedef enum | ||
| 40 | { | ||
| 41 | INC_SUCCESS, | ||
| 42 | INC_CONNECT_ERROR, | ||
| 43 | INC_AUTH_FAILED, | ||
| 44 | INC_LOCKED, | ||
| 45 | INC_ERROR, | ||
| 46 | INC_NO_SPACE, | ||
| 47 | INC_IO_ERROR, | ||
| 48 | INC_SOCKET_ERROR, | ||
| 49 | INC_EOF, | ||
| 50 | INC_TIMEOUT, | ||
| 51 | INC_CANCEL, | ||
| 52 | INC_LOOKUP_ERROR | ||
| 53 | } IncState; | ||
| 54 | |||
| 55 | struct _IncProgressDialog | ||
| 56 | { | ||
| 57 | ProgressDialog *dialog; | ||
| 58 | |||
| 59 | MainWindow *mainwin; | ||
| 60 | |||
| 61 | gboolean show_dialog; | ||
| 62 | |||
| 63 | GTimeVal progress_tv; | ||
| 64 | GTimeVal folder_tv; | ||
| 65 | |||
| 66 | GList *queue_list; /* list of IncSession */ | ||
| 67 | gint cur_row; | ||
| 68 | |||
| 69 | IncResult *result; | ||
| 70 | }; | ||
| 71 | |||
| 72 | struct _IncSession | ||
| 73 | { | ||
| 74 | Session *session; | ||
| 75 | IncState inc_state; | ||
| 76 | |||
| 77 | GHashTable *folder_table; /* table of destination folders */ | ||
| 78 | GHashTable *tmp_folder_table; /* for progressive update */ | ||
| 79 | |||
| 80 | GSList *junk_fltlist; | ||
| 81 | |||
| 82 | gint64 cur_total_bytes; | ||
| 83 | gint new_msgs; | ||
| 84 | |||
| 85 | gint start_num; | ||
| 86 | gint64 start_recv_bytes; | ||
| 87 | |||
| 88 | gint retr_count; | ||
| 89 | |||
| 90 | gpointer data; | ||
| 91 | }; | ||
| 92 | |||
| 93 | #define TIMEOUT_ITV 200 | ||
| 94 | |||
| 95 | void inc_mail (MainWindow *mainwin); | ||
| 96 | gint inc_account_mail (MainWindow *mainwin, | ||
| 97 | PrefsAccount *account); | ||
| 98 | void inc_all_account_mail (MainWindow *mainwin, | ||
| 99 | gboolean autocheck); | ||
| 100 | |||
| 101 | gint inc_pop_before_smtp (PrefsAccount *account); | ||
| 102 | |||
| 103 | gboolean inc_is_active (void); | ||
| 104 | void inc_block_notify (gboolean notify); | ||
| 105 | |||
| 106 | void inc_cancel_all (void); | ||
| 107 | |||
| 108 | void inc_lock (void); | ||
| 109 | void inc_unlock (void); | ||
| 110 | |||
| 111 | void inc_autocheck_timer_init (MainWindow *mainwin); | ||
| 112 | void inc_autocheck_timer_set (void); | ||
| 113 | void inc_autocheck_timer_remove (void); | ||
| 114 | |||
| 115 | #endif /* __INC_H__ */ | ||
