<> <> <> <> DIRECTORY DFOperations USING [InfoClass, InteractionProc], DFUtilities USING [Date], FS USING [ErrorDesc], IO USING [STREAM], Rope USING [ROPE]; DFInternal: CEDAR DEFINITIONS = BEGIN OPEN DFOperations, DFUtilities, IO, Rope; <> Client: TYPE = REF ClientDescriptor; ClientDescriptor: TYPE = RECORD [ proc: InteractionProc, data: REF ANY, -- to be passed as 'clientData' parameter of 'proc' log: STREAM ]; SimpleInteraction: PROC [client: Client, interaction: REF ANY]; <> YesOrNo: PROC [client: Client, message: ROPE, default: BOOL, blunder: BOOL _ FALSE] RETURNS [BOOL]; <> DoInteraction: PROC [client: Client, interaction: REF ANY] RETURNS [response: REF ANY]; <> CheckAbort: PROC [client: Client]; <> DoAbort: PROC [log: STREAM, message: ROPE _ NIL, proc: InteractionProc _ NIL, clientData: REF ANY _ NIL]; <> AbortDF: ERROR; <> DefaultInteractionProc: InteractionProc; <> <> LocalFileInfo: TYPE = RECORD [ name: ROPE, attachedTo: ROPE, date: Date _ [], keep: INT _ -1 ]; RemoteFileInfo: TYPE = RECORD [ name: ROPE, date: Date _ [] ]; <<>> GetFileInfo: PROC [info: REF ANY, notFoundOK: BOOL _ FALSE, remoteCheck: BOOL _ FALSE, client: Client _ NIL, errorLevel: InfoClass _ $error]; <<'info' must be either REF LocalFileInfo or REF RemoteFileInfo.>> <> <> <> LocalFile: PROC [file: ROPE] RETURNS [BOOL]; ShortName: PROC [file: ROPE, keepVersion: BOOL _ FALSE] RETURNS [ROPE]; <> RetryFSOperation: PROC [error: FS.ErrorDesc, client: Client] RETURNS [retry: BOOL]; <> ReportFSError: PROC [error: FS.ErrorDesc, info: REF ANY, client: Client, errorLevel: InfoClass _ $error]; <<'info' is either REF LocalInfo or REF RemoteInfo. SimpleInteraction is invoked with an InfoInteraction at the specified errorLevel. Then, if errorLevel = $abort, DoAbort[client.log] is invoked, causing AbortDF to be raised.>> <<>> END.