X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-sys%2Fevtloop.h;h=e9eff3a9552a9178f09f530aa8fa5e24a4cd026e;hp=73c9ec58b53e5420f26b88202ec24a473678516d;hb=7db27b8f24670fd40cf24755f2782a104ad24594;hpb=9a5f2da8f1779dc7cbb550c0b54ed9eb82b4d594 diff --git a/lib-sys/evtloop.h b/lib-sys/evtloop.h index 73c9ec5..e9eff3a 100644 --- a/lib-sys/evtloop.h +++ b/lib-sys/evtloop.h @@ -15,7 +15,7 @@ * MA 02110-1301, USA. */ /* - * Copyright © 2006 Pierre Habouzit + * Copyright © 2007 Pierre Habouzit */ #ifndef MUTT_LIB_SYS_EVTLOOP_H @@ -24,6 +24,7 @@ #include #include #include +#include "account.h" typedef enum el_state { EL_LLP_INIT, @@ -58,13 +59,15 @@ typedef struct job_t { int fd; int ssf; - gnutls_session_t session; - gnutls_certificate_credentials_t xcred; - + unsigned cond : 1; el_state state : 2; el_mode mode : 3; el_mode emode : 3; + gnutls_session_t session; + gnutls_certificate_credentials_t xcred; + + struct timeval mru; int (*llp)(struct job_t *); const struct machine_t *m; void *ptr; @@ -90,12 +93,17 @@ __must_check__ int el_job_release(job_t *j, el_status); __must_check__ int el_job_connect(job_t *w, struct sockaddr *, socklen_t len, int type, int proto, int ssl); +__must_check__ int el_job_connect2(job_t *w, const ACCOUNT *); __must_check__ int el_job_starttls(job_t *w); __must_check__ ssize_t el_job_read(job_t *w, buffer_t *buf); __must_check__ ssize_t el_job_write(job_t *w, buffer_t *buf); +void el_lock(void); +void el_unlock(void); +void el_wait(volatile job_t *w); int el_dispatch(int timeout); + void el_initialize(void); void el_shutdown(void);