DIRECTORY BasicTime USING [GMT], GVBasics USING [RName], PeanutParse USING [ParseStatus], Rope USING [ROPE], ViewerClasses USING [Viewer]; PeanutRetrieve: CEDAR DEFINITIONS = BEGIN RName: TYPE = GVBasics.RName; ROPE: TYPE = Rope.ROPE; MsgRec: TYPE = REF MessageRecObject; MessageRecObject: TYPE = RECORD[ fullText: ROPE, -- The text for sending, or what came from Grapevine dateCode: BasicTime.GMT, -- date in msg gvSender: RName, -- The sender as given by Grapevine gvID: ROPE, -- Rope.Cat[gvSender, " $ ", gvTimeStamp] categories: LIST OF ROPE, -- categories & keywords, from prefix date: ROPE, -- The date. inMsgSender: ROPE, -- non-NIL iff msg contains sender: field from: ROPE, -- The From: field (may be freeform) to: LIST OF RName, -- The To: field subject: ROPE, -- The subject. inReplyTo: ROPE, -- The In-Reply-To: field. cc: LIST OF RName, -- The cc: field replyTo: ROPE, -- the ReplyTo: field (may be freeform) unrecognized: LIST OF ROPE, -- Other header items. hasBeenRead: BOOL_ FALSE, -- has this message been displayed or not headersText: ROPE, -- Just the headers bodyText: ROPE -- The body of the message without header lines. ] ; OpenConnection: PROC[user: GVBasics.RName]; CloseConnection: PROC; NewUser: PROC[user: GVBasics.RName]; GetNewMsgs: PROC [open: BOOL _ TRUE]; FindMailViewer: PROC[name: ROPE] RETURNS[ViewerClasses.Viewer]; GetMailViewer: PROC [name: ROPE] RETURNS[ViewerClasses.Viewer]; CopyMessages: PROC [to: ROPE, delete: BOOL]; ParseMsgIntoFields: PROC[msg: MsgRec] RETURNS[s: PeanutParse.ParseStatus, sPos, mPos: INT]; END. 6File: PeanutRetrieve.mesa March 4, 1983 10:54 am Edited by Doug Wyatt, November 17, 1983 3:38 pm (for Cedar 5.0) The following items are parsed out of the fullText: *********************************************************** Operations for retrieving messages [PeanutRetrieveImpl] Establish a connection for this user. Establish a new user on this connection. Returns NIL if no viewer found Creates a new viewer if none already there *********************************************************** Operations for parsing new messages [PeanutRetrieveParseImpl] Ê͘Jšœ2™2J™?J˜šÏk ˜ Jšœ œœ˜Jšœ œ ˜Jšœ œ˜ Jšœœœ˜Jšœœ ˜J˜—Jšœœ œ˜#J˜Jš˜J˜Jšœœ˜Jšœœœ˜Jšœœœ˜$šœœœ˜ Jšœ œÏc4˜FJšœœž˜'Jšœž#˜6Jšœœž)˜9Jšœ œœœž%˜?J˜Jšœ3™3Jšœœž ˜Jšœ œž)˜=Jšœœž%˜5Jšœœœ ž˜%Jšœ œž˜!Jšœ œž˜-Jšœœœ ž˜$Jšœ œž(˜:Jšœœœœž˜3Jšœ œœž)˜DJšœ œž˜(Jšœ œž0˜BJ˜J˜—J˜Jšœ;™;Jšœ7™7J˜šÏnœœ˜+Jšœ%™%J˜—JšŸœœ˜J˜šŸœœ˜$Jšœ)™)J˜—JšŸ œœœœ˜%J˜šŸœœœœ˜?Jšœ™—J˜šŸ œœœœ˜?J™*—J˜JšŸ œœœ œ˜,J˜Jšœ;™;Jšœ=™=J˜šŸœœ ˜%Jšœ)œ˜5J˜—Jšœ˜J˜J˜—…—R U