1 /* BEGIN INCLUDE FILE ... mlsys_message.incl.pl1 */
  2 
  3 
  4 /****^  HISTORY COMMENTS:
  5   1) change(85-12-19,Herbst), approve(86-03-25,MCR7367),
  6      audit(86-04-28,Margolin), install(86-05-22,MR12.0-1059):
  7      Added seen switch to message.
  8                                                    END HISTORY COMMENTS */
  9 
 10 
 11 /* Created:  June 1983 by G. Palter */
 12 
 13 /* Definition of a message as used by the Multics Mail System */
 14 
 15 dcl  1 message aligned based (message_ptr),
 16        2 version character (8) unaligned,
 17        2 reserved bit (144),                                /* for exclusive use of the mail system */
 18        2 n_reply_references fixed binary,                   /* # of messages for which this is a reply */
 19        2 n_user_fields fixed binary,                        /* # of non-standard header fields in this message */
 20        2 n_redistributions fixed binary,                    /* # of times this message has been forwarded */
 21        2 n_body_sections fixed binary,                      /* # of sections in the body */
 22        2 flags,
 23          3 interactive bit (1) unaligned,                   /* ON => this is an interactive message */
 24          3 can_be_deleted bit (1) unaligned,                /* ON => the user can delete this message if desired */
 25          3 marked_for_deletion bit (1) unaligned,           /* ON => message will be deleted when mailbox is closed */
 26          3 must_be_acknowledged bit (1) unaligned,          /* ON => an ACK should be generated when message is read */
 27          3 seen bit (1) unaligned,                          /* ON => user has printed message at least once */
 28          3 reserved bit (31) unaligned,                     /* for use by the mail system */
 29        2 pad bit (36),
 30        2 envelope like message_envelope,                    /* who/when/how the message was mailed & delivered */
 31        2 header,
 32          3 message_id bit (72),                             /* ID of this message (same value for all copies) */
 33          3 access_class bit (72),                           /* AIM access class of this message */
 34          3 date_time_created fixed binary (71),             /* date/time this message was composed */
 35          3 from pointer,                                    /* -> address list of author(s) of the message */
 36          3 reply_to pointer,                                /* -> address list of recipients for reply (if not authors) */
 37          3 to pointer,                                      /* -> address list of primary recipients */
 38          3 cc pointer,                                      /* -> address list of secondary recipients */
 39          3 bcc pointer,                                     /* -> address list of blind recipients */
 40          3 subject like message_text_field,                 /* subject of the message */
 41          3 reply_references pointer,                        /* -> list of messages for which this message is a reply */
 42          3 user_fields_list pointer,                        /* -> list of user-defined fields in this message */
 43        2 redistributions_list pointer,                      /* -> redistributions list for this message */
 44        2 body,
 45          3 total_lines fixed binary (21),                   /* total # of lines in the body or -1 if indeterminate */
 46          3 pad bit (36),
 47          3 body_sections (message_n_body_sections refer (message.n_body_sections)) like message_body_section;
 48 
 49 dcl  MESSAGE_VERSION_2 character (8) static options (constant) initial ("mlsmsg02");
 50 
 51 dcl  message_subject character (message.header.subject.text_lth) unaligned based (message.header.subject.text_ptr);
 52 
 53 dcl  message_ptr pointer;
 54 
 55 dcl (message_n_body_sections, message_trace_n_relays, message_n_redistributions, message_n_user_fields,
 56      message_references_list_n_references)
 57           fixed binary;                                     /* for exclusive use of the mail system */
 58 %page;
 59 /* Definition of a message envelope: describes when, by whom, and by what route the message was mailed */
 60 
 61 dcl  1 message_envelope aligned based (message_envelope_ptr),
 62        2 date_time_mailed fixed binary (71),                /* date/time this message was entered into the mail system */
 63        2 sender pointer,                                    /* -> address of entity that mailed the message */
 64        2 trace pointer,                                     /* -> message_trace describing how it got here */
 65        2 date_time_delivered fixed binary (71),             /* date/time this message was delivered */
 66        2 delivered_by pointer,                              /* -> address of entity that delivered the message */
 67        2 acknowledge_to pointer;                            /* -> address of entity to receive ACK when message is read */
 68 
 69 dcl  message_envelope_ptr pointer;
 70 
 71 
 72 /* Structure used in calls to mail_system_daemon_ entrypoints which manipulate the message envelope */
 73 
 74 dcl  1 message_envelope_parameter aligned based (message_envelope_parameter_ptr),
 75        2 pad pointer,                                       /* forces even word alignment */
 76        2 version character (8) unaligned,
 77        2 envelope like message_envelope;
 78 
 79 dcl  MESSAGE_ENVELOPE_PARAMETER_VERSION_2 character (8) static options (constant) initial ("mlsenv02");
 80 
 81 dcl  message_envelope_parameter_ptr pointer;
 82 
 83 
 84 /* Definition of a message trace: describes the route and each relay operation by which a message was passed through the
 85    networks to reach this recipient */
 86 
 87 dcl  1 message_trace aligned based (message_trace_ptr),
 88        2 version character (8) unaligned,
 89        2 reserved bit (144),                                /* ... exclusively for use by the mail system */
 90        2 implicit_route pointer,                            /* -> an address_route which defines the route it took */
 91        2 pad bit (36),
 92        2 n_relays fixed binary,                             /* # of relay operations required to reach this site */
 93        2 relays (message_trace_n_relays refer (message_trace.n_relays)),
 94          3 date_time_relayed fixed binary (71),             /* ... when this relay operation took place */
 95          3 sending_host character (256) varying,            /* ... the host which relayed the message */
 96          3 receiving_host character (256) varying,          /* ... the host which received it */
 97          3 communications_media character (32) unaligned,   /* ... medium over which relay took place (ARPA, Tymnet) */
 98          3 communications_protocol character (32) unaligned,/* ... low-level protocol used (TCP, X.25) */
 99          3 mail_protocol character (32) unaligned,          /* ... mailer protocol used (SMTP, NBS) */
100          3 relay_id bit (72),                               /* ... unique ID assigned by receiving system or ""b */
101          3 relay_recipient pointer;                         /* ... -> address of recipient as given by sending system */
102 
103 dcl  MESSAGE_TRACE_VERSION_2 character (8) static options (constant) initial ("mlstrc02");
104 
105 dcl  message_trace_ptr pointer;
106 %page;
107 /* Definition of a message's redistributions list */
108 
109 dcl  1 message_redistributions_list aligned based (message.redistributions_list),
110        2 version character (8) unaligned,
111        2 reserved bit (144),                                /* ... exclusively for use by the mail system */
112        2 pad bit (36),
113        2 n_redistributions fixed binary,                    /* # of redistributions */
114        2 redistributions (message_n_redistributions refer (message_redistributions_list.n_redistributions))
115               like message_redistribution;                  /* the redistributions: oldest first */
116 
117 dcl  MESSAGE_REDISTRIBUTIONS_LIST_VERSION_2 character (8) static options (constant) initial ("mlsrl002");
118 
119 
120 /* Definition of a single redistribution (forwarding) of a message */
121 
122 dcl  1 message_redistribution aligned based (message_redistribution_ptr),
123        2 envelope like message_envelope,
124        2 header,
125          3 message_id bit (72),                             /* ID of this redistribution (same for all copies) */
126          3 date_time_created fixed binary (71),             /* date/time when this redistribution was made */
127          3 from pointer,                                    /* -> address list of authors of this redistribution */
128          3 to pointer,                                      /* -> address list of recipients of the redistribution */
129          3 comment like message_text_field;                 /* optional comment associated with the redistribution */
130 
131 dcl  message_redistribution_comment character (message_redistribution.comment.text_lth) unaligned
132           based (message_redistribution.comment.text_ptr);
133 
134 dcl  message_redistribution_ptr pointer;
135 
136 
137 /* Structure used in calls to mail_system_daemon_ entrypoints which manipulate the redistributions of a message */
138 
139 dcl  1 message_redistribution_parameter aligned based (message_redistribution_parameter_ptr),
140        2 pad pointer,                                       /* forces even word alignment */
141        2 version character (8) unaligned,
142        2 redistribution like message_redistribution;
143 
144 dcl MESSAGE_REDISTRIBUTION_PARAMETER_VERSION_2 character (8) static options (constant) initial ("mlsdist2");
145 
146 dcl  message_redistribution_parameter_ptr pointer;
147 %page;
148 /* Definition of the list of user-defined fields in a message */
149 
150 dcl  1 message_user_fields_list aligned based (message.user_fields_list),
151        2 version character (8) unaligned,
152        2 reserved bit (144),                                /* ... exclusively for use by the mail system */
153        2 pad bit (36),
154        2 n_user_fields fixed binary,                        /* # of user-defined fields in the message */
155        2 user_fields (message_n_user_fields refer (message_user_fields_list.n_user_fields))
156               like message_user_field;                      /* the actual user-defined fields */
157 
158 dcl  MESSAGE_USER_FIELDS_LIST_VERSION_2 character (8) static options (constant) initial ("mlsufl02");
159 
160 
161 /* Definition of a user defined message header field */
162 
163 dcl  1 message_user_field aligned based (message_user_field_ptr),
164        2 header,
165          3 field_id bit (36) aligned,                       /* identifies the purpose of this field */
166          3 field_type fixed binary,                         /* type of data contained in this field */
167        2 field_type_variable bit (144);                     /* the actual data (see below) */
168 
169 dcl  message_user_field_ptr pointer;
170 
171 
172 /* Defined types of user defined fields */
173 
174 dcl (MESSAGE_TEXT_USER_FIELD            initial (1),        /* content of the field is a text string */
175      MESSAGE_ADDRESS_LIST_USER_FIELD    initial (2),        /* content of the field is an address list */
176      MESSAGE_DATE_USER_FIELD            initial (3),        /* content of the field is a date/time */
177      MESSAGE_INTEGER_USER_FIELD         initial (4))        /* content of the filed is a fixed binary value */
178           fixed binary static options (constant);
179 
180 
181 /* Structures used to access the data for the different types of user defined fields */
182 
183 dcl  1 message_text_user_field aligned based (message_user_field_ptr),
184        2 header like message_user_field.header,
185        2 text like message_text_field;                      /* the message text */
186 
187 dcl  message_text_user_field_text character (message_text_user_field.text.text_lth) unaligned
188           based (message_text_user_field.text.text_ptr);
189 
190 dcl  1 message_address_list_user_field aligned based (message_user_field_ptr),
191        2 header like message_user_field.header,
192        2 address_list_ptr pointer,                          /* -> the address list */
193        2 pad bit (72);
194 
195 dcl  1 message_date_user_field aligned based (message_user_field_ptr),
196        2 header like message_user_field.header,
197        2 date_time fixed binary (71),                       /* the clock reading */
198        2 pad bit (72);
199 
200 dcl  1 message_integer_user_field aligned based (message_user_field_ptr),
201        2 header like message_user_field.header,
202        2 value fixed binary (35),                           /* the integer value */
203        2 pad bit (108);
204 
205 
206 /* Structure used in calls to mail_system_ entrypoints which manipulate the user-defined fields of a message */
207 
208 dcl  1 message_user_field_parameter aligned based (message_user_field_parameter_ptr),
209        2 pad pointer,                                       /* forces even word alignment */
210        2 version character (8) unaligned,
211        2 user_field like message_user_field;
212 
213 dcl  MESSAGE_USER_FIELD_PARAMETER_VERSION_2 character (8) static options (constant) initial ("mlsudf02");
214 
215 dcl  message_user_field_parameter_ptr pointer;
216 %page;
217 /* Definition of a list of message references used as the value of message header fields (eg: In-Reply-To) */
218 
219 dcl  1 message_references_list aligned based (message_references_list_ptr),
220        2 version character (8) unaligned,
221        2 reserved bit (144),                                /* ... exclusively for use by the mail system */
222        2 pad bit (36),
223        2 n_references fixed binary,                         /* # of references in this list */
224        2 references (message_references_list_n_references refer (message_references_list.n_references))
225               like message_reference;                       /* the references themselves */
226 
227 dcl  MESSAGE_REFERENCES_LIST_VERSION_2 character (8) static options (constant) initial ("mlsref02");
228 
229 dcl  message_references_list_ptr pointer;
230 
231 
232 /* Definition of a reference to another message */
233 
234 dcl  1 message_reference aligned based (message_reference_ptr),
235        2 message_id bit (72),                               /* ID of the other message */
236        2 date_time_created fixed binary (71),               /* date/time the other message was created */
237        2 from pointer,                                      /* -> address list of authors of the other message */
238        2 subject like message_text_field;                   /* subject of the other message */
239 
240 dcl  message_reference_subject character (message_reference.subject.text_lth) unaligned
241           based (message_reference.subject.text_ptr);
242 
243 dcl  message_reference_ptr pointer;
244 
245 
246 /* Structure used in calls to mail_system_daemon_ entrypoints which manipulate message references */
247 
248 dcl  1 message_reference_parameter aligned based (message_reference_parameter_ptr),
249        2 pad pointer,                                       /* forces even word alignment */
250        2 version character (8) unaligned,
251        2 reference like message_reference;
252 
253 dcl  MESSAGE_REFERENCE_PARAMETER_VERSION_2 character (8) static options (constant) initial ("mlsref02");
254 
255 dcl  message_reference_parameter_ptr pointer;
256 
257 
258 /* Definition of a text field in a message (Subject, Comment, or a user defined field) */
259 
260 dcl  1 message_text_field aligned based (message_text_field_ptr),
261        2 text_ptr pointer,                                  /* -> the actual text */
262        2 text_lth fixed binary (21),                        /* length of said text */
263        2 flags,
264          3 multiline_text bit (1) unaligned,                /* ON => the text of this field may span multiple lines;
265                                                                OFF => the text will always be a single line */
266          3 reserved bit (35) unaligned;                     /* for exclusive use of the mail system */
267 
268 dcl  message_text_field_text character (message_text_field.text_lth) unaligned based (message_text_field.text_ptr);
269 
270 dcl  message_text_field_ptr pointer;
271 %page;
272 /* Definition of a section of the body of a message */
273 
274 dcl  1 message_body_section aligned based (message_body_section_ptr),
275        2 header,
276          3 section_type fixed binary,                       /* type of "text" stored in this section */
277          3 section_n_lines fixed binary (21),               /* # of lines in this section or -1 if indeterminate */
278        2 section_type_variable bit (144);                   /* the actual data (see below) */
279 
280 dcl  message_body_section_ptr pointer;
281 
282 
283 /* Defined types of message body sections */
284 
285 dcl (MESSAGE_PREFORMATTED_BODY_SECTION       initial (1),   /* text formatted by the authors/sender */
286      MESSAGE_BIT_STRING_BODY_SECTION         initial (2))   /* arbitrary bit string */
287           fixed binary static options (constant);
288 
289 
290 /* Structures used to access the data for the different types of message body sections */
291 
292 dcl  1 message_preformatted_body_section aligned based (message_body_section_ptr),
293        2 header like message_body_section.header,
294        2 text_ptr pointer,                                  /* -> the text */
295        2 text_lth fixed binary (21),                        /* length of said text in characters */
296        2 reserved bit (36);                                 /* for exclusive use of the mail system */
297 
298 dcl  message_preformatted_body_section_text character (message_preformatted_body_section.text_lth) unaligned
299           based (message_preformatted_body_section.text_ptr);
300 
301 dcl  1 message_bit_string_body_section aligned based (message_body_section_ptr),
302        2 header like message_body_section.header,
303        2 bit_string_ptr pointer,                            /* -> the bit string */
304        2 bit_string_lth fixed binary (24),                  /* length of said bit string in bits (obviously) */
305        2 reserved bit (36);                                 /* for exclusive use of the mail system */
306 
307 dcl  message_bit_string_body_section_bit_string bit (message_bit_string_body_section.bit_string_lth) unaligned
308           based (message_bit_string_body_section.bit_string_ptr);
309 
310 
311 /* Structure used in calls to mail_system_ entrypoints which manipulate the sections of a message's body */
312 
313 dcl  1 message_body_section_parameter aligned based (message_body_section_parameter_ptr),
314        2 pad pointer,                                       /* forces even word alignment */
315        2 version character (8) unaligned,
316        2 section like message_body_section;
317 
318 dcl  MESSAGE_BODY_SECTION_PARAMETER_VERSION_2 character (8) static options (constant) initial ("mlsmbs02");
319 
320 dcl  message_body_section_parameter_ptr pointer;
321 
322 /* END INCLUDE FILE ... mlsys_message.incl.pl1 */