|
|
1.1 ! root 1: -- $Header: Clearinghouse.cr,v 1.2 85/03/10 05:22:58 jqj Exp $ -- ! 2: ! 3: -- $Log: Clearinghouse.cr,v $ ! 4: -- Revision 1.2 85/03/10 05:22:58 jqj ! 5: -- Modified for UNIX: reordered declaratons to eliminate forward ! 6: -- references, deleted recursive (StreamOf...) declarations, fixed ! 7: -- lots of typos. ! 8: -- ! 9: -- Revision 1.1 Initial revision - from Rochester ! 10: ! 11: Clearinghouse: PROGRAM 2 VERSION 2 = ! 12: BEGIN ! 13: DEPENDS UPON ! 14: BulkData(0) VERSION 1, ! 15: Authentication (14) VERSION 1; ! 16: ! 17: -- TYPES AND CONSTANTS DESCRIBING NAMES -- ! 18: ! 19: Organization: TYPE = STRING; ! 20: Domain: TYPE = STRING; ! 21: Object: TYPE = STRING; ! 22: ! 23: maxOrganizationsLength: CARDINAL = 20; -- in bytes -- ! 24: maxDomainLength: CARDINAL = 20; -- in bytes -- ! 25: maxObjectLength: CARDINAL = 40; -- in bytes -- ! 26: ! 27: -- There can be no wildcard characters in any of the following types. -- ! 28: OrganizationName: TYPE = Organization; ! 29: ! 30: TwoPartName: TYPE = RECORD [ ! 31: organization: Organization, ! 32: domain: Domain]; ! 33: ! 34: DomainName: TYPE = TwoPartName; ! 35: ! 36: ThreePartName: TYPE = RECORD [ ! 37: organization: Organization, ! 38: domain: Domain, ! 39: object: Object]; ! 40: ! 41: ObjectName: TYPE = ThreePartName; ! 42: ! 43: Name: TYPE = ThreePartName; ! 44: ! 45: -- Wildcard characters are permittedin OrganizationNamePatterns. -- ! 46: OrganizationNamePattern: TYPE = Organization; ! 47: ! 48: -- Wildcard characters are permitted in the domain component of this type, ! 49: -- but not in the organization component. ! 50: DomainNamePattern: TYPE = TwoPartName; ! 51: ! 52: -- Wildcard characters are permitted in the object component of this type, ! 53: -- but not in the organization and domain components. ! 54: ObjectNamePattern: TYPE = ThreePartName; ! 55: ! 56: -- TYPES AND CONSTANTS DESCRIBING BULK PARAMETERS -- ! 57: ! 58: StreamOfDomain: TYPE = CHOICE OF { ! 59: nextSegment (0) => RECORD [ ! 60: segment: SEQUENCE OF Domain, ! 61: restOfStream: StreamOfDomain], ! 62: lastSegment (1) => SEQUENCE OF Domain}; ! 63: ! 64: StreamOfDomainName: TYPE = CHOICE OF { ! 65: nextSegment (0) => RECORD [ ! 66: segment: SEQUENCE OF DomainName, ! 67: restOfStream: StreamOfDomainName], ! 68: lastSeqment (1) => SEQUENCE OF DomainName}; ! 69: ! 70: StreamOfObject: TYPE = CHOICE OF { ! 71: nextSegment (0) => RECORD [ ! 72: segment: SEQUENCE OF Object, ! 73: restOfStream: StreamOfObject], ! 74: lastSegment (1) => SEQUENCE OF Object}; ! 75: ! 76: StreamOfObjectName: TYPE = CHOICE OF { ! 77: nextSegment (0) => RECORD [ ! 78: segment: SEQUENCE OF ObjectName, ! 79: restOfStream: StreamOfObjectName], ! 80: lastSegment (1) => SEQUENCE OF ObjectName}; ! 81: ! 82: StreamOfOrganization: TYPE = CHOICE OF { ! 83: nextSegment (0) => RECORD [ ! 84: segment: SEQUENCE OF Organization, ! 85: restOfStream: StreamOfOrganization], ! 86: lastSegment (1) => SEQUENCE OF Organization}; ! 87: ! 88: StreamOfThreePartName: TYPE = CHOICE OF { ! 89: nextSegment (0) => RECORD [ ! 90: segment: SEQUENCE OF ThreePartName, ! 91: restOfStream: StreamOfThreePartName], ! 92: lastSegment (1) => SEQUENCE OF ThreePartName}; ! 93: ! 94: -- TYPES AND CONSTANTS DESCRIBING PROPERTIES -- ! 95: ! 96: Property: TYPE = LONG CARDINAL; ! 97: ! 98: -- A Name can have up to 250 Properties associated with it. -- ! 99: Properties: TYPE = SEQUENCE 250 OF Property; ! 100: ! 101: all: Property = 0; ! 102: nullProperty: Property = 37777777777B; ! 103: ! 104: -- The value associated with an item property. -- ! 105: Item: TYPE = SEQUENCE 500 OF UNSPECIFIED; ! 106: ! 107: -- TYPES AND CONSTANTS DESCRIBING NETWORK ADDRESSES -- ! 108: ! 109: -- Clearinghouse addresses aer stored in this form. -- ! 110: ! 111: NetworkAddress: TYPE = RECORD [ ! 112: network: ARRAY 2 OF UNSPECIFIED, ! 113: host: ARRAY 3 OF UNSPECIFIED, ! 114: socket: UNSPECIFIED ]; ! 115: ! 116: NetworkAddressList: TYPE = SEQUENCE 40 OF NetworkAddress; ! 117: ! 118: -- OTHER TYPES AND CONSTANTS -- ! 119: ! 120: -- How the client identifies itself to the service -- ! 121: Authenticator: TYPE = RECORD [ ! 122: credentials: Authentication.Credentials, ! 123: verifier: Authentication.Verifier]; ! 124: ! 125: wildcard: STRING = "*"; -- the wildcard character (asterisk) -- ! 126: ! 127: -- ERRORS -- ! 128: ! 129: WhichArgument: TYPE = { ! 130: first(1), -- concerns the first name or property argument -- ! 131: second(2) }; -- concerns the second name or property argument -- ! 132: ! 133: ArgumentProblem: TYPE = { ! 134: illegalProperty(10), -- property is not usable by a client -- ! 135: illegalOrganizationName(11), -- the organization component of the name ! 136: -- is incorrect, e.g., too long or short, or has wild card ! 137: -- characters when not allowed -- ! 138: illegalDomainName(12), -- the domain component of the name ! 139: -- is incorrect, e.g., too long or short, or has wild card ! 140: -- characters when not allowed -- ! 141: illegalObjectName(13), -- the object component of the name ! 142: -- is incorrect, e.g., too long or short, or has wild card ! 143: -- characters when not allowed -- ! 144: noSuchOrganization(14), -- the name's organization component does not exist -- ! 145: noSuchDomain(15), -- the name's domain component does not exist -- ! 146: noSuchObject(16) }; -- the name's object component does not exist -- ! 147: ArgumentError: ERROR [problem: ArgumentProblem, which: WhichArgument] = 2; ! 148: ! 149: AuthenticationError: ERROR [problem: Authentication.Problem] = 6; ! 150: ! 151: CallProblem: TYPE = { ! 152: accessRightsInsufficient(1), -- operation prevented by access controls -- ! 153: tooBusy(2), -- server is too busy to service this request -- ! 154: serverDown(3), -- a remote Clearinghouse server was down and was needed for this request -- ! 155: useCourier(4), -- server insists that Courier be used for this particular request -- ! 156: other(5) }; ! 157: CallError: ERROR [problem: CallProblem] = 1; ! 158: ! 159: PropertyProblem: TYPE = { ! 160: missing(20), -- the object exists, but the property doesn't -- ! 161: wrongType(21)}; -- client wanted a Group but it was an Item, or vice versa -- ! 162: PropertyError: ERROR [problem: PropertyProblem, ! 163: distinguishedObject: ObjectName] = 3; ! 164: UpdateProblem: TYPE = { ! 165: noChange(30), -- operation wouldn't change the database -- ! 166: outOfDate(31), -- more recent information was in database -- ! 167: objectOverflow(32), -- the particular object will have too much data ! 168: -- associated with it -- ! 169: databaseOverflow(33)}; -- the server has run out of room -- ! 170: UpdateError: ERROR [problem: UpdateProblem, found: BOOLEAN, ! 171: which: WhichArgument, distinguishedObject: ObjectName] = 4; ! 172: ! 173: WrongServer: ERROR [hint: ObjectName] = 5; ! 174: ! 175: -- PROCEDURES -- ! 176: ! 177: -- DEALING WITH OBJECTS -- ! 178: ! 179: CreateObject: PROCEDURE [name: ObjectName, agent: Authenticator] ! 180: REPORTS [ArgumentError, AuthenticationError, CallError, UpdateError, ! 181: WrongServer] = 2; ! 182: ! 183: DeleteObject: PROCEDURE [name: ObjectName, agent: Authenticator] ! 184: REPORTS [ArgumentError, AuthenticationError, CallError, UpdateError, ! 185: WrongServer] = 3; ! 186: ! 187: LookupObject: PROCEDURE [name: ObjectNamePattern, agent: Authenticator] ! 188: RETURNS [distinguishedObject: ObjectName] ! 189: REPORTS [ArgumentError, AuthenticationError, CallError, WrongServer] = 4; ! 190: ! 191: ListOrganizations: PROCEDURE [pattern: OrganizationNamePattern, ! 192: list: BulkData.Sink, agent: Authenticator] ! 193: REPORTS [ArgumentError, AuthenticationError, CallError, WrongServer] = 5; ! 194: ! 195: ListDomain: PROCEDURE [pattern: DomainNamePattern, list: BulkData.Sink, ! 196: agent: Authenticator] ! 197: REPORTS [ArgumentError, AuthenticationError, CallError, WrongServer] = 6; ! 198: ! 199: ListObjects: PROCEDURE [pattern: ObjectNamePattern, property: Property, ! 200: list: BulkData.Sink, agent: Authenticator] ! 201: REPORTS [ArgumentError, AuthenticationError, CallError, WrongServer] = 7; ! 202: ! 203: ListAliasesOf: PROCEDURE [pattern: ObjectNamePattern, list: BulkData.Sink, ! 204: agent: Authenticator] ! 205: RETURNS [distinguishedObject: ObjectName] ! 206: REPORTS [ArgumentError, AuthenticationError, CallError, WrongServer] = 9; ! 207: ! 208: -- PROCEDURES DEALING WITH ALIASES -- ! 209: ! 210: CreateAlias: PROCEDURE [alias, sameAs: ObjectName, agent: Authenticator] ! 211: RETURNS [distinguishedObject: ObjectName] ! 212: REPORTS [ArgumentError, AuthenticationError, CallError, UpdateError, ! 213: WrongServer] = 10; ! 214: ! 215: DeleteAlias: PROCEDURE [alias: ObjectName, agent: Authenticator] ! 216: RETURNS [distinguishedObject: ObjectName] ! 217: REPORTS [ArgumentError, AuthenticationError, CallError, UpdateError, ! 218: WrongServer] = 11; ! 219: ! 220: ListAliases: PROCEDURE [pattern: ObjectNamePattern, list: BulkData.Sink, ! 221: agent: Authenticator] ! 222: REPORTS [ArgumentError, AuthenticationError, CallError, WrongServer] = 8; ! 223: ! 224: -- PROCEDURES DEALING WITH PROPERTIES -- ! 225: ! 226: DeleteProperty: PROCEDURE [name: ObjectName, property: Property, ! 227: agent: Authenticator] ! 228: RETURNS [distinguishedObject: ObjectName] ! 229: REPORTS [ArgumentError, AuthenticationError, CallError, PropertyError, ! 230: UpdateError, WrongServer] = 14; ! 231: ! 232: ListProperties: PROCEDURE [pattern: ObjectNamePattern, agent: Authenticator] ! 233: RETURNS [distinguishedObject: ObjectName, properties: Properties] ! 234: REPORTS [ArgumentError, AuthenticationError, CallError, WrongServer] = 15; ! 235: ! 236: -- PROCEDURES DEALING WITH THE ITEM PROPERTY -- ! 237: ! 238: AddItemProperty: PROCEDURE [name: ObjectName, newProperty: Property, ! 239: value: Item, agent: Authenticator] ! 240: RETURNS [distinguishedObject: ObjectName] ! 241: REPORTS [ArgumentError, AuthenticationError, CallError, PropertyError, ! 242: UpdateError, WrongServer] = 13; ! 243: ! 244: RetrieveItem: PROCEDURE [pattern: ObjectNamePattern, property: Property, ! 245: agent: Authenticator] ! 246: RETURNS [distinguishedObject: ObjectName, value: Item] ! 247: REPORTS [ArgumentError, AuthenticationError, CallError, PropertyError, ! 248: WrongServer] = 16; ! 249: ! 250: ChangeItem: PROCEDURE [name: ObjectName, property: Property, newValue: Item, ! 251: agent: Authenticator] ! 252: RETURNS [distinguishedObject: ObjectName] ! 253: REPORTS [ArgumentError, AuthenticationError, CallError, PropertyError, ! 254: UpdateError, WrongServer] = 17; ! 255: ! 256: -- PROCEDURES DEALING WITH THE GROUP PROPERTY -- ! 257: ! 258: AddGroupProperty: PROCEDURE [name: ObjectName, newProperty: Property, ! 259: membership: BulkData.Source, agent: Authenticator] ! 260: RETURNS [distinguishedObject: ObjectName] ! 261: REPORTS [ArgumentError, AuthenticationError, CallError, PropertyError, ! 262: UpdateError, WrongServer] = 12; ! 263: ! 264: RetrieveMembers: PROCEDURE [pattern: ObjectNamePattern, property: Property, ! 265: membership: BulkData.Sink, agent: Authenticator] ! 266: RETURNS [distinguishedObject: ObjectName] ! 267: REPORTS [ArgumentError, AuthenticationError, CallError, PropertyError, ! 268: WrongServer] = 18; ! 269: ! 270: AddMember: PROCEDURE [name: ObjectName, property: Property, ! 271: newMember: ThreePartName, agent: Authenticator] ! 272: RETURNS [distinguishedObject: ObjectName] ! 273: REPORTS [ArgumentError, AuthenticationError, CallError, PropertyError, ! 274: UpdateError, WrongServer] = 19; ! 275: ! 276: AddSelf: PROCEDURE [name: ObjectName, property: Property, agent: Authenticator] ! 277: RETURNS [distinguishedObject: ObjectName] ! 278: REPORTS [ArgumentError, AuthenticationError, CallError, PropertyError, ! 279: UpdateError, WrongServer] = 20; ! 280: ! 281: DeleteMember: PROCEDURE [name: ObjectName, property: Property, ! 282: member: ThreePartName, agent: Authenticator] ! 283: RETURNS [distinguishedObject: ObjectName] ! 284: REPORTS [ArgumentError, AuthenticationError, CallError, PropertyError, ! 285: UpdateError, WrongServer] = 21; ! 286: ! 287: DeleteSelf: PROCEDURE [name: ObjectName, property: Property, agent: Authenticator] ! 288: RETURNS [distinguishedObject: ObjectName] ! 289: REPORTS [ArgumentError, AuthenticationError, CallError, PropertyError, ! 290: UpdateError, WrongServer] = 22; ! 291: ! 292: isMember: PROCEDURE [memberOf: ObjectNamePattern, ! 293: property, secondaryProperty: Property, name: ThreePartName, ! 294: agent: Authenticator] ! 295: RETURNS [isMember: BOOLEAN, distinguishedObject: ObjectName] ! 296: REPORTS [ArgumentError, AuthenticationError, CallError, PropertyError, ! 297: WrongServer] = 23; ! 298: ! 299: -- PROCEDURES DEALING WITH SERVERS -- ! 300: ! 301: RetrieveAddresses: PROCEDURE ! 302: RETURNS [address: NetworkAddressList] ! 303: REPORTS [CallError] = 0; ! 304: ! 305: ListDomainServed: PROCEDURE [domains: BulkData.Sink, agent: Authenticator] ! 306: REPORTS [AuthenticationError, CallError] = 1; ! 307: ! 308: END. -- of Clearinghouse -- ! 309:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.