DIRECTORY BasicTime USING[ GMT ], GVBasics USING[ GVString, ItemHeader, Password, RName ], GVProtocol USING[ Handle ], GVRetrieve USING[ MBXState, ServerState, ServerType ], PupDefs USING[ PupAddress ], PupTypes USING[ Pair ], Rope USING[ ROPE ]; GVRetrieveInternal: CEDAR DEFINITIONS = BEGIN MBXData: TYPE = RECORD[ next: MBXPtr, type: GVRetrieve.ServerType, state: GVRetrieve.ServerState, addrState: { unknown, known, bad }, replyWanted: BOOLEAN, addr: PupDefs.PupAddress, name: GVBasics.RName ]; MBXPtr: TYPE = REF MBXData; noMBX: MBXPtr = NIL; Handle: TYPE = REF HandleObject; HandleObject: TYPE = MONITORED RECORD[ MBXChain: MBXPtr, mbxKnown: BOOLEAN, -- whether user's mailbox sites are known notEmptyMBXCount: CARDINAL, unknownMBXCount: CARDINAL, registry: GVRetrieve.ServerType, state: -- position in legal call sequences { -- GV states beforeMBX, beforeTOCr, beforeBody, inBody, beforeTOCw, afterMessage, afterMBX, end, beginning, message, lastItem, block, lastBlock, lastMessage }, spareByte: BOOLEAN, -- GV padding, or MTP odd-byte mess spareByteValue: CHARACTER, -- for MTP odd-byte mess header: GVBasics.ItemHeader, -- header of current item; length field is decremented as we go itemLength: INT, -- total length of current item (for IO.GetLength) currentMBX: MBXPtr, -- mailbox being read messages: CARDINAL, -- number of messages in the mailbox currentStr: GVProtocol.Handle, -- stream to mailbox being read mbxState: GVRetrieve.MBXState, polling: BOOLEAN, pollWanted: BOOLEAN, newPollWanted: BOOLEAN, pollReplying: BOOLEAN, mbxStateChange: CONDITION, pollCond: CONDITION, pollID: PupTypes.Pair, sendPoll: PROCESS, pollStarted: BasicTime.GMT, -- real time when poll last started interval: INT, -- polling interval, in seconds changes: PROCEDURE[GVRetrieve.MBXState], userName: GVBasics.RName, userPwd: Rope.ROPE, userKey: GVBasics.Password ]; SendPollProcess: PROC[handle: Handle]; NoteChangedMBX: PROC[handle: Handle, mbx: MBXPtr, new: GVRetrieve.ServerState]; SetMBXState: PROC[handle: Handle, state: GVRetrieve.MBXState]; FindRegistryAndMailboxes: PROC[handle: Handle]; FindAddress: PROC[handle: Handle, mbx: MBXPtr]; ServerAddress: PROC[handle: Handle] RETURNS[ PupDefs.PupAddress]; GVClose: PROC[ handle: Handle ]; END. φGVRetrieveInternal.mesa: Private DEFS for mail retrieval Copyright c 1985 by Xerox Corporation. All rights reserved. Andrew Birrell June 6, 1983 10:59 am The client's mailboxes are represented by a chain: The overall state of mail is represented by a HandleObject list of the user's mailboxes user's registry type Current state of mail reading: MTP states State of mailbox polling: Global information supplied by the client: Interface to mailbox polling: exported by RetrievePoll for forking to changes handle.mbxState appropriately to reflect change in the known state of this mailbox changes handle.mbxState to given value. Interface to obtain new info about user: exported by RetrieveInit determines registry type and mailbox locations attempts to find mailboxes address (which must have been unknown) may signal Failed[communicationError] or Failed[noSuchServer] Access to individual mailbox Close any stream created for this mailbox without deleting messages Does not complain if there is no stream. Κ‘˜codešœ8™8Kšœ Οmœ1™K˜Kšœ™K˜Kšœ žœ˜Kšœ žœ˜Kšœžœ˜Kšœžœ˜Kšœž œ˜Kšœ ž œ˜Kšœ˜Kšœ žœ˜KšœžœŸ#˜?K˜Kšœ*™*Kšœ žœŸ˜.Kšœ ž œ˜(K˜Kšœžœ˜K˜K˜K˜K˜K˜—Kšœ6™6K˜šΟnœžœ˜&Kšœ™K˜—š œžœ˜1K˜Kšœ>™>Kšœ™K˜—š  œžœ-˜>Kšœ'™'K˜K˜—KšœA™AK˜š œžœ˜/Kšœ.™.K˜—š  œžœ˜/KšœA™AK˜—š  œžœžœ˜AKšœ=™=K˜K˜K˜K˜—Kšœ™K˜š œžœ˜ KšœC™CKšœ(™(K˜—Kšžœ˜K˜—…—δ{