]> code.citadel.org Git - citadel.git/commitdiff
Set up data structures for room policies
authorArt Cancro <ajc@citadel.org>
Sun, 11 Oct 1998 07:16:25 +0000 (07:16 +0000)
committerArt Cancro <ajc@citadel.org>
Sun, 11 Oct 1998 07:16:25 +0000 (07:16 +0000)
citadel/ChangeLog
citadel/citadel.h

index 143da9528da10df2c34e960c3709770e14af2923..d840f0ae428a33c17c33de149f95fcc5d83376be 100644 (file)
@@ -1,6 +1,7 @@
 Sun Oct 11 02:51:55 EDT 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
        * Moved "struct visit" and its associated defs from citadel.h to
          server.h where they belong
+       * Set up data structures for room policies (expiry, etc.)
 
 1998-10-10 Nathan Bryant <bryant@cs.usm.maine.edu>
        * citserver.c: fix overrun which caused segv's on servers with long
index 498cb46456717b6f9d0cafd7c561b2c4cdd27529..ae1610b7eaa8fce38903285e14b12cc2fa686206 100644 (file)
@@ -29,6 +29,22 @@ typedef unsigned char CIT_UBYTE;
 
 #define ROOMNAMELEN    128
 
+/*
+ * Room policy stuff
+ */
+struct RoomPolicy {
+       int rp_expire_mode;
+       long rp_expire_value;
+       };
+
+#define RP_EXPIRE_NEXTLEVEL    0       /* Inherit expiration policy */
+#define RP_EXPIRE_NUMMSGS      1       /* Keep only latest n messages */
+#define RP_EXPIRE_AGE          2       /* Expire messages by age */
+
+
+/* 
+ * System configuration 
+ */
 struct config {
        char c_nodename[16];            /* UUCP and Citadel nodename        */
        char c_fqdn[64];                /* Fully Qualified Domain Name      */
@@ -53,6 +69,7 @@ struct config {
        char c_net_password[20];        /* system net password              */
        int c_port_number;              /* TCP port to run the server on    */
        int c_ipgm_secret;              /* Internal program authentication  */
+       struct RoomPolicy c_default_rp; /* System default room policy       */
        };
 
 #define NODENAME               config.c_nodename
@@ -122,6 +139,7 @@ struct quickroom {
        long QRinfo;                    /* Info file update relative to msgs*/
        char QRfloor;                   /* Which floor this room is on      */
        time_t QRmtime;                 /* Date/time of last post           */
+       struct RoomPolicy QRroompolicy; /* Room policy                      */
        };
 
 
@@ -171,6 +189,7 @@ struct floor {
        unsigned short f_flags;         /* flags */
        char f_name[256];               /* name of floor */
        int f_ref_count;                /* reference count */
+       struct RoomPolicy f_default_rp; /* default room policy */
        };
 
 #define F_INUSE                1               /* floor is in use */
@@ -226,3 +245,5 @@ struct floor {
 #define MAILROOM       "Mail"
 #define AIDEROOM       "Aide"
 
+
+