-- Copyright (C) 1981, 1984, 1985 by Xerox Corporation. All rights reserved. -- ReturnDefs.mesa, Transport Mechanism Mail Server - DEFS for Returning Mail -- -- HGM, 15-Sep-85 3:55:24 -- Andrew Birrell 9-Jan-81 15:05:17 -- DIRECTORY BodyDefs USING [ItemLength, RName, Timestamp], HeapDefs USING [ObjectNumber, ReaderHandle, WriterHandle], SendDefs USING [Handle]; 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 [SendDefs.Handle, LONG POINTER, CARDINAL], sendBlockData: SendDefs.Handle]; -- 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.