XNSFilingOps.mesa
Copyright Ó 1990, 1992 by Xerox Corporation. All rights reserved.
Bill Jackson (bj), May 30, 1990 1:15 pm PDT
DIRECTORY
BasicTime USING [GMT, nullGMT],
FilingP10V5 USING [Handle, Session],
FilingAttributesP10V5 USING [FileID, Version],
PFSNames USING [PATH],
Rope USING [ROPE],
XNS USING [Address],
XNSAuth USING [Conversation, Credentials],
XNSCHName USING [Name];
XNSFilingOps: CEDAR DEFINITIONS ~ {
OPEN BasicTime, FilingAttributesP10V5, Rope;
Filing types
FileType: TYPE ~ CARD32;
Root: TYPE ~ FilingP10V5.Handle;
Strong Authentication
I concede this is a bit baroque, but let's face it, color is more interesting!
Human: TYPE ~ XNSAuth.Credentials;
Ticket: TYPE ~ XNSAuth.Conversation;
Cabinet: TYPE ~ XNSCHName.Name;
OpenSession: TYPE ~ REF FilingP10V5.Session;
Server data
ServerData: TYPE ~ REF ServerDataObject;
ServerDataObject: TYPE ~ RECORD [
serverName: ROPE, -- the readable name of the service
steel: Cabinet, -- the qualified name of the service
address: REF XNS.Address, -- the transport name of the service
tkt: Ticket,  -- the "user" for this connection
session: OpenSession, -- the session for this connection
timeToLive: CARD32, -- the session time-to-live
root: Root,  -- the root directory of the service
admin: AdminData ¬ [0, 0, 0, 0, BasicTime.nullGMT, NIL, FALSE]
];
AdminData: TYPE ~ RECORD [
tktTTL: CARD32, -- the conversation time-to-live
trTTL: CARD32, -- the transport time-to-live
callsOut: CARD32, -- standing in the rain?
files: INT32,  -- opened, not yet closed
lastOp: BasicTime.GMT, -- informational
downMsg: ROPE, -- non-NIL => server is down
active: BOOL ¬ FALSE-- TRUE when a call is active; keeps the session alive.
];
Junk
Info: TYPE ~ RECORD [
version: Version,
bytes: INT,
created: BasicTime.GMT,
fileType: FileType,
pathName: ROPE,
fID: FileID,
isDir: BOOL,
numKids: CARD
];
Op: TYPE ~ { delete, enumerate, enumerateNames, rename, retrieve, store };
EnumProc: TYPE ~ PROC [eFile: PFSNames.PATH, eInfo: Info, pathy: PFSNames.PATH]
RETURNS [continue: BOOL ¬ TRUE];
EnumerateOp: PROC [mnt: ServerData, pattern: PFSNames.PATH, proc: EnumProc, op: Op];
Remote Operations
LogonOp: PROC [server: ROPE] RETURNS [mnt: ServerData ¬ NIL];
MountRootOp: PROC [mnt: ServerData];
ContinueOp: PROC [mnt: ServerData];
LogoffOp: PROC [mnt: ServerData];
Error Management
CallProtected: PROC [mnt: ServerData, proc: PROC,
pathname: ROPE ¬ NIL, time: GMT ¬ nullGMT];
GuardOp: PROC [proc: PROC];
}.