]> code.citadel.org Git - citadel.git/blobdiff - citadel/server.h
Found a MUCH better way to store the UIDL's of
[citadel.git] / citadel / server.h
index 19eb12a2a1b722a4e06a197fa134166207223a60..49f2c73f42761824c72977df9d4b8540328a340e 100644 (file)
@@ -70,6 +70,7 @@ struct CitContext {
        int nologin;            /* not allowed to log in */
        int is_local_socket;    /* set to 1 if client is on unix domain sock */
        int curr_view;          /* The view type for the current user/room */
+       int is_master;          /* Is this session logged in using the master user? */
 
        char net_node[32]       ;/* Is the client another Citadel server? */
        time_t previous_login;  /* Date/time of previous login */
@@ -140,10 +141,9 @@ struct CitContext {
        struct citpop3 *POP3;
        struct citsmtp *SMTP;
        struct citmgsve *MGSVE; /**< Managesieve Session struct */
-       char *SMTP_RECPS;
-       char *SMTP_ROOMS;
        struct cit_ical *CIT_ICAL;              /* calendaring data */
        struct ma_info *ma;                     /* multipart/alternative data */
+       const char* ServiceName; /**< whats our actual purpose? */
 };
 
 typedef struct CitContext t_context;
@@ -237,6 +237,9 @@ enum {
        S_JOURNAL_QUEUE,
        S_RPLIST,
        S_SIEVELIST,
+       S_CHKPWD,
+       S_LOG,
+       S_NETSPOOL,
        MAX_SEMAPHORES
 };
 
@@ -346,7 +349,7 @@ extern struct SessionFunctionHook *SessionHookTable;
 
 #define EVT_TIMER      50      /* Timer events are called once per minute
                                   and are not tied to any session */
-
+#define EVT_HOUSE      51      /* as needed houskeeping stuff */
 /*
  * UserFunctionHook extensions are used for any type of hook which implements
  * an operation on a user or username (potentially) other than the one
@@ -379,7 +382,6 @@ extern struct MessageFunctionHook *MessageHookTable;
 #define EVT_SMTPSCAN   203     /* called before submitting a msg from SMTP */
 
 
-
 /*
  * NetprocFunctionHook extensions are used for hooks which implement handlers
  * for incoming network messages.
@@ -437,10 +439,38 @@ struct ServiceFunctionHook {
        void (*h_command_function) (void) ;
        void (*h_async_function) (void) ;
        int msock;
+       const char* ServiceName; /* this is just for debugging and logging purposes. */
 };
 extern struct ServiceFunctionHook *ServiceHookTable;
 
 
+/*
+ * RoomFunctionHook extensions are used for hooks which impliment room
+ * processing functions when new messages are added EG. SIEVE.
+ */
+struct RoomFunctionHook {
+       struct RoomFunctionHook *next;
+       int (*fcn_ptr) (struct ctdlroom *);
+};
+extern struct RoomFunctionHook *RoomHookTable;
+
+
+struct MaintenanceThreadHook {
+       struct MaintenanceThreadHook *next;
+       char *name;
+       void *(*fcn_ptr) (void *arg);
+       pthread_t MaintenanceThread_tid;
+};
+extern struct MaintenanceThreadHook *MaintenanceThreadHookTable;
+
+
+struct SearchFunctionHook {
+       struct SearchFunctionHook *next;
+       void (*fcn_ptr) (int *, long **, char *);
+       char *name;
+};
+extern struct SearchFunctionHook *SearchFunctionHookTable;
+
 
 /* Defines the relationship of a user to a particular room */
 struct visit {
@@ -490,6 +520,16 @@ struct ser_ret {
 };
 
 
+/*
+ * The S_USETABLE database is used in several modules now, so we define its format here.
+ */
+struct UseTable {
+       char ut_msgid[SIZ];
+       time_t ut_timestamp;
+};
+
+
+
 /* Preferred field order                                                       */
 /*               **********                    Important fields                */
 /*                         ***************     Semi-important fields           */