2007-08-10 [colin] 2.10.0cvs110
[claws.git] / src / etpan / imap-thread.h
index 5f6ee4fd72a226dce3ca14f7960e839db2b7224a..4603fb0cd800607f021d9d4ce7314a4a317735c9 100644 (file)
@@ -1,3 +1,22 @@
+/*
+ * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
+ * Copyright (C) 2005-2007 DINH Viet Hoa and the Claws Mail team
+ *
+ * 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 3 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, see <http://www.gnu.org/licenses/>.
+ * 
+ */
+
 #ifndef IMAP_THREAD_H
 
 #define IMAP_THREAD_H
@@ -8,7 +27,7 @@
 #define IMAP_SET_MAX_COUNT 100
 
 void imap_main_set_timeout(int sec);
-void imap_main_init(void);
+void imap_main_init(gboolean skip_ssl_cert_check);
 void imap_main_done(void);
 
 void imap_init(Folder * folder);
@@ -16,7 +35,7 @@ void imap_done(Folder * folder);
 
 int imap_threaded_connect(Folder * folder, const char * server, int port);
 int imap_threaded_connect_ssl(Folder * folder, const char * server, int port);
-struct mailimap_capability_data * imap_threaded_capability(Folder *folder);
+struct mailimap_capability_data * imap_threaded_capability(Folder *folder, int *ok);
 int imap_threaded_connect_cmd(Folder * folder, const char * command,
                              const char * server, int port);
 
@@ -25,14 +44,23 @@ void imap_threaded_disconnect(Folder * folder);
 int imap_threaded_list(Folder * folder, const char * base,
                       const char * wildcard,
                       clist ** p_result);
+int imap_threaded_lsub(Folder * folder, const char * base,
+                      const char * wildcard,
+                      clist ** p_result);
 int imap_threaded_login(Folder * folder,
                        const char * login, const char * password,
                        const char * type);
 int imap_threaded_status(Folder * folder, const char * mb,
                struct mailimap_mailbox_data_status ** data_status,
                guint mask);
-
-int imap_threaded_noop(Folder * folder, unsigned int * p_exists);
+int imap_threaded_close(Folder * folder);
+
+int imap_threaded_noop(Folder * folder, unsigned int * p_exists, 
+                      unsigned int *p_recent, 
+                      unsigned int *p_expunge,
+                      unsigned int *p_unseen,
+                      unsigned int *p_uidnext,
+                      unsigned int *p_uidval);
 int imap_threaded_starttls(Folder * folder, const gchar *host, int port);
 int imap_threaded_create(Folder * folder, const char * mb);
 int imap_threaded_rename(Folder * folder,
@@ -44,6 +72,8 @@ int imap_threaded_select(Folder * folder, const char * mb,
 int imap_threaded_examine(Folder * folder, const char * mb,
                          gint * exists, gint * recent, gint * unseen,
                          guint32 * uid_validity);
+int imap_threaded_subscribe(Folder * folder, const char * mb,
+                      gboolean subscribe);
 
 enum {
        IMAP_SEARCH_TYPE_SIMPLE,
@@ -62,6 +92,11 @@ int imap_threaded_fetch_uid(Folder * folder, uint32_t first_index,
 
 void imap_fetch_uid_list_free(carray * uid_list);
 
+int imap_threaded_fetch_uid_flags(Folder * folder, uint32_t first_index,
+                                 carray ** fetch_result);
+
+void imap_fetch_uid_flags_list_free(carray * uid_flags_list);
+
 int imap_threaded_fetch_content(Folder * folder, uint32_t msg_index,
                                int with_body,
                                const char * filename);
@@ -86,9 +121,12 @@ int imap_threaded_append(Folder * folder, const char * mailbox,
 int imap_threaded_expunge(Folder * folder);
 
 int imap_threaded_copy(Folder * folder, struct mailimap_set * set,
-                      const char * mb);
+                      const char * mb, struct mailimap_set **source,
+                      struct mailimap_set **dest);
 
 int imap_threaded_store(Folder * folder, struct mailimap_set * set,
                        struct mailimap_store_att_flags * store_att_flags);
 
+void imap_threaded_cancel(Folder * folder);
+
 #endif