]> code.citadel.org Git - citadel.git/blobdiff - citadel/server/msgbase.h
Changed the BIGMSGS semantics.
[citadel.git] / citadel / server / msgbase.h
index f432c085e513a2df1c4cc6d480faeb3178659b66..80033bc6badd657eccc6725b7547188ca03a27f3 100644 (file)
@@ -120,14 +120,20 @@ int  CM_IsValidMsg     (struct CtdlMessage *msg);
 #define CM_RANGE(Message, Which) Message->cm_fields[Which], \
                Message->cm_fields[Which] + Message->cm_lengths[Which]
 
-void CtdlSerializeMessage(struct ser_ret *, struct CtdlMessage *);
+// Serialization routines use this struct to return a pointer and a length
+struct ser_ret {
+       size_t len;                     // length of allocation
+       unsigned char *ser;             // pointer to allocation
+       unsigned char *msgstart;        // pointer to the "M" (message text) field
+};
+
+struct ser_ret CtdlSerializeMessage(struct CtdlMessage *);
 struct CtdlMessage *CtdlDeserializeMessage(long msgnum, int with_body, const char *Buffer, long Length);
 void ReplicationChecks(struct CtdlMessage *);
 int CtdlSaveMsgPointersInRoom(char *roomname, long newmsgidlist[], int num_newmsgs,
                              int do_repl_check, struct CtdlMessage *supplied_msg, int suppress_refcount_adj
 );
 int CtdlSaveMsgPointerInRoom(char *roomname, long msgid, int do_repl_check, struct CtdlMessage *msg);
-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