+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#ifdef HAVE_LIBETPAN
+
#include "imap-thread.h"
#include <sys/types.h>
mailstream_network_delay.tv_sec = ETPAN_DEFAULT_NETWORK_TIMEOUT;
mailstream_network_delay.tv_usec = 0;
-#if 0
+#if 0
mailstream_debug = 1;
#endif
imap_hash = chash_new(CHASH_COPYKEY, CHASH_DEFAULTSIZE);
debug_print("imap noop run - end %i\n", r);
}
-int imap_threaded_noop(Folder * folder)
+int imap_threaded_noop(Folder * folder, unsigned int * p_exists)
{
struct noop_param param;
struct noop_result result;
+ mailimap * imap;
debug_print("imap noop - begin\n");
- param.imap = get_imap(folder);
+ imap = get_imap(folder);
+ param.imap = imap;
threaded_run(folder, ¶m, &result, noop_run);
+ if (imap->imap_selection_info != NULL) {
+ * p_exists = imap->imap_selection_info->sel_exists;
+ }
+ else {
+ * p_exists = 0;
+ }
+
debug_print("imap noop - end\n");
return result.error;
return result.error;
}
+#else
+
+void imap_main_init(void)
+{
+}
+void imap_main_done(void)
+{
+}
+void imap_main_set_timeout(int sec)
+{
+}
+
+#endif