DIRECTORY CHNameP2V0 USING [Name], CHOpsP2V3 USING [all, Item, nullProperty, Properties, Property], Rope USING [ROPE], XNS USING [Address, unknownAddress], XNSAuth USING [Identity]; XNSCH: CEDAR DEFINITIONS ~ { OPEN CHName: CHNameP2V0, CHOps: CHOpsP2V3; ROPE: TYPE ~ Rope.ROPE; Name: TYPE ~ CHName.Name; -- valid name (or alias) of object Pattern: TYPE ~ Name; -- may contain wildcards Element: TYPE ~ Name; -- element of a group, needn't name an object PropertyID: TYPE ~ CHOps.Property; notUsable: PropertyID ~ CHOps.nullProperty; unspecified: PropertyID ~ CHOps.all; Properties: TYPE ~ CHOps.Properties; Item: TYPE ~ CHOps.Item; Conversation: TYPE ~ REF ConversationObject; ConversationObject: TYPE; NameStreamProc: TYPE ~ PROC [Element]; ElementStreamProc: TYPE ~ PROC [Element]; EnumeratorProc: TYPE ~ PROC [ElementStreamProc]; InitiateConversation: PROC [identity: XNSAuth.Identity _ NIL, server: XNS.Address _ XNS.unknownAddress] RETURNS [Conversation]; TerminateConversation: PROC [c: Conversation]; Add: PROC [c: Conversation, name: Name]; Delete: PROC [c: Conversation, name: Name]; Lookup: PROC [c: Conversation, pattern: Pattern] RETURNS [distingName: Name]; AddAlias: PROC [c: Conversation, name, alias: Name] RETURNS [distingName: Name]; DeleteAlias: PROC [c: Conversation, alias: Name] RETURNS [distingName: Name]; ListAliases: PROC [c: Conversation, pattern: Pattern, eachAlias: NameStreamProc] RETURNS [distingName: Name]; GetProperties: PROC [c: Conversation, pattern: Pattern] RETURNS [distingName: Name, properties: Properties]; DeleteProperty: PROC [c: Conversation, name: Name, pID: PropertyID] RETURNS [distingName: Name]; AddItemProperty: PROC [c: Conversation, name: Name, pID: PropertyID, item: Item] RETURNS [distingName: Name]; ChangeItemProperty: PROC [c: Conversation, name: Name, pID: PropertyID, item: Item] RETURNS [distingName: Name]; LookupItemProperty: PROC [c: Conversation, pattern: Pattern, pID: PropertyID] RETURNS [distingName: Name, item: Item]; LookupAddress: PROC [c: Conversation, pattern: Pattern] RETURNS [distingName: Name, address: XNS.Address]; LookupRopeProperty: PROC [c: Conversation, pattern: Pattern, pID: PropertyID] RETURNS [distingName: Name, ropeProperty: ROPE]; LookupNameProperty: PROC [c: Conversation, pattern: Pattern, pID: PropertyID] RETURNS [distingName: Name, nameProperty: Name]; AddGroupProperty: PROC [c: Conversation, name: Name, pID: PropertyID, enumerator: EnumeratorProc _ NIL] RETURNS [distingName: Name]; AddMember: PROC [c: Conversation, name: Name, pID: PropertyID, member: Element] RETURNS [distingName: Name]; AddSelf: PROC [c: Conversation, name: Name, pID: PropertyID] RETURNS [distingName: Name]; DeleteMember: PROC [c: Conversation, name: Name, pID: PropertyID, member: Element] RETURNS [distingName: Name]; DeleteSelf: PROC [c: Conversation, name: Name, pID: PropertyID] RETURNS [distingName: Name]; ListMembers: PROC [c: Conversation, pattern: Pattern, pID: PropertyID, eachMember: ElementStreamProc] RETURNS [distingName: Name]; IsMember: PROC [c: Conversation, pattern: Pattern, pID: PropertyID, member: Element] RETURNS [distingName: Name, isMember: BOOL]; IsMemberClosure: PROC [c: Conversation, pattern: Pattern, pID: PropertyID, member: Element, pID2: PropertyID _ unspecified] RETURNS [distingName: Name, isMember: BOOL]; Enumerate: PROC [c: Conversation, pattern: Pattern, pID: PropertyID, eachObject: NameStreamProc]; EnumerateAliases: PROC [c: Conversation, pattern: Pattern, eachName: NameStreamProc]; EnumerateOrganizations: PROC [c: Conversation, pattern: Pattern, eachOrganization: ElementStreamProc]; EnumerateDomains: PROC [c: Conversation, pattern: Pattern, eachDomain: ElementStreamProc]; LookupAddressFromRope: PROC [rope: ROPE] RETURNS [distingName: Name, address: XNS.Address]; GetServerAddresses: PROC [c: Conversation] RETURNS [addresses: LIST OF XNS.Address]; EnumerateDomainsServed: PROC [c: Conversation, eachDomain: ElementStreamProc]; AddressesFromItem: PROC [item: Item] RETURNS [addresses: LIST OF XNS.Address]; ItemFromAddresses: PROC [addresses: LIST OF XNS.Address] RETURNS [item: Item]; RopeFromItem: PROC [item: Item] RETURNS [rope: ROPE]; ItemFromRope: PROC [rope: ROPE] RETURNS [item: Item]; ElementFromItem: PROC [item: Item] RETURNS [element: Element]; ItemFromElement: PROC [element: Element] RETURNS [item: Item]; ElementFromRope: PROC [rope: ROPE, defaultDomain: ROPE _ NIL, defaultOrganization: ROPE _ NIL] RETURNS [element: Element]; RopeFromElement: PROC [element: Element] RETURNS [rope: ROPE]; BestAddressInList: PUBLIC PROC [list: LIST OF XNS.Address] RETURNS [bestAddress: XNS.Address]; WrongServerError: VAR ERROR [hint: Name]; Error: ERROR [code: ErrorCode, which: Which]; ErrorCode: TYPE ~ { notAllowed, allDown, wasUpNowDown, protocolError, cantConnectToServer, -- (*) communicationFailure, -- (*) serverTooBusy, -- (*) serviceNotExported, -- (*) illegalPropertyID, illegalOrganizationName, illegalDomainName, illegalObjectName, noSuchOrganization, noSuchDomain, noSuchObject, propertyIDNotFound, wrongPropertyType, noChange, outOfDate, overflowOfName, overflowOfDataBase, credentialsInvalid, credentialsTooWeak, inappropriateConversation, unknown }; Which: TYPE ~ { first, second }; }. XNSCH.mesa Demers, December 10, 1986 12:25:06 pm PST Copied Types The following three types are equivalent; the difference lies in what we consider to be legitimate values ... Types A callback proc for handling a sequence of names. A callback proc for handling a sequence of group elements. A callback that supplies a sequence of group elements by repeatedly calling the ElementStreamProc. Authentication A conversation contains credentials that identify the user to the Clearinghouse service. See also XNSAuth. Initiate a conversation with the Clearinghouse service using the given identity. A NIL identity is okay for simple lookups. If server is not specified, the conversation is with the generic Clearinghouse service, and the package takes care of server location and WrongServer error processing. If a server is specified, calls using this conversation will go to that address, and WrongServer errors will be passed back to the client. There should never be more than one outstanding call on any conversation. No ERRORs. Terminate the conversation. Dropping it on the floor is safe, but expensive. Operations on Objects ! Error ! Error ! Error ! Error ! Error ! Error Operations on Properties ! Error ! Error ! Error ! Error ! Error ! Error ! Error ! Error ! Error ! Error ! Error ! Error ! Error ! Error ! Error ! Error Enumeration Operations ! Error ! Error ! Error The domain and object fields of the Elements passed to eachOrganization are indeterminate and should be ignored. ! Error The object fields of the Elements passed to eachDomain are indeterminate and should be ignored. Common Lookups (generic conversations only) No ERRORs  returns [[NIL,NIL,NIL], unknownAddress] on failure. Server-Specific Queries (not allowed with generic conversations) ! Error ! Error The object fields of the Elements passed to eachDomain are indeterminate and should be ignored. Utilities Errors _ CHOps.WrongServer. Raised only for a call directed to a specific CH Server. code is defined below. which is significant for naming problems or propertyID errors when more than one argument might be the cause of the error. Asterisk (*) ==> error only occurs on call directed to a specific CH Server. Operational problems Naming problems PropertyID errors Update problems Authentication problems Specific/Generic mixup Catch-all ΚD˜šΟkœ™ J™)J˜—codeš ˜ Kšœ œ˜Kšœ œ1˜@Kšœœœ˜Kšœœ˜$Kšœœ ˜K˜—šΠbkœœ ˜K˜KšœΟnœŸœ ˜*K˜head™ Kšœœœ˜K˜™mKšœœΟc"˜KšŸœœœ˜>K˜KšŸœœœœœœœœ˜zKšŸœœœœ˜>K˜KšŸœœœœœœ œœ ˜^—™šŸœœœ˜)K™K™8K˜—šŸœœ!˜-K™K™zK™L—K˜šœ œ˜™K˜ K˜K˜ K˜Kšœ ˜Kšœ ˜Kšœ ˜Kšœ ˜—™K˜K˜K˜K˜K˜K˜ K˜ —™K˜K˜—™K˜ K˜ K˜K˜—™K˜K˜—™K˜—™ K˜—K˜—K˜Kšœœ˜ —K˜——…—†#θ