<<>> <> <> <> <> <> <<>> DIRECTORY IO USING [STREAM], MSBasics USING [BodyPartInfo, CHName, Envelope], Rope USING [ROPE]; MSRetrieve: CEDAR DEFINITIONS ~ BEGIN STREAM: TYPE ~ IO.STREAM; ROPE: TYPE ~ Rope.ROPE; <> Handle: TYPE = REF; <> ChangeReportProc: TYPE = PROC [state: MboxState, handle: Handle]; Create: PROC [pollingInterval: CARDINAL, reportChanges: ChangeReportProc ¬ NIL] RETURNS [Handle]; <> Close: PROC [handle: Handle]; <> <> NewUser: PROC [handle: Handle, user: MSBasics.CHName, password: ROPE]; <> MboxState: TYPE = { unknown, badName, badPwd, cantAuth, userOK, allDown, someEmpty, allEmpty, notEmpty }; <> MailboxState: PROC [handle: Handle] RETURNS [state: MboxState]; <> <> <> <> <<"NextBodyPart" may be called to access in sequence the body parts which are the contents of the message. Note that the BodyPartInfo contains the body part type and length in bytes. The message body is followed by a body part of type "lastBodyPart". Within a body part, an IO.STREAM may be used to access the data of the body part. EndOf[] will be true at the end of the body part. Calling NextBodyPart closes any IO.STREAM on a current body part (even if the entire body part has not been read yet) and moves on to the next body part.>> <> <> FailureReason: TYPE = ATOM; <> <<$RPC -- communication problems>> <<$Authentication -- bad credentials or authentication service unavailable>> <<$Service -- mail service is busy, unavailable, etc.>> <<$Protocol -- protocol used improperly, undoubtedly due to an implemementation bug in MSRetrieveImpl>> Failed: ERROR [why: FailureReason, text: ROPE]; <> ServerState: TYPE = { unknown, empty, notEmpty }; NextServer: PROC [handle: Handle] RETURNS [noMore: BOOLEAN, state: ServerState]; <> ServerName: PROC [handle: Handle] RETURNS [serverName: MSBasics.CHName]; <> NextMessage: PROC [handle: Handle] RETURNS [msgExists, previouslyRead: BOOLEAN]; <> GetMessageEnvelope: PROC [handle: Handle] RETURNS [envelope: MSBasics.Envelope]; <> NextBodyPart: PROC [handle: Handle] RETURNS [MSBasics.BodyPartInfo]; <> GetBodyPart: PROC [handle: Handle] RETURNS [STREAM]; <> <<>> GetBodyPartAsRope: PROC [handle: Handle] RETURNS [ROPE]; <> <<>> GetBodyPartViaCallback: PROC [handle: Handle, proc: GetBodyPartCallback]; <> GetBodyPartCallback: TYPE ~ PROC [s: STREAM, checkAbort: PROC RETURNS [BOOL]] RETURNS [abort: BOOL]; <> <<"s" is the STREAM from which you can read the item.>> <> <> MarkMessage: PROC [handle: Handle]; <> DeleteMessage: PROC [handle: Handle]; <> Accept: PROC [handle: Handle]; <> END.