6 #define aide_message(text, subject) quickie_message("Citadel",NULL,NULL,AIDEROOM,text,0,subject)
20 * Possible return codes from CtdlOutputMsg()
30 * Values of "headers_only" when calling message output routines
32 #define HEADERS_ALL 0 /* Headers and body */
33 #define HEADERS_ONLY 1 /* Headers only */
34 #define HEADERS_NONE 2 /* Body only */
35 #define HEADERS_FAST 3 /* Headers only with no MIME info */
39 int is_ma; /* Set to 1 if we are using this stuff */
40 int freeze; /* Freeze the replacement chain because we're
41 * digging through a subsection */
42 int did_print; /* One alternative has been displayed */
43 char chosen_part[128]; /* Which part of a m/a did we choose? */
44 int chosen_pref; /* Chosen part preference level (lower is better) */
45 int use_fo_hooks; /* Use fixed output hooks */
49 struct repl { /* Info for replication checking */
50 char exclusive_id[SIZ];
55 /* Data structure returned by validate_recipients() */
71 #define RECPTYPES_MAGIC 0xfeeb
74 * This is a list of "harvested" email addresses that we might want to
75 * stick into someone's address book. But we defer this operaiton so
76 * it can be done asynchronously.
78 struct addresses_to_be_filed {
79 struct addresses_to_be_filed *next;
81 char *collected_addresses;
84 extern struct addresses_to_be_filed *atbf;
86 int alias (char *name);
87 void cmd_msgs (char *cmdbuf);
88 void cmd_isme (char *cmdbuf);
89 void help_subst (char *strbuf, char *source, char *dest);
90 void do_help_subst (char *buffer);
91 void memfmout (char *mptr, char subst, char *nl);
92 void output_mime_parts(char *);
93 void cmd_msg0 (char *cmdbuf);
94 void cmd_msg2 (char *cmdbuf);
95 void cmd_msg3 (char *cmdbuf);
96 void cmd_msg4 (char *cmdbuf);
97 void cmd_msgp (char *cmdbuf);
98 void cmd_opna (char *cmdbuf);
99 void cmd_dlat (char *cmdbuf);
100 long send_message (struct CtdlMessage *);
101 void loadtroom (void);
102 long CtdlSubmitMsg(struct CtdlMessage *, struct recptypes *, char *);
103 void quickie_message (char *, char *, char *, char *, char *, int, char *);
104 void cmd_ent0 (char *entargs);
105 void cmd_dele (char *delstr);
106 void cmd_move (char *args);
107 void GetMetaData(struct MetaData *, long);
108 void PutMetaData(struct MetaData *);
109 void AdjRefCount(long, int);
110 void TDAP_AdjRefCount(long, int);
111 int TDAP_ProcessAdjRefCountQueue(void);
112 void simple_listing(long, void *);
113 int CtdlMsgCmp(struct CtdlMessage *msg, struct CtdlMessage *template);
114 int CtdlForEachMessage(int mode,
118 struct CtdlMessage *compare,
119 void (*CallBack) (long, void *),
121 int CtdlDeleteMessages(char *, long *, int, char *);
122 void CtdlWriteObject(char *, char *, char *, struct ctdluser *,
123 int, int, unsigned int);
124 struct CtdlMessage *CtdlFetchMessage(long msgnum, int with_body);
125 void CtdlFreeMessage(struct CtdlMessage *msg);
126 void serialize_message(struct ser_ret *, struct CtdlMessage *);
127 void dump_message(struct CtdlMessage *msg, long Siz);
128 int is_valid_message(struct CtdlMessage *);
129 void ReplicationChecks(struct CtdlMessage *);
130 int CtdlSaveMsgPointersInRoom(char *roomname, long newmsgidlist[], int num_newmsgs,
131 int do_repl_check, struct CtdlMessage *supplied_msg);
132 int CtdlSaveMsgPointerInRoom(char *roomname, long msgid, int do_repl_check, struct CtdlMessage *msg);
133 char *CtdlReadMessageBody(char *terminator, size_t maxlen, char *exist, int crlf, int sock);
134 char *CtdlGetSysConfig(char *sysconfname);
135 void CtdlPutSysConfig(char *sysconfname, char *sysconfdata);
136 int CtdlOutputMsg(long msg_num, /* message number (local) to fetch */
137 int mode, /* how would you like that message? */
138 int headers_only, /* eschew the message body? */
139 int do_proto, /* do Citadel protocol responses? */
140 int crlf, /* 0=LF, 1=CRLF */
141 char *section /* output a message/rfc822 section */
143 int CtdlOutputPreLoadedMsg(struct CtdlMessage *,
144 int mode, /* how would you like that message? */
145 int headers_only, /* eschew the message body? */
146 int do_proto, /* do Citadel protocol responses? */
147 int crlf /* 0=LF, 1=CRLF */
149 int CtdlCopyMsgsToRoom(long *msgnum, int num_msgs, char *dest);
150 int CtdlDoIHavePermissionToDeleteMessagesFromThisRoom(void);
157 int CtdlDoIHavePermissionToPostInThisRoom(char *errmsgbuf, size_t n, int PostPublic);
160 /* values for which_set */
165 void CtdlSetSeen(long *target_msgnums, int num_target_msgnums,
166 int target_setting, int which_set,
167 struct ctdluser *which_user, struct ctdlroom *which_room);
168 void CtdlGetSeen(char *buf, int which_set);
170 struct recptypes *validate_recipients(char *recipients);
171 void free_recipients(struct recptypes *);
173 struct CtdlMessage *CtdlMakeMessage(
174 struct ctdluser *author, /* author's user structure */
175 char *recipient, /* NULL if it's not mail */
176 char *recp_cc, /* NULL if it's not mail */
177 char *room, /* room where it's going */
178 int type, /* see MES_ types in header file */
179 int format_type, /* variformat, plain text, MIME... */
180 char *fake_name, /* who we're masquerading as */
181 char *my_email, /* which of my email addresses to use (empty is ok) */
182 char *subject, /* Subject (optional) */
183 char *supplied_euid, /* ...or NULL if this is irrelevant */
184 char *preformatted_text /* ...or NULL to read text from client */
186 int CtdlCheckInternetMailPermission(struct ctdluser *who);
187 int CtdlIsMe(char *addr, int addr_buf_len);
189 #endif /* MSGBASE_H */