3 #define aide_message(text) quickie_message("Citadel",NULL,AIDEROOM,text,0,NULL)
14 * Possible return codes from CtdlOutputMsg()
24 * Values of "headers_only" when calling message output routines
26 #define HEADERS_ALL 0 /* Headers and body */
27 #define HEADERS_ONLY 1 /* Headers only */
28 #define HEADERS_NONE 2 /* Body only */
29 #define HEADERS_FAST 3 /* Headers only with no MIME info */
33 int is_ma; /* Set to 1 if we are using this stuff */
34 int freeze; /* Freeze the replacement chain because we're
35 * digging through a subsection */
36 int did_print; /* One alternative has been displayed */
37 char chosen_part[128]; /* Which part of a m/a did we choose? */
38 int use_fo_hooks; /* Use fixed output hooks */
42 struct repl { /* Info for replication checking */
43 char exclusive_id[SIZ];
48 /* Data structure returned by validate_recipients() */
57 char recp_internet[SIZ];
60 char display_recp[SIZ];
64 * This is a list of "harvested" email addresses that we might want to
65 * stick into someone's address book. But we defer this operaiton so
66 * it can be done asynchronously.
68 struct addresses_to_be_filed {
69 struct addresses_to_be_filed *next;
71 char *collected_addresses;
74 extern struct addresses_to_be_filed *atbf;
76 int alias (char *name);
78 void cmd_msgs (char *cmdbuf);
79 void cmd_isme (char *cmdbuf);
80 void help_subst (char *strbuf, char *source, char *dest);
81 void do_help_subst (char *buffer);
82 void memfmout (char *mptr, char subst, char *nl);
83 void output_mime_parts(char *);
84 void cmd_msg0 (char *cmdbuf);
85 void cmd_msg2 (char *cmdbuf);
86 void cmd_msg3 (char *cmdbuf);
87 void cmd_msg4 (char *cmdbuf);
88 void cmd_msgp (char *cmdbuf);
89 void cmd_opna (char *cmdbuf);
90 long send_message (struct CtdlMessage *);
91 void loadtroom (void);
92 long CtdlSubmitMsg(struct CtdlMessage *, struct recptypes *, char *);
93 void quickie_message (char *, char *, char *, char *, int, char *);
94 void cmd_ent0 (char *entargs);
95 void cmd_dele (char *delstr);
96 void cmd_move (char *args);
97 void GetMetaData(struct MetaData *, long);
98 void PutMetaData(struct MetaData *);
99 void AdjRefCount(long, int);
100 void simple_listing(long, void *);
101 int CtdlMsgCmp(struct CtdlMessage *msg, struct CtdlMessage *template);
102 int CtdlForEachMessage(int mode, long ref,
104 struct CtdlMessage *compare,
105 void (*CallBack) (long, void *),
107 int CtdlDeleteMessages(char *, long, char *, int);
108 void CtdlWriteObject(char *, char *, char *, struct ctdluser *,
109 int, int, unsigned int);
110 struct CtdlMessage *CtdlFetchMessage(long msgnum, int with_body);
111 void CtdlFreeMessage(struct CtdlMessage *msg);
112 void serialize_message(struct ser_ret *, struct CtdlMessage *);
113 int is_valid_message(struct CtdlMessage *);
114 void ReplicationChecks(struct CtdlMessage *);
115 int CtdlSaveMsgPointersInRoom(char *roomname, long newmsgidlist[], int num_newmsgs,
116 int do_repl_check, struct CtdlMessage *supplied_msg);
117 int CtdlSaveMsgPointerInRoom(char *roomname, long msgid, int do_repl_check, struct CtdlMessage *msg);
118 char *CtdlReadMessageBody(char *terminator, size_t maxlen, char *exist, int crlf);
119 char *CtdlGetSysConfig(char *sysconfname);
120 void CtdlPutSysConfig(char *sysconfname, char *sysconfdata);
121 int CtdlOutputMsg(long msg_num, /* message number (local) to fetch */
122 int mode, /* how would you like that message? */
123 int headers_only, /* eschew the message body? */
124 int do_proto, /* do Citadel protocol responses? */
125 int crlf, /* 0=LF, 1=CRLF */
126 char *section /* output a message/rfc822 section */
128 int CtdlOutputPreLoadedMsg(struct CtdlMessage *,
129 int mode, /* how would you like that message? */
130 int headers_only, /* eschew the message body? */
131 int do_proto, /* do Citadel protocol responses? */
132 int crlf /* 0=LF, 1=CRLF */
134 int CtdlCopyMsgsToRoom(long *msgnum, int num_msgs, char *dest);
135 int CtdlCopyMsgToRoom(long msgnum, char *dest);
136 int CtdlDoIHavePermissionToDeleteMessagesFromThisRoom(void);
137 int CtdlDoIHavePermissionToPostInThisRoom(char *errmsgbuf, size_t n);
140 /* values for which_set */
145 void CtdlSetSeen(long *target_msgnums, int num_target_msgnums,
146 int target_setting, int which_set,
147 struct ctdluser *which_user, struct ctdlroom *which_room);
148 void CtdlGetSeen(char *buf, int which_set);
150 struct recptypes *validate_recipients(char *recipients);
151 struct CtdlMessage *CtdlMakeMessage(
152 struct ctdluser *author, /* author's user structure */
153 char *recipient, /* NULL if it's not mail */
154 char *recp_cc, /* NULL if it's not mail */
155 char *room, /* room where it's going */
156 int type, /* see MES_ types in header file */
157 int format_type, /* variformat, plain text, MIME... */
158 char *fake_name, /* who we're masquerading as */
159 char *subject, /* Subject (optional) */
160 char *supplied_euid, /* ...or NULL if this is irrelevant */
161 char *preformatted_text /* ...or NULL to read text from client */
163 int CtdlCheckInternetMailPermission(struct ctdluser *who);
164 int CtdlIsMe(char *addr, int addr_buf_len);