-- Transport Mechanism Mail Server - DEFS for Returning Mail -- -- also used for support of MTP -- -- [Juniper]<DMS>MS>ReturnDefs.mesa -- Andrew Birrell 9-Jan-81 15:05:17 -- DIRECTORY BodyDefs: FROM "BodyDefs" USING[ ItemLength, RName, Timestamp ], HeapDefs: FROM "HeapDefs" USING[ ObjectNumber, ReaderHandle, WriterHandle ]; ReturnDefs: DEFINITIONS = BEGIN ParseBody: PROC[reader: HeapDefs.ReaderHandle, stamp: POINTER TO BodyDefs.Timestamp ← NIL, sender: BodyDefs.RName ← NIL, returnTo: BodyDefs.RName ← NIL ] RETURNS[ BodyDefs.ItemLength ]; -- reader should initially be at start of body; -- Reads items from body, and leaves reader positioned -- at start of text of body, if text exists. -- Returns length of text, or 0 -- CopyItem: PROC[reader: HeapDefs.ReaderHandle, length: BodyDefs.ItemLength, sendBlock: PROCEDURE[UNSPECIFIED,POINTER,CARDINAL], sendBlockData: UNSPECIFIED ]; -- Copies specified number of bytes from reader by -- calling sendBlock with sendBlockData, buffer address, -- and number of bytes. -- BadRecipients: PROC[list: HeapDefs.WriterHandle, body: HeapDefs.ObjectNumber]; -- Recipients given by original sender were bad: tell "ReturnTo" name -- specified in message body properties -- BadGroup: PROC[list: HeapDefs.WriterHandle, body: HeapDefs.ObjectNumber, group: BodyDefs.RName]; -- Recipients in group were bad: tell owner -- RejectedByMTP: PROC[list: HeapDefs.WriterHandle, body: HeapDefs.ObjectNumber, server: STRING, text: STRING]; -- Recipients were rejected by MTP server: tell "ReturnTo" name -- specified in message body properties -- LongTerm: PROC[list: HeapDefs.WriterHandle, body: HeapDefs.ObjectNumber]; -- Long-term timeout: tell "ReturnTo" name specified in message body -- properties -- END.