* More SMTP implementation
[citadel.git] / citadel / msgbase.h
1 /* $Id$ */
2
3 #define aide_message(text)      quickie_message("Citadel",NULL,AIDEROOM,text)
4
5 #define MSGS_ALL        0
6 #define MSGS_OLD        1
7 #define MSGS_NEW        2
8 #define MSGS_FIRST      3
9 #define MSGS_LAST       4
10 #define MSGS_GT         5
11
12 /*
13  * Flags which may be passed to CtdlSaveMsgPointerInRoom()
14  */
15 #define SM_VERIFY_GOODNESS      1       /* Verify this is a real msg number */
16 #define SM_DO_REPL_CHECK        2       /* Perform replication checks */
17
18
19 struct ma_info {
20         char prefix[256];       /* Prefix for a multipart/alternative */
21         int is_ma;              /* Set to 1 if we are using this stuff */
22         int did_print;          /* One alternative has been displayed */
23 };
24
25
26 struct repl {                   /* Info for replication checking */
27         char extended_id[256];
28         time_t highest;
29 };
30
31
32 int alias (char *name);
33 void get_mm (void);
34 void cmd_msgs (char *cmdbuf);
35 void help_subst (char *strbuf, char *source, char *dest);
36 void do_help_subst (char *buffer);
37 void memfmout (int width, char *mptr, char subst);
38 void output_mime_parts(char *);
39 void output_message (char *, int, int);
40 void cmd_msg0 (char *cmdbuf);
41 void cmd_msg2 (char *cmdbuf);
42 void cmd_msg3 (char *cmdbuf);
43 void cmd_msg4 (char *cmdbuf);
44 void cmd_opna (char *cmdbuf);
45 long send_message (struct CtdlMessage *, int, FILE *);
46 void loadtroom (void);
47 void CtdlSaveMsg(struct CtdlMessage *, char *, char *, int, int);
48 void quickie_message (char *, char *, char *, char *);
49 struct CtdlMessage *make_message (struct usersupp *, char *,
50                    char *, int, int, int, char *);
51 void cmd_ent0 (char *entargs);
52 void cmd_ent3 (char *entargs);
53 void cmd_dele (char *delstr);
54 void cmd_move (char *args);
55 void GetSuppMsgInfo(struct SuppMsgInfo *, long);
56 void PutSuppMsgInfo(struct SuppMsgInfo *);
57 void AdjRefCount(long, int);
58 void simple_listing(long);
59 int CtdlMsgCmp(struct CtdlMessage *msg, struct CtdlMessage *template);
60 void CtdlForEachMessage(int mode, long ref,
61                         char *content_type,
62                         struct CtdlMessage *compare,
63                         void (*CallBack) (long msgnum) );
64 int CtdlDeleteMessages(char *, long, char *);
65 void CtdlWriteObject(char *, char *, char *, struct usersupp *,
66                         int, int, unsigned int);
67 struct CtdlMessage *CtdlFetchMessage(long msgnum);
68 void CtdlFreeMessage(struct CtdlMessage *msg);
69 void serialize_message(struct ser_ret *, struct CtdlMessage *);
70 int is_valid_message(struct CtdlMessage *);
71 int ReplicationChecks(struct CtdlMessage *);
72 int CtdlSaveMsgPointerInRoom(char *roomname, long msgid, int flags);
73 char *CtdlReadMessageBody(char *terminator, size_t maxlen);