X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-sys%2Fevtloop.h;h=73c9ec58b53e5420f26b88202ec24a473678516d;hp=8b465f582bbacff68e9e857de85d93ab4e19dc09;hb=9a5f2da8f1779dc7cbb550c0b54ed9eb82b4d594;hpb=f3076bd918cea51487a5b28dff9c69578f50b25e diff --git a/lib-sys/evtloop.h b/lib-sys/evtloop.h index 8b465f5..73c9ec5 100644 --- a/lib-sys/evtloop.h +++ b/lib-sys/evtloop.h @@ -23,6 +23,7 @@ #include #include +#include typedef enum el_state { EL_LLP_INIT, @@ -84,19 +85,18 @@ typedef struct machine_t { do { if ((expr) < 0) return -1; } while (0) __must_check__ int el_job_setmode(job_t *w, el_mode); +__must_check__ job_t *el_job_start(const machine_t *m, void *cfg); __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_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); -static inline job_t *el_job_start(const machine_t *m, void *cfg) { - job_t *w = job_new(); - w->m = m; - return m->setup(w, cfg) < 0 ? NULL : w; -} int el_dispatch(int timeout); +void el_initialize(void); +void el_shutdown(void); #endif