DIRECTORY BasicTime USING [GMT], IO USING [STREAM], Rope USING [ROPE]; STP: CEDAR DEFINITIONS = BEGIN ROPE: TYPE = Rope.ROPE; STREAM: TYPE = IO.STREAM; GMT: TYPE = BasicTime.GMT; Handle: TYPE = REF Object; Object: TYPE; Access: TYPE = {read, write}; Completion: TYPE = {ok, error}; Continue: TYPE = {yes, no}; Confirmation: TYPE = {do, skip, abort}; ValidProperties: TYPE = { userName, userPassword, connectName, connectPassword, directory, nameBody, version, createDate, readDate, writeDate, byteSize, type, size, author, eolConversion, account, userAccount, device, serverName}; DesiredProperties: TYPE = PACKED ARRAY ValidProperties OF BOOL _ ALL[FALSE]; CompletionProcType: TYPE = PROC[what: Completion, fileOrError: ROPE]; ConfirmProcType: TYPE = PROC[file: ROPE] RETURNS [answer: Confirmation, localStream: STREAM]; NoteFileProcType: TYPE = PROC [file: ROPE] RETURNS [continue: Continue]; FileInfo: TYPE = REF FileInfoObject; FileInfoObject: TYPE = RECORD [ directory, body, version: ROPE _ NIL, author: ROPE _ NIL, create, read, write: ROPE _ NIL, size: INT _ 0, type: Type _ unknown ]; Type: TYPE = MACHINE DEPENDENT {unknown(0), text, binary}; Create: PROC RETURNS [stp: Handle]; Open: PROC [stp: Handle, host: ROPE] RETURNS [herald: ROPE]; Close: PROC [stp: Handle]; Login: PROC [stp: Handle, name, password: ROPE]; Connect: PROC [stp: Handle, name, password: ROPE]; SetHost: PROC [stp: Handle, host: ROPE]; SetDirectory: PROC [stp: Handle, directory: ROPE]; SetDesiredProperties: PROC [stp: Handle, props: DesiredProperties]; IsOpen: PROC [stp: Handle] RETURNS [yes: BOOL]; GetFileInfo: PROC [stp: Handle] RETURNS [FileInfo]; GetProperty: PROC [stp: Handle, prop: ValidProperties] RETURNS [ROPE]; GetDesiredProperties: PROC [stp: Handle] RETURNS [props: DesiredProperties]; CreateRemoteStream: PROC [ stp: Handle, file: ROPE, access: Access, fileType: Type _ unknown, creation: GMT _ NULL -- use this default iff access = read -- ] RETURNS[stream: STREAM]; NextFileName: PROC [remoteStream: STREAM] RETURNS [file: ROPE]; Delete: PROC [ stp: Handle, name: ROPE, confirm: ConfirmProcType _ NIL, complete: CompletionProcType _ NIL]; Enumerate: PROC [stp: Handle, name: ROPE, proc: NoteFileProcType]; Rename: PROC [stp: Handle, old, new: ROPE]; Retrieve: PROC [ stp: Handle, file: ROPE, confirm: ConfirmProcType _ NIL, complete: CompletionProcType _ NIL]; Store: PROC [ stp: Handle, file: ROPE, stream: STREAM, noteFile: NoteFileProcType _ NIL, fileType: Type _ unknown, creation: GMT]; Error: SIGNAL [ stp: Handle, code: ErrorCode, error: ROPE, reply: CHAR _ 0C]; ErrorCode: TYPE = { noSuchHost, noRouteToNetwork, noNameLookupResponse, alreadyAConnection, noConnection, connectionClosed, connectionRejected, connectionTimedOut, accessDenied, illegalUserName, illegalUserPassword, illegalUserAccount, illegalConnectName, illegalConnectPassword, credentailsMissing, protocolError, illegalFileName, noSuchFile, requestRefused, accessError, undefinedError}; ConnectionErrors: TYPE = ErrorCode[noSuchHost..connectionTimedOut]; CredentialsErrors: TYPE = ErrorCode[accessDenied..credentailsMissing]; FileErrors: TYPE = ErrorCode[illegalFileName..requestRefused]; END. XSTP.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Smokey, 6-Jul-81 17:58:25 Karlton, 9-Dec-81 18:11:47 Bruce, 10-Nov-81 16:15:44 Mark, 21-May-81 15:45:50 JGS, 14-Aug-81 16:50:01 Davirro, 27-Aug-82 15:40:22 Loretta, 14-Sep-82 15:10:46 Schmidt, February 6, 1983 9:03 pm Birrell, June 1, 1983 2:45 pm Doug Wyatt, February 27, 1985 10:36:02 am PST Types and data Procedures set credentials set various properties query various properties retrieve, store, etc. Signals and Errors connection errors credentials errors protocol errors file errors remote stream errors catch all Κ˜codešœ™Kšœ Οmœ1™K˜—K˜Kšžœ˜—…— tγ