]> code.citadel.org Git - citadel.git/blobdiff - citadel/event_client.h
Refactoring: create central place to init AsyncIO
[citadel.git] / citadel / event_client.h
index 0b71c743e02833f1ed4becc4812498ea88a8aed4..c949a6ce937c3517fe826b9db1463ce984c7ad41 100644 (file)
@@ -165,11 +165,10 @@ eNextState QueueDBOperation(AsyncIO *IO, IO_CallBack CB);
 eNextState QueueEventContext(AsyncIO *IO, IO_CallBack CB);
 eNextState QueueCurlContext(AsyncIO *IO);
 
-eNextState InitEventIO(AsyncIO *IO, 
-                      void *pData, 
-                      double conn_timeout, 
-                      double first_rw_timeout,
-                      int ReadFirst);
+eNextState EvConnectSock(AsyncIO *IO, 
+                        double conn_timeout, 
+                        double first_rw_timeout,
+                        int ReadFirst);
 void IO_postdns_callback(struct ev_loop *loop, ev_idle *watcher, int revents);
 
 int QueueQuery(ns_type Type, const char *name, AsyncIO *IO, DNSQueryParts *QueryParts, IO_CallBack PostDNS);
@@ -201,6 +200,18 @@ int evcurl_init(AsyncIO *IO,
                 IO_CallBack Terminate, 
                IO_CallBack ShutdownAbort);
 
+void InitIOStruct(AsyncIO *IO,
+                 void *Data,
+                 eNextState NextState,
+                 IO_LineReaderCallback LineReader,
+                 IO_CallBack DNS_Fail,
+                 IO_CallBack SendDone,
+                 IO_CallBack ReadDone,
+                 IO_CallBack Terminate,
+                 IO_CallBack ConnFail,
+                 IO_CallBack Timeout,
+                 IO_CallBack ShutdownAbort);
+
 eNextState ReAttachIO(AsyncIO *IO, 
                      void *pData, 
                      int ReadFirst);