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() */
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);
81 void cmd_msgs (char *cmdbuf);
82 void cmd_isme (char *cmdbuf);
83 void help_subst (char *strbuf, char *source, char *dest);
84 void do_help_subst (char *buffer);
85 void memfmout (char *mptr, char subst, char *nl);
86 void output_mime_parts(char *);
87 void cmd_msg0 (char *cmdbuf);
88 void cmd_msg2 (char *cmdbuf);
89 void cmd_msg3 (char *cmdbuf);
90 void cmd_msg4 (char *cmdbuf);
91 void cmd_msgp (char *cmdbuf);
92 void cmd_opna (char *cmdbuf);
93 void cmd_dlat (char *cmdbuf);
94 long send_message (struct CtdlMessage *);
95 void loadtroom (void);
96 long CtdlSubmitMsg(struct CtdlMessage *, struct recptypes *, char *);
97 void quickie_message (char *, char *, char *, char *, char *, int, char *);
98 void cmd_ent0 (char *entargs);
99 void cmd_dele (char *delstr);
100 void cmd_move (char *args);
101 void GetMetaData(struct MetaData *, long);
102 void PutMetaData(struct MetaData *);
103 void AdjRefCount(long, int);
104 void TDAP_AdjRefCount(long, int);
105 int TDAP_ProcessAdjRefCountQueue(void);
106 void simple_listing(long, void *);
107 int CtdlMsgCmp(struct CtdlMessage *msg, struct CtdlMessage *template);
108 int CtdlForEachMessage(int mode,
112 struct CtdlMessage *compare,
113 void (*CallBack) (long, void *),
115 int CtdlDeleteMessages(char *, long *, int, char *);
116 void CtdlWriteObject(char *, char *, char *, struct ctdluser *,
117 int, int, unsigned int);
118 struct CtdlMessage *CtdlFetchMessage(long msgnum, int with_body);
119 void CtdlFreeMessage(struct CtdlMessage *msg);
120 void serialize_message(struct ser_ret *, struct CtdlMessage *);
121 int is_valid_message(struct CtdlMessage *);
122 void ReplicationChecks(struct CtdlMessage *);
123 int CtdlSaveMsgPointersInRoom(char *roomname, long newmsgidlist[], int num_newmsgs,
124 int do_repl_check, struct CtdlMessage *supplied_msg);
125 int CtdlSaveMsgPointerInRoom(char *roomname, long msgid, int do_repl_check, struct CtdlMessage *msg);
126 char *CtdlReadMessageBody(char *terminator, size_t maxlen, char *exist, int crlf);
127 char *CtdlGetSysConfig(char *sysconfname);
128 void CtdlPutSysConfig(char *sysconfname, char *sysconfdata);
129 int CtdlOutputMsg(long msg_num, /* message number (local) to fetch */
130 int mode, /* how would you like that message? */
131 int headers_only, /* eschew the message body? */
132 int do_proto, /* do Citadel protocol responses? */
133 int crlf, /* 0=LF, 1=CRLF */
134 char *section /* output a message/rfc822 section */
136 int CtdlOutputPreLoadedMsg(struct CtdlMessage *,
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 */
142 int CtdlCopyMsgsToRoom(long *msgnum, int num_msgs, char *dest);
143 int CtdlDoIHavePermissionToDeleteMessagesFromThisRoom(void);
144 int CtdlDoIHavePermissionToPostInThisRoom(char *errmsgbuf, size_t n);
147 /* values for which_set */
152 void CtdlSetSeen(long *target_msgnums, int num_target_msgnums,
153 int target_setting, int which_set,
154 struct ctdluser *which_user, struct ctdlroom *which_room);
155 void CtdlGetSeen(char *buf, int which_set);
157 struct recptypes *validate_recipients(char *recipients);
158 struct CtdlMessage *CtdlMakeMessage(
159 struct ctdluser *author, /* author's user structure */
160 char *recipient, /* NULL if it's not mail */
161 char *recp_cc, /* NULL if it's not mail */
162 char *room, /* room where it's going */
163 int type, /* see MES_ types in header file */
164 int format_type, /* variformat, plain text, MIME... */
165 char *fake_name, /* who we're masquerading as */
166 char *subject, /* Subject (optional) */
167 char *supplied_euid, /* ...or NULL if this is irrelevant */
168 char *preformatted_text /* ...or NULL to read text from client */
170 int CtdlCheckInternetMailPermission(struct ctdluser *who);
171 int CtdlIsMe(char *addr, int addr_buf_len);