WalnutNewMail.mesa
Copyright Ó 1984, 1988, 1992 by Xerox Corporation. All rights reserved.
Willie-Sue, February 7, 1989 1:29:35 pm PST
Walnut Mail Reading
DIRECTORY
IO USING [STREAM],
MailRetrieve USING [MBXState],
MailUtils USING [Credentials],
Rope USING [ROPE],
WalnutDefs USING [CheckReportProc, WalnutOpsHandle];
WalnutNewMail: CEDAR DEFINITIONS =
BEGIN
ROPE: TYPE = Rope.ROPE;
EnableMailRetrieval: PROC[
opsHandle: WalnutDefs.WalnutOpsHandle,
registeredUsers: LIST OF MailUtils.Credentials,
reportProc, progressProc: WalnutDefs.CheckReportProc,
getMailLog: PROC[opsHandle: WalnutDefs.WalnutOpsHandle] RETURNS[IO.STREAM],
recordMailInfo: PROC[opsHandle: WalnutDefs.WalnutOpsHandle, logLen: INT, server: ROPE, num: INT] RETURNS[BOOL],
notifyWhenMailRetrieved: PROC[opsHandle: WalnutDefs.WalnutOpsHandle, ok: BOOL, someMail: BOOL] ¬ NIL
];
enables mail retrieval for registeredUsers; if the newMailLog is unavailable, nothing is done - it will be tried again later
DisableMailRetrieval: PROC[opsHandle: WalnutDefs.WalnutOpsHandle];
-- turns off mail retrieval
GetLastMailBoxStatus: PROC[opsHandle: WalnutDefs.WalnutOpsHandle]
RETURNS[mbxState: MailRetrieve.MBXState, status: ROPE];
CheckMailBoxes: PROC[opsHandle: WalnutDefs.WalnutOpsHandle];
goes out to poke mail servers for new mail
END.