* THIS IS 7.33 / 1.08
[citadel.git] / citadel / server.h
index 95c820ef8c34dc3fe74b2430510993c043b782c6..2a4aa0956decf92175acad70d781980257fe0efa 100644 (file)
@@ -42,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    108     /* Incorrect version of libcitadel */
 
 
 
@@ -102,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;
 
@@ -139,10 +141,7 @@ struct CitContext {
        int msg4_dont_decode;
 
        /* Dynamically allocated session data */
-       struct citimap *IMAP;
-       struct citpop3 *POP3;
-       struct citsmtp *SMTP;
-       struct citmgsve *MGSVE;                 /**< Managesieve Session struct */
+       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? */
@@ -191,12 +190,12 @@ extern struct CitContext *ContextList;
 extern int ScheduledShutdown;
 extern struct CitControl CitControl;
 
-
 struct ExpressMessage {
        struct ExpressMessage *next;
        time_t timestamp;       /* When this message was sent */
        unsigned flags;         /* Special instructions */
-       char sender[64];        /* Name of sending user */
+       char sender[256];       /* Name of sending user */
+       char sender_email[256]; /* Email or JID of sending user */
        char *text;             /* Message text (if applicable) */
 };
 
@@ -226,7 +225,6 @@ enum {
        S_NETDB,
        S_SUPPMSGMAIN,
        S_CONFIG,
-       S_WORKER_LIST,
        S_HOUSEKEEPING,
        S_NTTLIST,
        S_DIRECTORY,
@@ -243,6 +241,8 @@ enum {
        S_LOG,
        S_NETSPOOL,
        S_THREAD_LIST,
+       S_XMPP_QUEUE,
+       S_SCHEDULE_LIST,
        MAX_SEMAPHORES
 };
 
@@ -311,6 +311,8 @@ struct cdbdata {
 #define EVT_CMD                6       /* Called after each server command */
 #define EVT_RWHO       7       /* An RWHO command is being executed */
 #define EVT_ASYNC      8       /* Doing asynchronous messages */
+#define EVT_STEALTH    9       /* Entering stealth mode */
+#define EVT_UNSTEALTH  10      /* Exiting stealth mode */
 
 #define EVT_TIMER      50      /* Timer events are called once per minute
                                   and are not tied to any session */
@@ -359,6 +361,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