* More SMTP implementation
[citadel.git] / citadel / msgbase.h
index cac60f9bb9868dc5e0f5a970f3bf899a2e38446c..8193b90d5285832381bd3eda690fa0a2d2dd734b 100644 (file)
@@ -9,6 +9,12 @@
 #define MSGS_LAST       4
 #define MSGS_GT         5
 
+/*
+ * Flags which may be passed to CtdlSaveMsgPointerInRoom()
+ */
+#define SM_VERIFY_GOODNESS     1       /* Verify this is a real msg number */
+#define SM_DO_REPL_CHECK       2       /* Perform replication checks */
+
 
 struct ma_info {
        char prefix[256];       /* Prefix for a multipart/alternative */
@@ -17,6 +23,10 @@ struct ma_info {
 };
 
 
+struct repl {                  /* Info for replication checking */
+       char extended_id[256];
+       time_t highest;
+};
 
 
 int alias (char *name);
@@ -46,12 +56,18 @@ void GetSuppMsgInfo(struct SuppMsgInfo *, long);
 void PutSuppMsgInfo(struct SuppMsgInfo *);
 void AdjRefCount(long, int);
 void simple_listing(long);
+int CtdlMsgCmp(struct CtdlMessage *msg, struct CtdlMessage *template);
 void CtdlForEachMessage(int mode, long ref,
                        char *content_type,
+                       struct CtdlMessage *compare,
                         void (*CallBack) (long msgnum) );
 int CtdlDeleteMessages(char *, long, char *);
-void CtdlWriteObject(char *, char *, char *, int, int, int);
+void CtdlWriteObject(char *, char *, char *, struct usersupp *,
+                       int, int, unsigned int);
 struct CtdlMessage *CtdlFetchMessage(long msgnum);
 void CtdlFreeMessage(struct CtdlMessage *msg);
 void serialize_message(struct ser_ret *, struct CtdlMessage *);
 int is_valid_message(struct CtdlMessage *);
+int ReplicationChecks(struct CtdlMessage *);
+int CtdlSaveMsgPointerInRoom(char *roomname, long msgid, int flags);
+char *CtdlReadMessageBody(char *terminator, size_t maxlen);