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