]> Pileus Git - ~andy/fetchmail/blobdiff - fetchmail.h
Track due time and prevent excess repelling
[~andy/fetchmail] / fetchmail.h
index 4560c6834c92b1fe582574750731edb1d8852e0b..c1ab23d25c682f193835cbbd34f51f5163d3d404 100644 (file)
 #define _NETBSD_SOURCE 1
 #endif
 
+#include "gettext.h"
+#define GT_(String) gettext (String)
+#define gettext_noop(String) String
+#define N_(String) gettext_noop (String)
+
 struct addrinfo;
 
 /* We need this for size_t */
@@ -203,7 +208,7 @@ UID_SEEN=   1,              /**< id was seen, but not deleted */
 UID_DELETED=   2,              /**< this message has been marked deleted */
 UID_EXPUNGED=  3               /**< this message has been expunged */
 };
-/*@}*/
+/**/
 
 
 struct query;
@@ -239,6 +244,10 @@ struct method              /* describe methods for protocol state machine */
                                /* mark as seen method */
     int (*end_mailbox_poll)(int, struct query *);
                                /* end-of-mailbox processing */
+    int (*start_idle)(int, struct query *);
+                               /* enter idle state */
+    int (*finish_idle)(int, struct query *);
+                               /* return from idle state */
     int (*logout_cmd)(int, struct query *);
                                /* logout command */
     flag retry;                        /* can getrange poll for new messages? */
@@ -299,6 +308,9 @@ struct hostdata             /* shared among all user connections to given server */
     struct hostdata *lead_server;      /* ptr to lead query for this server */
     int esmtp_options;
     int workarounds;                   /* track which workarounds the user was warned about */
+    int true_idle;                     /* the server supports true idle connections */
+    int idle_socket;                   /* the open socket for idle connections */
+    flag idle_ready;                   /* true if the idle socket has data available */
 };
 
 /*