]> code.citadel.org Git - citadel.git/blobdiff - citadel/context.h
Upsie, usleep is 10^6 times smaller than sleep
[citadel.git] / citadel / context.h
index 903195c37ccbee9f3a7f400ff885b3dcf9b5062b..1d152a413882b2aa966e6fa53c6664ce6f8119af 100644 (file)
@@ -28,6 +28,14 @@ typedef enum __CCState {
        CON_SYS                 /* This is a system context and mustn't be purged */
 } CCState;
 
+#ifndef __ASYNCIO__
+#define __ASYNCIO__
+typedef struct AsyncIO AsyncIO; /* forward declaration for event_client.h */
+#endif
+#ifndef __CIT_CONTEXT__
+#define __CIT_CONTEXT__
+typedef struct CitContext CitContext;
+#endif
 
 /*
  * Here's the big one... the Citadel context structure.
@@ -37,8 +45,8 @@ typedef enum __CCState {
  *
  */
 struct CitContext {
-       struct CitContext *prev;        /* Link to previous session in list */
-       struct CitContext *next;        /* Link to next session in the list */
+       CitContext *prev;       /* Link to previous session in list */
+       CitContext *next;       /* Link to next session in the list */
 
        int cs_pid;             /* session ID */
        int dont_term;          /* for special activities like artv so we don't get killed */
@@ -140,9 +148,10 @@ struct CitContext {
 
        long *cached_msglist;                   /* results of the previous CtdlForEachMessage() */
        int cached_num_msgs;
+
+       AsyncIO *IO;                            /* if this session has AsyncIO going on... */
 };
 
-typedef struct CitContext CitContext;
 
 
 #define CC MyContext()