NameInfoDefs.mesa
Transport mechanism: Client reading of R-Server database
Copyright (C) 1984, Xerox Corporation. All rights reserved.
(simplified) Cedar PilotBridge version
Michael Plass, September 10, 1984 5:10:17 pm PDT
Andrew Birrell August 27, 1982 3:00 pm
Philip Karlton 8-Oct-82 11:24:40
DIRECTORY GVNames;
NameInfoDefs: DEFINITIONS =
BEGIN
RName: TYPE ~ LONG STRING;
Outcome: TYPE = GVNames.Outcome;
NameType: TYPE = Outcome[noChange..badPwd]; -- outcomes for enquiries --
"Authenticate" checks a user name and password. --
AuthenticateInfo: TYPE = NameType[group..badPwd];
Authenticate: PROC[name: RName, password: LONG STRING]
RETURNS[ AuthenticateInfo ];
Access control primitives --
Membership:  TYPE = GVNames.Membership;
{ yes, no, notGroup, allDown };
MembershipLevel: TYPE = GVNames.MembershipLevel; -- { direct(0), closure(1), upArrow(2) }
MembershipGrade: TYPE = GVNames.MembershipGrade; -- { self(0), registry(1) }
ListType: TYPE = GVNames.ListType; -- { members(0), owners(1), friends(2) }
IsInList: PROC[name: RName, member: RName,
level: MembershipLevel, grade: MembershipGrade, acl: ListType]
RETURNS[Membership];
IsMemberDirect: PROC[name: RName, member: RName]
RETURNS[ Membership ] = INLINE
{ RETURN[IsInList[name, member, direct, self, members]] };
IsOwnerDirect: PROC[name: RName, owner: RName]
RETURNS[ Membership ] = INLINE
{ RETURN[IsInList[name, owner, direct, self, owners]] };
IsFriendDirect: PROC[name: RName, friend: RName]
RETURNS[ Membership ] = INLINE
{ RETURN[IsInList[name, friend, direct, self, friends]] };
IsMemberClosure:PROC[name: RName, member: RName]
RETURNS[ Membership ] = INLINE
{ RETURN[IsInList[name, member, closure, self, members]] };
IsOwnerClosure: PROC[name: RName, owner: RName]
RETURNS[ Membership ] = INLINE
{ RETURN[IsInList[name, owner, closure, self, owners]] };
IsFriendClosure:PROC[name: RName, friend: RName]
RETURNS[ Membership ] = INLINE
{ RETURN[IsInList[name, friend, closure, self, friends]] };
IsMemberUpArrow:PROC[name: RName, member: RName]
RETURNS[ Membership ] = INLINE
{ RETURN[IsInList[name, member, upArrow, self, members]] };
IsOwnerUpArrow: PROC[name: RName, owner: RName]
RETURNS[ Membership ] = INLINE
{ RETURN[IsInList[name, owner, upArrow, self, owners]] };
IsFriendUpArrow:PROC[name: RName, friend: RName]
RETURNS[ Membership ] = INLINE
{ RETURN[IsInList[name, friend, upArrow, self, friends]] };
END.