aboutsummaryrefslogtreecommitdiff
path: root/src/inc.h
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-01-12 11:22:08 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-01-12 11:22:08 +0000
commitb9ca7b1ef5cd1f96ae6e28ae78d12c1e3258c23f (patch)
tree1203adec5f70af1ddd49868528d8d3a5b9004329 /src/inc.h
Initial import of Sylpheed (GTK2 version).
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/inc.h')
-rw-r--r--src/inc.h103
1 files changed, 103 insertions, 0 deletions
diff --git a/src/inc.h b/src/inc.h
new file mode 100644
index 00000000..8c2b406c
--- /dev/null
+++ b/src/inc.h
@@ -0,0 +1,103 @@
+/*
+ * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __INC_H__
+#define __INC_H__
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <glib.h>
+#include <time.h>
+#include <sys/time.h>
+
+#include "mainwindow.h"
+#include "progressdialog.h"
+#include "prefs_account.h"
+#include "session.h"
+#include "pop.h"
+
+typedef struct _IncProgressDialog IncProgressDialog;
+typedef struct _IncSession IncSession;
+
+typedef enum
+{
+ INC_SUCCESS,
+ INC_CONNECT_ERROR,
+ INC_AUTH_FAILED,
+ INC_LOCKED,
+ INC_ERROR,
+ INC_NO_SPACE,
+ INC_IO_ERROR,
+ INC_SOCKET_ERROR,
+ INC_EOF,
+ INC_TIMEOUT,
+ INC_CANCEL
+} IncState;
+
+struct _IncProgressDialog
+{
+ ProgressDialog *dialog;
+
+ MainWindow *mainwin;
+
+ gboolean show_dialog;
+
+ struct timeval progress_tv;
+ struct timeval folder_tv;
+
+ GList *queue_list; /* list of IncSession */
+ gint cur_row;
+};
+
+struct _IncSession
+{
+ Session *session;
+ IncState inc_state;
+
+ GHashTable *folder_table; /* table of destination folders */
+ GHashTable *tmp_folder_table; /* for progressive update */
+
+ gint cur_total_bytes;
+
+ gpointer data;
+};
+
+#define TIMEOUT_ITV 200
+
+void inc_mail (MainWindow *mainwin);
+gint inc_account_mail (MainWindow *mainwin,
+ PrefsAccount *account);
+void inc_all_account_mail (MainWindow *mainwin,
+ gboolean autocheck);
+void inc_progress_update (Pop3Session *session);
+
+gboolean inc_is_active (void);
+
+void inc_cancel_all (void);
+
+void inc_lock (void);
+void inc_unlock (void);
+
+void inc_autocheck_timer_init (MainWindow *mainwin);
+void inc_autocheck_timer_set (void);
+void inc_autocheck_timer_remove (void);
+
+#endif /* __INC_H__ */