* Changed the format of the euidindex record to contain the record's key.
[citadel.git] / citadel / citadel.h
index 814cf2c3d88c5febfd4c6c92b28f8b31a704ea2c..7f9f65a1760fba11fd95971fcec17e4936d80d9b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * $Id$
  *
- * main Citadel/UX header file
+ * main Citadel header file
  * see copyright.txt for copyright information
  */
 
@@ -9,6 +9,7 @@
 
 #ifndef CITADEL_H
 #define CITADEL_H
+/* #include <dmalloc.h> uncomment if using dmalloc */
 
 /* Build Citadel with the calendar service only if the header *and*
  * library for libical are both present.
@@ -32,7 +33,7 @@ extern "C" {
 /*
  * Text description of this software
  */
-#define CITADEL        "Citadel/UX 6.08"
+#define CITADEL        "Citadel 6.58"
 
 /*
  * REV_LEVEL is the current version number (multiplied by 100 to avoid having
@@ -44,11 +45,11 @@ extern "C" {
  * usually more strict because you're not really supposed to dump/load and
  * upgrade at the same time.
  */
-#define REV_LEVEL      608             /* This version */
+#define REV_LEVEL      658             /* This version */
 #define REV_MIN                591             /* Oldest compatible database */
-#define EXPORT_REV_MIN 608             /* Oldest compatible export files */
+#define EXPORT_REV_MIN 655             /* Oldest compatible export files */
 
-#define SERVER_TYPE 0  /* zero for stock Citadel/UX; other developers please
+#define SERVER_TYPE 0  /* zero for stock Citadel; other developers please
                           obtain SERVER_TYPE codes for your implementations */
 
 /* Various length constants */
@@ -78,57 +79,6 @@ struct ExpirePolicy {
 #define EXPIRE_AGE             3       /* Expire messages after n days */
 
 
-/* 
- * Global system configuration.
- * 
- * Developers: please do NOT remove the fields labelled "not in use".  We
- * can't simply remove them from the struct, because that would render the
- * configs on existing systems corrupt.  However, if you need the same number
- * of bytes for a *new* field, feel free to use them.
- */
-struct config {
-       char c_nodename[16];            /* Unqualified "short" nodename     */
-       char c_fqdn[64];                /* Fully Qualified Domain Name      */
-       char c_humannode[21];           /* Long name of system              */
-       char c_phonenum[16];            /* Dialup number of system          */
-       uid_t c_bbsuid;                 /* UID of the bbs-only user         */
-       char c_creataide;               /* room creator = room aide  flag   */
-       int c_sleeping;                 /* watchdog timer setting           */
-       char c_initax;                  /* initial access level             */
-       char c_regiscall;               /* call number to register on       */
-       char c_twitdetect;              /* twit detect flag                 */
-       char c_twitroom[ROOMNAMELEN];   /* twit detect msg move to room     */
-       char c_moreprompt[80];          /* paginator prompt                 */
-       char c_restrict;                /* restrict Internet mail flag      */
-       long c_niu_1;                   /* (not in use)                     */
-       char c_bbs_city[32];            /* physical location of server      */
-       char c_sysadm[26];              /* name of system administrator     */
-       char c_niu_2[15];               /* (not in use)                     */
-       int c_setup_level;              /* what rev level we've setup to    */
-       int c_maxsessions;              /* maximum concurrent sessions      */
-       char c_net_password[20];        /* system net password (obsolete)   */
-       int c_port_number;              /* Cit listener port (usually 504)  */
-       int c_ipgm_secret;              /* Internal program authentication  */
-       struct ExpirePolicy c_ep;       /* System default msg expire policy */
-       int c_userpurge;                /* System default user purge (days) */
-       int c_roompurge;                /* System default room purge (days) */
-       char c_logpages[ROOMNAMELEN];   /* Room to log pages to (or not)    */
-       char c_createax;                /* Axlevel required to create rooms */
-       long c_maxmsglen;               /* Maximum message length           */
-       int c_min_workers;              /* Lower limit on number of threads */
-       int c_max_workers;              /* Upper limit on number of threads */
-       int c_pop3_port;                /* POP3 listener port (usually 110) */
-       int c_smtp_port;                /* SMTP listener port (usually 25)  */
-       int c_rfc822_strict_from;       /* 1 = don't correct From: forgeries*/
-       int c_aide_zap;                 /* Are Aides allowed to zap rooms?  */
-       int c_imap_port;                /* IMAP listener port (usually 143) */
-       time_t c_net_freq;              /* how often to run the networker   */
-       char c_disable_newu;            /* disable NEWU command             */
-       char c_aide_mailboxes;          /* give Aides access to mailboxes   */
-       char c_baseroom[ROOMNAMELEN];   /* Name of baseroom (Lobby)         */
-       char c_aideroom[ROOMNAMELEN];   /* Name of aideroom (Aide)          */
-};
-
 /*
  * This struct stores a list of rooms with new messages which the client
  * fetches from the server.  This allows the client to "march" through
@@ -148,7 +98,7 @@ struct march {
 #define FQDN                   config.c_fqdn
 #define HUMANNODE              config.c_humannode
 #define PHONENUM               config.c_phonenum
-#define BBSUID                 config.c_bbsuid
+#define CTDLUID                        config.c_ctdluid
 #define CREATAIDE              config.c_creataide
 #define REGISCALL              config.c_regiscall
 #define TWITDETECT             config.c_twitdetect
@@ -158,10 +108,10 @@ struct march {
 /*
  * User records.
  */
-struct user {                  /* User record                      */
+struct ctdluser {                      /* User record                      */
        int version;                    /* Cit vers. which created this rec */
        uid_t uid;                      /* Associate with a unix account?   */
-       char password[32];              /* password (for BBS-only users)    */
+       char password[32];              /* password (for Citadel-only users)*/
        unsigned flags;                 /* See US_ flags below              */
        long timescalled;               /* Total number of logins           */
        long posted;                    /* Number of messages posted (ever) */
@@ -175,17 +125,6 @@ struct user {                      /* User record                      */
 };
 
 
-/*
- * This is the control record for the message base... 
- */
-struct CitControl {
-       long MMhighest;                 /* highest message number in file   */
-       unsigned MMflags;               /* Global system flags              */
-       long MMnextuser;                /* highest user number on system    */
-       long MMnextroom;                /* highest room number on system    */
-       int version;                    /* Server-hosted upgrade level      */
-};
-
 /* Bits which may appear in CitControl.MMflags.  Note that these don't
  * necessarily pertain to the message base -- it's just a good place to
  * store any global flags.
@@ -195,7 +134,7 @@ struct CitControl {
 /*
  * Room records.
  */
-struct room {
+struct ctdlroom {
        char QRname[ROOMNAMELEN];       /* Name of room                     */
        char QRpasswd[10];              /* Only valid if it's a private rm  */
        long QRroomaide;                /* User number of room aide         */
@@ -241,7 +180,7 @@ struct floor {
        char f_name[256];               /* name of floor */
        int f_ref_count;                /* reference count */
        struct ExpirePolicy f_ep;       /* default expiration policy */
-       };
+};
 
 #define F_INUSE                1               /* floor is in use */
 
@@ -256,9 +195,9 @@ struct floor {
 #define READ_HEADER    2
 #define READ_MSGBODY   3
 
-/* commands we can send to the sttybbs() routine */
-#define SB_NO_INTR     0               /* set to bbs mode, i/q disabled */
-#define SB_YES_INTR    1               /* set to bbs mode, i/q enabled */
+/* commands we can send to the stty_ctdl() routine */
+#define SB_NO_INTR     0               /* set to Citadel client mode, i/q disabled */
+#define SB_YES_INTR    1               /* set to Citadel client mode, i/q enabled */
 #define SB_SAVE                2               /* save settings */
 #define SB_RESTORE     3               /* restore settings */
 #define SB_LAST                4               /* redo the last command sent */
@@ -296,9 +235,8 @@ enum {
 #define IGNETCFG       "application/x-citadel-ignet-config"
 #define IGNETMAP       "application/x-citadel-ignet-map"
 #define FILTERLIST     "application/x-citadel-filter-list"
-#define SPAMSTRINGS    "application/x-citadel-spam-strings"
 
-#define TRACE  lprintf(9, "Checkpoint: %s, %d\n", __FILE__, __LINE__)
+#define TRACE  lprintf(CTDL_DEBUG, "Checkpoint: %s, %d\n", __FILE__, __LINE__)
 
 #ifndef LONG_MAX
 #define LONG_MAX 2147483647L
@@ -308,22 +246,15 @@ enum {
 /*
  * Views
  */
-#define        VIEW_BBS                0       /* Traditional Citadel BBS view */
+#define        VIEW_BBS                0       /* Bulletin board view */
 #define VIEW_MAILBOX           1       /* Mailbox summary */
 #define VIEW_ADDRESSBOOK       2       /* Address book view */
+#define VIEW_CALENDAR          3       /* Calendar view */
+#define VIEW_TASKS             4       /* Tasks view */
+#define VIEW_NOTES             5       /* Notes view */
 
 #ifdef __cplusplus
 }
 #endif
 
-#ifdef tmpnam
-#undef tmpnam
-#endif
-#define tmpnam(x)      CtdlTempFileName(__FILE__, __LINE__)
-
-#ifdef tmpfile
-#undef tmpfile
-#endif
-#define tmpfile()      CtdlTempFile()
-
 #endif /* CITADEL_H */