3 #define aide_message(text, subject) quickie_message("Citadel",NULL,NULL,AIDEROOM,text,0,subject)
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() */
68 #define RECPTYPES_MAGIC 0xfeeb
71 * This is a list of "harvested" email addresses that we might want to
72 * stick into someone's address book. But we defer this operaiton so
73 * it can be done asynchronously.
75 struct addresses_to_be_filed {
76 struct addresses_to_be_filed *next;
78 char *collected_addresses;
81 extern struct addresses_to_be_filed *atbf;
83 int alias (char *name);
84 void cmd_msgs (char *cmdbuf);
85 void cmd_isme (char *cmdbuf);
86 void help_subst (char *strbuf, char *source, char *dest);
87 void do_help_subst (char *buffer);
88 void memfmout (char *mptr, char subst, char *nl);
89 void output_mime_parts(char *);
90 void cmd_msg0 (char *cmdbuf);
91 void cmd_msg2 (char *cmdbuf);
92 void cmd_msg3 (char *cmdbuf);
93 void cmd_msg4 (char *cmdbuf);
94 void cmd_msgp (char *cmdbuf);
95 void cmd_opna (char *cmdbuf);
96 void cmd_dlat (char *cmdbuf);
97 long send_message (struct CtdlMessage *);
98 void loadtroom (void);
99 long CtdlSubmitMsg(struct CtdlMessage *, struct recptypes *, char *);
100 void quickie_message (char *, char *, char *, char *, char *, int, char *);
101 void cmd_ent0 (char *entargs);
102 void cmd_dele (char *delstr);
103 void cmd_move (char *args);
104 void GetMetaData(struct MetaData *, long);
105 void PutMetaData(struct MetaData *);
106 void AdjRefCount(long, int);
107 void TDAP_AdjRefCount(long, int);
108 int TDAP_ProcessAdjRefCountQueue(void);
109 void simple_listing(long, void *);
110 int CtdlMsgCmp(struct CtdlMessage *msg, struct CtdlMessage *template);
111 int CtdlForEachMessage(int mode,
115 struct CtdlMessage *compare,
116 void (*CallBack) (long, void *),
118 int CtdlDeleteMessages(char *, long *, int, char *);
119 void CtdlWriteObject(char *, char *, char *, struct ctdluser *,
120 int, int, unsigned int);
121 struct CtdlMessage *CtdlFetchMessage(long msgnum, int with_body);
122 void CtdlFreeMessage(struct CtdlMessage *msg);
123 void serialize_message(struct ser_ret *, struct CtdlMessage *);
124 int is_valid_message(struct CtdlMessage *);
125 void ReplicationChecks(struct CtdlMessage *);
126 int CtdlSaveMsgPointersInRoom(char *roomname, long newmsgidlist[], int num_newmsgs,
127 int do_repl_check, struct CtdlMessage *supplied_msg);
128 int CtdlSaveMsgPointerInRoom(char *roomname, long msgid, int do_repl_check, struct CtdlMessage *msg);
129 char *CtdlReadMessageBody(char *terminator, size_t maxlen, char *exist, int crlf, int sock);
130 char *CtdlGetSysConfig(char *sysconfname);
131 void CtdlPutSysConfig(char *sysconfname, char *sysconfdata);
132 int CtdlOutputMsg(long msg_num, /* message number (local) to fetch */
133 int mode, /* how would you like that message? */
134 int headers_only, /* eschew the message body? */
135 int do_proto, /* do Citadel protocol responses? */
136 int crlf, /* 0=LF, 1=CRLF */
137 char *section /* output a message/rfc822 section */
139 int CtdlOutputPreLoadedMsg(struct CtdlMessage *,
140 int mode, /* how would you like that message? */
141 int headers_only, /* eschew the message body? */
142 int do_proto, /* do Citadel protocol responses? */
143 int crlf /* 0=LF, 1=CRLF */
145 int CtdlCopyMsgsToRoom(long *msgnum, int num_msgs, char *dest);
146 int CtdlDoIHavePermissionToDeleteMessagesFromThisRoom(void);
147 int CtdlDoIHavePermissionToPostInThisRoom(char *errmsgbuf, size_t n);
150 /* values for which_set */
155 void CtdlSetSeen(long *target_msgnums, int num_target_msgnums,
156 int target_setting, int which_set,
157 struct ctdluser *which_user, struct ctdlroom *which_room);
158 void CtdlGetSeen(char *buf, int which_set);
160 struct recptypes *validate_recipients(char *recipients);
161 void free_recipients(struct recptypes *);
163 struct CtdlMessage *CtdlMakeMessage(
164 struct ctdluser *author, /* author's user structure */
165 char *recipient, /* NULL if it's not mail */
166 char *recp_cc, /* NULL if it's not mail */
167 char *room, /* room where it's going */
168 int type, /* see MES_ types in header file */
169 int format_type, /* variformat, plain text, MIME... */
170 char *fake_name, /* who we're masquerading as */
171 char *my_email, /* which of my email addresses to use (empty is ok) */
172 char *subject, /* Subject (optional) */
173 char *supplied_euid, /* ...or NULL if this is irrelevant */
174 char *preformatted_text /* ...or NULL to read text from client */
176 int CtdlCheckInternetMailPermission(struct ctdluser *who);
177 int CtdlIsMe(char *addr, int addr_buf_len);