]> code.citadel.org Git - citadel.git/blobdiff - citadel/server.h
Remember the last version of Berkeley DB that touched the
[citadel.git] / citadel / server.h
index 9c5fabd79faf971fbc4941f585b9510fc40b9ffd..bf3c71f3286c52ed325f9e2d9ea59de6ac3dc1f9 100644 (file)
 #include <openssl/ssl.h>
 #endif
 
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
-#endif
-
 /*
  * New format for a message in memory
  */
@@ -53,6 +42,7 @@ struct CtdlMessage {
 #define CTDLEXIT_HOME          103     /* Citadel home directory not found */
 #define CTDLEXIT_OOD           104     /* Out Of Date config - rerun setup */
 #define CTDLEXIT_DB            105     /* Unable to initialize database */
+#define CTDLEXIT_LIBCITADEL    106     /* Incorrect version of libcitadel */
 
 
 
@@ -89,7 +79,6 @@ struct CitContext {
        unsigned cs_flags;      /* miscellaneous flags */
        void (*h_command_function) (void) ;     /* service command function */
        void (*h_async_function) (void) ;       /* do async msgs function */
-       void (*h_greeting_function) (void) ;    /* service startup function */
        int is_async;           /* Nonzero if client accepts async msgs */
        int async_waiting;      /* Nonzero if there are async msgs waiting */
        int input_waiting;      /* Nonzero if there is client input waiting */
@@ -114,6 +103,7 @@ struct CitContext {
        char upl_path[PATH_MAX];
        char upl_comment[256];
        char upl_filedir[PATH_MAX];
+       char upl_mimetype[64];
        char dl_is_net;
        char upload_type;
 
@@ -154,9 +144,8 @@ struct CitContext {
        char *session_specific_data;            /* Used by individual protocol modules */
        struct cit_ical *CIT_ICAL;              /* calendaring data */
        struct ma_info *ma;                     /* multipart/alternative data */
-       const char* ServiceName;                /**< whats our actual purpose? */
-       
-       struct timeval client_expires_at;               /** When this client will expire */
+       const char *ServiceName;                /* readable purpose of this session */
+       void *openid_data;                      /* Data stored by the OpenID module */
 };
 
 typedef struct CitContext t_context;
@@ -173,7 +162,6 @@ typedef struct CitContext t_context;
  */
 enum {
        CON_IDLE,               /* This context is doing nothing */
-       CON_START,              /* This context is starting up */
        CON_READY,              /* This context needs attention */
        CON_EXECUTING           /* This context is bound to a thread */
 };
@@ -197,6 +185,7 @@ struct CitControl {
        int version;                    /* Server-hosted upgrade level      */
        int fulltext_wordbreaker;       /* ID of wordbreaker in use         */
        long MMfulltext;                /* highest message number indexed   */
+       int MMdbversion;                /* Version of Berkeley DB used on previous server run */
 };
 
 extern struct CitContext *ContextList;
@@ -256,6 +245,7 @@ enum {
        S_THREAD_LIST,
        S_XMPP_QUEUE,
        S_SCHEDULE_LIST,
+       S_OPENID_ASSOC,
        MAX_SEMAPHORES
 };
 
@@ -374,6 +364,7 @@ struct MetaData {
        int meta_refcount;              /* Number of rooms pointing to this msg */
        char meta_content_type[64];     /* Cached MIME content-type */
        long meta_rfc822_length;        /* Cache of RFC822-translated msg length */
+       char mimetype[64];              /* if we were able to guess the mimetype for the data */ 
 };
 
 /* Calls to AdjRefCount() are queued and deferred, so the user doesn't
@@ -409,6 +400,6 @@ struct UseTable {
 /*               **********                    Important fields                */
 /*                         ***************     Semi-important fields           */
 /*                                        *    Message text (MUST be last)     */
-#define FORDER "IPTAFONHRDBCEJGKLQSVWXZYUM"
+#define FORDER "IPTAFONHRDBCEWJGKLQSVXZYUM"
 
 #endif /* SERVER_H */