#ifndef MSGBASE_H
#define MSGBASE_H
-#include "event_client.h"
enum {
MSGS_ALL,
MSGS_OLD,
enum {
MSG_HDRS_BRIEF = 0,
MSG_HDRS_ALL = 1,
- MSG_HDRS_EUID = 4
+ MSG_HDRS_EUID = 4,
+ MSG_HDRS_BRIEFFILTER = 8,
+ MSG_HDRS_THREADS = 9
};
/*
};
-
/*
* 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
extern struct addresses_to_be_filed *atbf;
+int GetFieldFromMnemonic(eMsgField *f, const char* c);
void memfmout (char *mptr, const char *nl);
void output_mime_parts(char *);
long send_message (struct CtdlMessage *);
void loadtroom (void);
long CtdlSubmitMsg(struct CtdlMessage *, recptypes *, const char *, int);
-
-void quickie_message(const char *from,
- const char *fromaddr,
- const char *to,
- char *room,
- const char *text,
- int format_type,
- const char *subject);
-
-void flood_protect_quickie_message(const char *from,
- const char *fromaddr,
- const char *to,
- char *room,
- const char *text,
- int format_type,
- const char *subject,
- int nCriterions,
- const char **CritStr,
- const long *CritStrLen,
- long ccid,
- long ioid,
- time_t NOW);
-
+long quickie_message(const char *from, const char *fromaddr, const char *to, char *room, const char *text, int format_type, const char *subject);
void GetMetaData(struct MetaData *, long);
void PutMetaData(struct MetaData *);
void AdjRefCount(long, int);
int is_unique, /* Del others of this type? */
unsigned int flags /* Internal save flags */
);
-struct CtdlMessage *CtdlFetchMessage(long msgnum, int with_body, int run_msg_hooks);
+struct CtdlMessage *CtdlFetchMessage(long msgnum, int with_body);
struct CtdlMessage * CM_Duplicate
(struct CtdlMessage *OrgMsg);
int CM_IsEmpty (struct CtdlMessage *Msg, eMsgField which);
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 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, int *sock);
-StrBuf *CtdlReadMessageBodyBuf(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 */
- int *sock /* socket handle or 0 for this session's client socket */
- );
+char *CtdlReadMessageBody(char *terminator, long tlen, size_t maxlen, StrBuf *exist, int crlf);
+StrBuf *CtdlReadMessageBodyBuf(
+ 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 */
+);
int CtdlOutputMsg(long msg_num, /* message number (local) to fetch */
int mode, /* how would you like that message? */
ctdlsetseen_seen,
ctdlsetseen_answered
};
+
void CtdlSetSeen(long *target_msgnums, int num_target_msgnums,
- int target_setting, int which_set,
- struct ctdluser *which_user, struct ctdlroom *which_room);
+ int target_setting, int which_set,
+ struct ctdluser *which_user, struct ctdlroom *which_room
+);
+
void CtdlGetSeen(char *buf, int which_set);
char *preformatted_text, /* ...or NULL to read text from client */
long textlen,
char *references, /* Thread references */
- long reflen);
-
-/*
- * loading messages async via an FD:
- * add IO->ReadMsg = NewAsyncMsg(...)
- * and then call CtdlReadMessageBodyAsync() from your linreader handler.
- */
-
-ReadAsyncMsg *NewAsyncMsg(const char *terminator, /* token signalling EOT */
- long tlen,
- size_t expectlen, /* if we expect a message, how long should it be? */
- size_t maxlen, /* maximum message length */
- StrBuf *exist, /* if non-null, append to it;
- exist is ALWAYS freed */
- long eLen, /* length of exist */
- int crlf /* CRLF newlines instead of LF */
- );
-
-eReadState CtdlReadMessageBodyAsync(AsyncIO *IO);
-void DeleteAsyncMsg(ReadAsyncMsg **Msg);
-
-extern int MessageDebugEnabled;
-
-#define MSGDBGLOG(LEVEL) if ((LEVEL != LOG_DEBUG) || (MessageDebugEnabled != 0))
-#define CCCID CCC->cs_pid
-#define MSG_syslog(LEVEL, FORMAT, ...) \
- MSGDBGLOG(LEVEL) syslog(LEVEL, \
- "CC[%d]MSG " FORMAT, \
- CCCID, __VA_ARGS__)
-
-#define MSGM_syslog(LEVEL, FORMAT) \
- MSGDBGLOG(LEVEL) syslog(LEVEL, \
- "CC[%d]MSG " FORMAT, \
- CCCID)
-
+ long reflen
+);
+void AdjRefCountList(long *msgnum, long nmsg, int incr);
#endif /* MSGBASE_H */