-- File: WalnutSendMail.mesa -- Created by: Haugeland, August 26, 1982 -- Edited by -- Cattell on XXX -- Willie-Sue on June 3, 1983 4:46 pm DIRECTORY GVBasics USING [ItemType, RName], GVSend USING [Handle], IO USING [STREAM], Menus USING [Menu], Rope USING [ROPE], ViewerClasses USING [Viewer], ViewerEvents USING [EventRegistration], ViewerTools USING [TiogaContents]; WalnutSendMail: CEDAR DEFINITIONS = BEGIN ROPE: TYPE = Rope.ROPE; Viewer: TYPE = ViewerClasses.Viewer; RName: TYPE = GVBasics.RName; TiogaContents: TYPE = ViewerTools.TiogaContents; SendMsgRecObject: TYPE = RECORD[ fullText: ROPE, -- text to be sent from: ROPE, -- The From: field to: LIST OF GVBasics.RName, cc: LIST OF ROPE, replyTo: BOOL_ FALSE, -- is this field present numRecipients: INT_ 0, numDLs: INT_ 0, endHeadersPos: INT_ 0 -- for adding Reply-To: field ]; SendingRec: TYPE = REF SendMsgRecObject; SenderInfo: TYPE = REF SenderInfoObject; SenderInfoObject: TYPE = RECORD [senderV: Viewer, replyToResponse: HowToReplyTo_ self, prevMsg: TiogaContents_ NIL, numCharsToDelete: INT_ 0, closeEvent, destroyEvent, editEvent: ViewerEvents.EventRegistration_ NIL, successfullySent, userResponded, confirmed: BOOL_ FALSE, aborted: BOOL_ FALSE, validateFlag: BOOL_ TRUE, sendHandle: GVSend.Handle_ NIL]; maxWithNoReplyTo: INT = 20; HowToReplyTo: TYPE = {self, all, cancel}; SendParseStatus: PUBLIC TYPE = {ok, includesPublicDL, includesPrivateDL, fieldNotAllowed, syntaxError}; -- globals that used to be in WalnutWindow userRName: ROPE; simpleUserName: ROPE; needToAuthenticate: BOOL; replyToSelf: BOOL; sendMenu, sendingMenu, blankMenu, confirmMenu, replyToMenu: Menus.Menu; defaultRegistry: ROPE; arpaGatewayHosts: LIST OF ROPE; TiogaCTRL: GVBasics.ItemType; -- *********************************************************** -- Sending messages & dealing with sender viewers [WalnutSendCommonImpl] SendMsg: PROC[senderV: ViewerClasses.Viewer, doClose: BOOL_ FALSE] RETURNS[sendOk: BOOL]; -- is given a container set up for sending; does the sending BuildSendViewer: PROC [paint, iconic: BOOL, who: Viewer_ NIL] RETURNS[senderV: Viewer]; -- builds sending viewer AnswerMsg: PROC[msgHeaders: ROPE, who: Viewer_ NIL] RETURNS [v: Viewer]; ForwardMsg: PROC[oldMsg: ViewerTools.TiogaContents, who: Viewer_ NIL] RETURNS [v: Viewer]; NewMsgFormInViewer: PROC[senderV: Viewer, form: ROPE]; -- fills in senderV with a new Form WalnutSendProc: PROC[fromExec: BOOL]; -- create a viewer for sending msgs RegisterReporter: PROC[strm: IO.STREAM]; -- allows Walnut to have WalnutSend use its reporting procedure UnregisterReporter: PROC[strm: IO.STREAM]; -- ******************************************************** TiogaTextFromStrm: PROC[strm: IO.STREAM, startPos: INT_ 0, len: INT_ LAST[INT]] RETURNS[contents: TiogaContents]; -- returns NIL IF EndOfStream encountered during read InsertIntoViewer: PROC[v: Viewer, what: ROPE, where: INT]; DeleteChars: PROC[v: Viewer, num: INT]; SenderReport: PROC[msg: ROPE]; CheckForAbortSend: PROC[senderInfo: SenderInfo] RETURNS[BOOL]; Confirmation: PROC[senderInfo: SenderInfo] RETURNS [BOOL]; ReplyToResponse: PROC[senderInfo: SenderInfo] RETURNS [HowToReplyTo]; END.