]> code.citadel.org Git - citadel.git/blobdiff - citadel/server.h
* Merge LDAP code; bindings are not yet complete
[citadel.git] / citadel / server.h
index 9f456c7f9451d66f411d84983e465f72e449c388..9fc9ca6ec2458f798b5d3e230ac74b46770aec02 100644 (file)
@@ -32,6 +32,8 @@ struct CtdlMessage {
 
 
 
+#define CTDLEXIT_SHUTDOWN      0       /* Normal shutdown; do NOT auto-restart */
+
 /*
  * Exit codes 101 through 109 are used for conditions in which
  * we deliberately do NOT want the service to automatically
@@ -43,7 +45,7 @@ struct CtdlMessage {
 #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 */
-
+#define CTDL_EXIT_UNSUP_AUTH   107     /* Unsupported auth mode configured */
 
 
 
@@ -62,6 +64,7 @@ struct CitContext {
        int kill_me;            /* Set to nonzero to flag for termination */
        int client_socket;
        int cs_pid;             /* session ID */
+       int dont_term;          /* for special activities like artv so we don't get killed */
        time_t lastcmd;         /* time of last command executed */
        time_t lastidle;        /* For computing idle time */
 
@@ -103,6 +106,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;
 
@@ -121,10 +125,6 @@ struct CitContext {
        int redirect_ssl;
 #endif
 
-       int buffering;
-       char *output_buffer;    /* hold output for one big dump */
-       int buffer_len;
-
        /* A linked list of all instant messages sent to us. */
        struct ExpressMessage *FirstExpressMessage;
        int disable_exp;        /* Set to 1 to disable incoming pages */
@@ -143,7 +143,9 @@ 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? */
+       const char *ServiceName;                /* readable purpose of this session */
+       void *openid_data;                      /* Data stored by the OpenID module */
+       char *ldap_dn;                          /* DN of user when using AUTHMODE_LDAP */
 };
 
 typedef struct CitContext t_context;
@@ -183,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;
@@ -229,7 +232,6 @@ enum {
        S_DIRECTORY,
        S_NETCONFIGS,
        S_PUBLIC_CLIENTS,
-       S_LDAP,
        S_FLOORCACHE,
        S_DEBUGMEMLEAKS,
        S_ATBF,
@@ -242,6 +244,8 @@ enum {
        S_THREAD_LIST,
        S_XMPP_QUEUE,
        S_SCHEDULE_LIST,
+       S_SINGLE_USER,
+       S_LDAP,
        MAX_SEMAPHORES
 };
 
@@ -288,6 +292,8 @@ enum {
        CDB_BIGMSGS,            /* larger message bodies         */
        CDB_FULLTEXT,           /* full text search index        */
        CDB_EUIDINDEX,          /* locate msgs by EUID           */
+       CDB_USERSBYNUMBER,      /* index of users by number      */
+       CDB_OPENID,             /* associates OpenIDs with users */
        MAXCDB                  /* total number of CDB's defined */
 };
 
@@ -360,6 +366,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
@@ -395,6 +402,6 @@ struct UseTable {
 /*               **********                    Important fields                */
 /*                         ***************     Semi-important fields           */
 /*                                        *    Message text (MUST be last)     */
-#define FORDER "IPTAFONHRDBCEJGKLQSVWXZYUM"
+#define FORDER "IPTAFONHRDBCEWJGKLQSVXZYUM"
 
 #endif /* SERVER_H */