-- file: LaurelSendDefs.mesa
-- last edited: Mike Schroeder, April 2, 1981 10:30 AM
-- edited by Brotz, March 7, 1983 10:18 AM

DIRECTORY
Core USING [DMSUser],
exD: FROM "ExceptionDefs" USING [Exception, nil],
vmD: FROM "VirtualMgrDefs" USING [CharIndex];

LaurelSendDefs: DEFINITIONS =

BEGIN

SendErrorType: TYPE =
{cancelCode, dlExpandError, dlSyntaxError, ftpError,
uncertainClosing, cantConnect, badSender, illegalFileExpansion,
illegalRecipient, messageSyntaxError, missingQualification, illegalFromField,
noRecipientsSpecified, unexpectedResponse, noValidRecipients};

SendMode: TYPE = {red, blue};

FromState: TYPE = {needsFrom, needsSender, ok};


ParseForSend: PROCEDURE
[user: Core.DMSUser, expandPublicDLs: BOOLEAN, sendMode: SendMode,
userFeedback: BOOLEAN]
RETURNS [unexpandedPublicDLs: CARDINAL, fromState: FromState, replyTo: BOOLEAN];


GVSend: PROCEDURE [publicDLs: CARDINAL, sendMode: SendMode, fromState: FromState,
replyTo: BOOLEAN, userFeedback: BOOLEAN, formatProc: PROCEDURE,
user: Core.DMSUser];


MTPSend: PROCEDURE [sendMode: SendMode, fromState: FromState, replyTo: BOOLEAN,
userFeedback: BOOLEAN, formatProc: PROCEDURE, user: Core.DMSUser];


DeliverBody: PROCEDURE [user: Core.DMSUser, fromState: FromState,
userFeedback: BOOLEAN, SendBlock: PROCEDURE [POINTER, CARDINAL]];


ReportRejectedRecipients: PUBLIC PROCEDURE [rejected: CARDINAL,
nameList: STRING, nameListFull: BOOLEAN];


ReportDelivery: PUBLIC PROCEDURE [chars, goodOther, totalOther: CARDINAL,
goodList: CARDINAL ← 0, totalList: CARDINAL ← 0];


InitReadChar: PROCEDURE;


ReadChar: PROCEDURE RETURNS [ch: CHARACTER];


GetCharPosition: PUBLIC PROCEDURE RETURNS [vmD.CharIndex];


CancelDelivery: PROCEDURE;


AbortPoint: PROCEDURE;


NoticeUserAbort: PROCEDURE;


AskUser: PROCEDURE [exception: exD.Exception, string: STRING];


RetryThis: PROCEDURE [string: STRING, excep: exD.Exception ← exD.nil]
RETURNS [BOOLEAN];


ReportProgress: PROCEDURE
[exception: exD.Exception, string: STRING, displayCancelMessage: BOOLEAN];


ReportError: PROCEDURE [erc: SendErrorType, msg: STRING, start, end: vmD.CharIndex];


MoveUnderline: PROCEDURE [start, end: vmD.CharIndex];


InsertReplyToField: PROCEDURE [user: Core.DMSUser];


InitializeRecipientList: PROCEDURE;


FlushRecipientList: PROCEDURE;


EnumerateRecipientList: PROCEDURE [space: CARDINAL,
proc: PROCEDURE [s: STRING] RETURNS [BOOLEAN]]
RETURNS [outcome: BOOLEAN];
-- "s" is guarenteed to have at least "space" free characters at the end.
-- "proc" returning TRUE stops the enumeration.
-- "outcome" reports last value returned by "proc".


InsertRecipientInList: PROCEDURE [s: STRING];


GetRecipients: PROCEDURE RETURNS [CARDINAL];


ProtocolType: TYPE = {gv, mtp};


GetSendProtocol: PROCEDURE RETURNS [ProtocolType];


END. -- of LaurelSendDefs --