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];
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];
}.