don't call curl_multi_add_handle() from outside of the event queue
[citadel.git] / citadel / event_client.h
index b2c368db2400c7d6bacd93b8df58a9271ff36c49..828ee0cb5a236b3fe073444dd7234232846e81c3 100644 (file)
@@ -14,13 +14,19 @@ typedef struct AsyncIO AsyncIO;
 typedef enum _eNextState {
        eSendDNSQuery,
        eReadDNSReply,
+
        eDBQuery,
+
        eConnect,
        eSendReply, 
        eSendMore,
+       eSendFile,
+
        eReadMessage, 
        eReadMore,
        eReadPayload,
+       eReadFile,
+
        eTerminateConnection,
        eAbort
 }eNextState;
@@ -82,6 +88,8 @@ struct AsyncIO {
        IOBuffer SendBuf, 
                RecvBuf;
 
+       FDIOBuffer IOB; /* when sending from / reading into files, this is used. */
+
        /* our events... */
        ev_cleanup abort_by_shutdown, /* server wants to go down... */
                db_abort_by_shutdown; /* server wants to go down... */
@@ -136,6 +144,7 @@ void FreeAsyncIOContents(AsyncIO *IO);
 eNextState NextDBOperation(AsyncIO *IO, IO_CallBack CB);
 eNextState QueueDBOperation(AsyncIO *IO, IO_CallBack CB);
 eNextState QueueEventContext(AsyncIO *IO, IO_CallBack CB);
+eNextState QueueCurlContext(AsyncIO *IO);
 int ShutDownEventQueue(void);
 
 eNextState InitEventIO(AsyncIO *IO, 
@@ -178,6 +187,4 @@ eNextState ReAttachIO(AsyncIO *IO,
                      void *pData, 
                      int ReadFirst);
 
-void evcurl_handle_start(AsyncIO *IO);
-
 #endif /* __EVENT_CLIENT_H__ */