Can you tell I'm REALLY avoiding another task right now?
[citadel.git] / citadel / server / msgbase.h
index 2fa5c7414c1ee6e59932708ceaca6dafa603c23f..f432c085e513a2df1c4cc6d480faeb3178659b66 100644 (file)
@@ -22,9 +22,7 @@ enum {
        MSG_HDRS_THREADS = 9
 };
 
-/*
- * Possible return codes from CtdlOutputMsg()
- */
+// Possible return codes from CtdlOutputMsg()
 enum {
        om_ok,
        om_not_logged_in,
@@ -33,38 +31,33 @@ enum {
        om_access_denied
 };
 
-/*
- * Values of "headers_only" when calling message output routines
- */
-#define HEADERS_ALL    0       /* Headers and body */
-#define        HEADERS_ONLY    1       /* Headers only */
-#define        HEADERS_NONE    2       /* Body only */
-#define HEADERS_FAST   3       /* Headers only with no MIME info */
+// Values of "headers_only" when calling message output routines
+#define HEADERS_ALL    0       // Headers and body
+#define        HEADERS_ONLY    1       // Headers only
+#define        HEADERS_NONE    2       // Body only
+#define HEADERS_FAST   3       // Headers only with no MIME info
 
 
 struct ma_info {
-       int is_ma;              /* Set to 1 if we are using this stuff */
-       int freeze;             /* Freeze the replacement chain because we're
-                                * digging through a subsection */
-       int did_print;          /* One alternative has been displayed */
-       char chosen_part[128];  /* Which part of a m/a did we choose? */
-       int chosen_pref;        /* Chosen part preference level (lower is better) */
-       int use_fo_hooks;       /* Use fixed output hooks */
-       int dont_decode;        /* should we call the decoder or not? */
+       int is_ma;              // Set to 1 if we are using this stuff
+       int freeze;             // Freeze the replacement chain because we're digging through a subsection
+       int did_print;          // One alternative has been displayed
+       char chosen_part[128];  // Which part of a m/a did we choose?
+       int chosen_pref;        // Chosen part preference level (lower is better)
+       int use_fo_hooks;       // Use fixed output hooks
+       int dont_decode;        // should we call the decoder or not?
 };
 
 
-struct repl {                  /* Info for replication checking */
+struct repl {                  // Info for replication checking
        char exclusive_id[SIZ];
        time_t highest;
 };
 
 
-/*
- * This is a list of "harvested" email addresses that we might want to
- * stick into someone's address book.  But we defer this operaiton so
- * it can be done asynchronously.
- */
+// This is a list of "harvested" email addresses that we might want to
+// stick into someone's address book.  But we defer this operaiton so
+// it can be done asynchronously.
 struct addresses_to_be_filed {
        struct addresses_to_be_filed *next;
        char *roomname;
@@ -96,13 +89,13 @@ int CtdlForEachMessage(int mode,
                         ForEachMsgCallback CallBack,
                        void *userdata);
 int CtdlDeleteMessages(const char *, long *, int, char *);
-long CtdlWriteObject(char *req_room,                   /* Room to stuff it in */
-                       char *content_type,             /* MIME type of this object */
-                       char *raw_message,              /* Data to be written */
-                       off_t raw_length,               /* Size of raw_message */
-                       struct ctdluser *is_mailbox,    /* Mailbox room? */
-                       int is_binary,                  /* Is encoding necessary? */
-                       unsigned int flags              /* Internal save flags */
+long CtdlWriteObject(char *req_room,                   // Room to stuff it in
+                       char *content_type,             // MIME type of this object
+                       char *raw_message,              // Data to be written
+                       off_t raw_length,               // Size of raw_message
+                       struct ctdluser *is_mailbox,    // Mailbox room?
+                       int is_binary,                  // Is encoding necessary?
+                       unsigned int flags              // Internal save flags
 );
 struct CtdlMessage *CtdlFetchMessage(long msgnum, int with_body);
 struct CtdlMessage * CM_Duplicate
@@ -137,41 +130,41 @@ int CtdlSaveMsgPointerInRoom(char *roomname, long msgid, int do_repl_check, stru
 long CtdlSaveThisMessage(struct CtdlMessage *msg, long msgid, int Reply);
 char *CtdlReadMessageBody(char *terminator, long tlen, size_t maxlen, StrBuf *exist, int crlf);
 StrBuf *CtdlReadMessageBodyBuf(
-               char *terminator,       /* token signalling EOT */
+               char *terminator,       // token signalling EOT
                long tlen,
-               size_t maxlen,          /* maximum message length */
-               StrBuf *exist,          /* if non-null, append to it; exist is ALWAYS freed  */
-               int crlf                /* CRLF newlines instead of LF */
+               size_t maxlen,          // maximum message length
+               StrBuf *exist,          // if non-null, append to it; exist is ALWAYS freed
+               int crlf                // CRLF newlines instead of LF
 );
 
-int CtdlOutputMsg(long msg_num,                /* message number (local) to fetch */
-               int mode,               /* how would you like that message? */
-               int headers_only,       /* eschew the message body? */
-               int do_proto,           /* do Citadel protocol responses? */
-               int crlf,               /* 0=LF, 1=CRLF */
-               char *section,          /* output a message/rfc822 section */
-               int flags,              /* should the bessage be exported clean? */
-               char **Author,          /* if you want to know the author of the message... */
-               char **Address,         /* if you want to know the sender address of the message... */
-               char **MessageID        /* if you want to know the Message-ID of the message... */
+int CtdlOutputMsg(long msg_num,                // message number (local) to fetch
+               int mode,               // how would you like that message?
+               int headers_only,       // eschew the message body?
+               int do_proto,           // do Citadel protocol responses?
+               int crlf,               // 0=LF, 1=CRLF
+               char *section,          // output a message/rfc822 section
+               int flags,              // should the bessage be exported clean?
+               char **Author,          // if you want to know the author of the message...
+               char **Address,         // if you want to know the sender address of the message...
+               char **MessageID        // if you want to know the Message-ID of the message...
 );
 
-/* Flags which may be passed to CtdlOutputMsg() and CtdlOutputPreLoadedMsg() */
-#define QP_EADDR       (1<<0)          /* quoted-printable encode email addresses */
+// Flags which may be passed to CtdlOutputMsg() and CtdlOutputPreLoadedMsg()
+#define QP_EADDR       (1<<0)          // quoted-printable encode email addresses
 #define CRLF           (1<<1)
-#define ESC_DOT                (1<<2)          /* output a line containing only "." as ".." instead */
-#define SUPPRESS_ENV_TO        (1<<3)          /* suppress Envelope-to: header (warning: destructive!) */
+#define ESC_DOT                (1<<2)          // output a line containing only "." as ".." instead
+#define SUPPRESS_ENV_TO        (1<<3)          // suppress Envelope-to: header (warning: destructive!)
 
 int CtdlOutputPreLoadedMsg(struct CtdlMessage *,
-                          int mode,            /* how would you like that message? */
-                          int headers_only,    /* eschew the message body? */
-                          int do_proto,        /* do Citadel protocol responses? */
-                          int crlf,            /* 0=LF, 1=CRLF */
-                          int flags            /* should the bessage be exported clean? */
+                          int mode,            // how would you like that message?
+                          int headers_only,    // eschew the message body?
+                          int do_proto,        // do Citadel protocol responses?
+                          int crlf,            // 0=LF, 1=CRLF
+                          int flags            // should the bessage be exported clean?
 );
 
 
-/* values for which_set */
+// values for which_set
 enum {
        ctdlsetseen_seen,
        ctdlsetseen_answered
@@ -186,44 +179,44 @@ void CtdlGetSeen(char *buf, int which_set);
 
 
 struct CtdlMessage *CtdlMakeMessage(
-        struct ctdluser *author,        /* author's user structure */
-        char *recipient,                /* NULL if it's not mail */
-        char *recp_cc,                 /* NULL if it's not mail */
-        char *room,                     /* room where it's going */
-        int type,                       /* see MES_ types in header file */
-        int format_type,                /* variformat, plain text, MIME... */
-        char *fake_name,                /* who we're masquerading as */
-       char *my_email,                 /* which of my email addresses to use (empty is ok) */
-        char *subject,                  /* Subject (optional) */
-       char *supplied_euid,            /* ...or NULL if this is irrelevant */
-        char *preformatted_text,        /* ...or NULL to read text from client */
-       char *references                /* Thread references */
+        struct ctdluser *author,        // author's user structure
+        char *recipient,                // NULL if it's not mail
+        char *recp_cc,                 // NULL if it's not mail
+        char *room,                     // room where it's going
+        int type,                       // see MES_ types in header file
+        int format_type,                // variformat, plain text, MIME...
+        char *fake_name,                // who we're masquerading as
+       char *my_email,                 // which of my email addresses to use (empty is ok)
+        char *subject,                  // Subject (optional)
+       char *supplied_euid,            // ...or NULL if this is irrelevant
+        char *preformatted_text,        // ...or NULL to read text from client
+       char *references                // Thread references
 );
 
 struct CtdlMessage *CtdlMakeMessageLen(
-       struct ctdluser *author,        /* author's user structure */
-       char *recipient,                /* NULL if it's not mail */
+       struct ctdluser *author,        // author's user structure
+       char *recipient,                // NULL if it's not mail
        long rcplen,
-       char *recp_cc,                  /* NULL if it's not mail */
+       char *recp_cc,                  // NULL if it's not mail
        long cclen,
-       char *room,                     /* room where it's going */
+       char *room,                     // room where it's going
        long roomlen,
-       int type,                       /* see MES_ types in header file */
-       int format_type,                /* variformat, plain text, MIME... */
-       char *fake_name,                /* who we're masquerading as */
+       int type,                       // see MES_ types in header file
+       int format_type,                // variformat, plain text, MIME...
+       char *fake_name,                // who we're masquerading as
        long fnlen,
-       char *my_email,                 /* which of my email addresses to use (empty is ok) */
+       char *my_email,                 // which of my email addresses to use (empty is ok)
        long myelen,
-       char *subject,                  /* Subject (optional) */
+       char *subject,                  // Subject (optional)
        long subjlen,
-       char *supplied_euid,            /* ...or NULL if this is irrelevant */
+       char *supplied_euid,            // ...or NULL if this is irrelevant
        long euidlen,
-       char *preformatted_text,        /* ...or NULL to read text from client */
+       char *preformatted_text,        // ...or NULL to read text from client
        long textlen,
-       char *references,               /* Thread references */
+       char *references,               // Thread references
        long reflen
 );
 
 void AdjRefCountList(long *msgnum, long nmsg, int incr);
 
-#endif /* MSGBASE_H */
+#endif