BlackCherryInternal.mesa
Copyright Ó 1991, 1992 by Xerox Corporation. All rights reserved.
Willie-sue, July 20, 1993 4:06 pm PDT
DIRECTORY
BasicTime USING [GMT, nullGMT],
BlackCherry,
BlackCherrySidedoor,
IO USING [ STREAM ],
MailBasics USING [RNameList],
MailRetrieve USING [ Handle, MBXState ],
MailUtils USING [ Credentials ],
Rope USING [ ROPE ];
BlackCherryInternal: CEDAR DEFINITIONS ~ { OPEN BlackCherrySidedoor;
ROPE: TYPE ~ Rope.ROPE;
STREAM: TYPE ~ IO.STREAM;
MsgHandle: TYPE ~ BlackCherry.MsgHandle;
MsgSetInfo: TYPE ~ BlackCherry.MsgSetInfo;
MsiData: TYPE ~ REF MsiDataRec;
MsiDataRec: TYPE ~ RECORD[
allowNewMail, okToFlushMail, useFromFieldInTOC, checkStateReporting: BOOL ¬ FALSE,
timeOfLastFlush: BasicTime.GMT ¬ BasicTime.nullGMT
];
RetrieveHandle: TYPE ~ REF RetrieveHandleRec;
RetrieveHandleRec: TYPE ~ RECORD[
credentials: LIST OF MailUtils.Credentials,
mHandle: MailRetrieve.Handle,
lastStateReported: MailRetrieve.MBXState ¬ unknown,
msiData: MsiData  -- backpointer
];
userRNameList: READONLY MailBasics.RNameList;
simpleUserNameList: READONLY LIST OF ROPE;
credentials: READONLY LIST OF MailUtils.Credentials;
customProcs: BlackCherry.CustomProcs;
Exported operations (BlackCherryImpl)
CloseAndOpen: PROC[msInfo: MsgSetInfo];
SetFileLength: PROC [msInfo: MsgSetInfo, len: INT];
StrmFlush: PROC[stream: STREAM, msiData: MsiData];
ForceStateOff: PROC;
MakeAndSetNewHandle: PROC [ credentials: LIST OF MailUtils.Credentials ¬ NIL,
msiData: MsiData, pollingInterval: INT ¬ 300 ];
CloseRetrieveHandle: PROC;
GetRetrieveHandle: PROC RETURNS[RetrieveHandle];
Exported operations (BlackCherryMailImpl)
UpdateUser: PROC[msiData: MsiData];
IsCurrentUser: PROC [ sender: ROPE ] RETURNS [ yes: BOOL ¬ TRUE ];
ReadAnyNewMail: PROC [msInfo: MsgSetInfo];
DoCopyOrExpunge: PROC[msInfo: MsgSetInfo, logName: ROPE, altFileData: BlackCherry.BCFileData, sortem: BOOL]
RETURNS[newList, newLast: MsgHandle ¬ NIL];
DoAppendMsg: PROC[msInfo: MsgSetInfo, msgID, plainText, formatting: ROPE];
WriteMsgs: PUBLIC PROC [msInfo: MsgSetInfo, mailStrm: STREAM]
RETURNS [ numMsgs: INT ¬ 0, newList, newLast: MsgHandle ¬ NIL ];
Writes msgs defined by msInfo onto mailStrm
WriteTOC: PROC [ reader, writer: STREAM, numMsgs, segmentStart: INT,
msgH: MsgHandle, useFromFieldInTOC: BOOL ]
RETURNS [ last: MsgHandle ¬ NIL ];
ReadBWFile: PROC [msInfo: MsgSetInfo]
RETURNS [numUndel, totalMsgs: INT ¬ 0, ok: BOOL ¬ FALSE];
AppendMsgs: PROC [msInfo: MsgSetInfo, first: MsgHandle, last: MsgHandle];
Exported operations (BlackCherrySidedoorlImpl)
BCMailLog: PROC[fileData: BlackCherry.BCFileData, strmProc: MsgFromStreamProc, ropeProc: MsgFromRopesProc]
RETURNS[ok: BOOL ¬ FALSE];
}.