Annotation of 43BSD/contrib/xns/examples/filing/Clearinghouse2.cr, revision 1.1

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

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.