Annotation of 43BSD/contrib/xns/examples/print/Printing3.cr, revision 1.1

1.1     ! root        1: -- $Header: Printing3.cr,v 2.0 85/11/21 07:23:08 jqj Exp $ --
        !             2: Printing: PROGRAM 4 VERSION 3 =
        !             3: 
        !             4: -- This specification has been modifed from the "official" one to
        !             5: -- correspond to the restrictions of the Unix Courier compiler.  In
        !             6: -- particular, it has been reordered to eliminate forward references
        !             7: -- and some duplicate options have been renamed
        !             8: 
        !             9: -- $Log:       Printing3.cr,v $
        !            10: Revision 2.0  85/11/21  07:23:08  jqj
        !            11: 4.3BSD standard release
        !            12: 
        !            13: Revision 1.3  85/03/11  16:44:12  jqj
        !            14: *** empty log message ***
        !            15: 
        !            16: -- Revision 1.3  85/03/11  16:44:12  jqj
        !            17: -- Public alpha-test version, released 11 March 1985
        !            18: -- 
        !            19: -- Revision 1.2  85/03/01  05:53:13  jqj
        !            20: -- revised to work with current Unix courier compiler:
        !            21: --   reordered, typos fixed, some enum tags renamed to avoid duplication
        !            22: -- Revision 1.1
        !            23: -- Initial revision (from Rochester)
        !            24: 
        !            25: BEGIN
        !            26: 
        !            27:        DEPENDS UPON
        !            28:                BulkData (0) VERSION 1,
        !            29:                Authentication (14) VERSION 1,
        !            30:                Time (15) VERSION 2;
        !            31: 
        !            32: 
        !            33: 
        !            34: -- Types --
        !            35: 
        !            36: Time: TYPE = Time.Time; -- the standard time and date format --
        !            37: 
        !            38: RequestID: TYPE = ARRAY 5 OF UNSPECIFIED; -- the standard time and date format --
        !            39: 
        !            40: PrintAttributes: TYPE = SEQUENCE 3 OF CHOICE OF {
        !            41:        printObjectName(0) => STRING, -- default is implementation-dependent --
        !            42:        printObjectCreateDate(1) => Time, -- default is implementation-dependent --
        !            43:        senderName(2) => STRING }; -- default is implementation-dependent --
        !            44: 
        !            45: Paper: TYPE = CHOICE OF {
        !            46:        unknown(0) => RECORD [],
        !            47:        knownSize(1) => {
        !            48:                usLetter(1),    -- defined as 8.5" x 11.0" or 216mm x 297mm --
        !            49:                usLegal(2),     -- defined as 8.5" x 14.0" or 216mm x 356mm --
        !            50:                a0(3), a1(4), a2(5), a3(6), a4(7), a5(8), a6(9), a7(10), 
        !            51:                        a8(11), a9(12), a10(35),
        !            52:                isoB0(13), isoB1(14), isoB2(15), isoB3(16), isoB4(17),
        !            53:                        isoB5(18), isoB6(19), isoB7(20), isoB8(21),
        !            54:                        isoB9(22), isoB10(23),
        !            55:                jisB0(24), jisB1(25), jisB2(26), jisB3(27), jisB4(28),
        !            56:                        jisB5(29), jisB6(30), jisB7(31), jisB8(32), jisB9(33),
        !            57:                        jisB10(34)},
        !            58:        otherSize(2) => RECORD [width, length: CARDINAL]}; -- both in millimeters --
        !            59: 
        !            60: Medium: TYPE = CHOICE OF {paper(0) => Paper};
        !            61: 
        !            62: Media: TYPE = SEQUENCE 100 OF Medium;
        !            63: 
        !            64: PrintOptions: TYPE = SEQUENCE 10 OF CHOICE OF {
        !            65:        printObjectSize(0) => LONG CARDINAL, -- default is size of master --
        !            66:        recipientName(1) => STRING, -- default is senderName --
        !            67:        message(2) => STRING, -- default is "" --
        !            68:        copyCount(3) => CARDINAL, -- default is 1 --
        !            69:        pagesToPrint(4) => RECORD [
        !            70:                beginningPageNumber, -- default is 1, the first page of the master --
        !            71:                endingPageNumber: CARDINAL], -- default is the last page of the master --
        !            72:        mediumHint(5) => Medium, -- default is implementation-dependent --
        !            73:        priorityHint(6) => {low(0), normal(1), high(2)}, -- default is implementation-dependent --
        !            74:        releaseKey(7) => Authentication.HashedPassword, -- default is 177777B --
        !            75:        staple(8) => BOOLEAN, -- default is FALSE --
        !            76:        twoSided(9) => BOOLEAN }; -- default is FALSE --
        !            77: 
        !            78: PrinterProperties: TYPE = SEQUENCE 3 OF CHOICE OF {
        !            79:        ppmedia(0) => Media,
        !            80:        ppstaple(1) => BOOLEAN, -- default is FALSE --
        !            81:        pptwoSided(2) => BOOLEAN}; -- default is FALSE --
        !            82: 
        !            83: PrinterStatus: TYPE = SEQUENCE 4 OF CHOICE OF {
        !            84:        spooler(0) => {available(0), busy(1), disabled(2), full(3)},
        !            85:        formatter(1) => {available(0), busy(1), disabled(2)},
        !            86:        printer(2) => {available(0), busy(1), disabled(2), needsAttention(3),
        !            87:                needsKeyOperator(4) },
        !            88:        media(3) => Media};
        !            89: 
        !            90: 
        !            91: RequestStatus: TYPE = SEQUENCE 2 OF CHOICE OF {
        !            92:        status(0) => {pending(0), inProgress(1), completed(2),
        !            93:                completedWithWarning(3), unknown(4), rejected(5), aborted(6),
        !            94:                canceled(7), held(8) },
        !            95:        statusMessage(1) => STRING}; -- default is "" --
        !            96: 
        !            97: -- Remote Errors --
        !            98: 
        !            99: UndefinedProblem: TYPE = CARDINAL;
        !           100: 
        !           101: ConnectionProblem: TYPE = {
        !           102: 
        !           103:        -- communications problems --
        !           104:        noRoute(0), -- no route to the other party could be found. --
        !           105:        noResponse(1), -- the other party never answered. --
        !           106:        transmissionHardware(2), -- some local transmission hardware was inoperable. --
        !           107:        transportTimeout(3), -- the other party responded but later failed to respond. --
        !           108: 
        !           109:        -- resource problems --
        !           110:        tooManyLocalConnections(4), -- no additional connection is possible. --
        !           111:        tooManyRemoteConnections(5), -- the other party rejected the connection attempt. --
        !           112: 
        !           113:        -- remote program implementation problems --
        !           114:        missingCourier(6), -- the other party has no Courier implementation. --
        !           115:        missingProgram(7), -- the other party does not implement the Bulk Data program. --
        !           116:        missingProcedure(8), -- the other party does not implement the procedure. --
        !           117:        protocolMismatch(9), -- the two parties have no Courier version in commmon. --
        !           118:        parameterInconsistency(10), -- a protocol violation occurred in parameters. --
        !           119:        invalidMessage(11), -- a protocol vilation occurred in message format. --
        !           120:        returnTimedOut(12), -- the procedure call never returned. --
        !           121: 
        !           122:        -- miscellaneous --
        !           123:        otherCallProblem(177777B)}; -- some other protocol violation occurred during a call. --
        !           124: 
        !           125: TransferProblem: TYPE = {
        !           126:        aborted(0), -- The bulk data transfer was aborted by the party at the other end of the connection. --
        !           127:        formatIncorrect(2), -- The bulk data received from the souce did not have the expected format. --
        !           128:        noRendezvous(3), -- The identifier from the other party never appeared. --
        !           129:        wrongDirection(4)}; -- The other party wanted to transfer the data in the wrong direction. --
        !           130: 
        !           131: Busy: ERROR = 0; -- print service cannot accept a new request at this time --
        !           132: 
        !           133: InsufficientSpoolSpace: ERROR = 1; -- print service does not have enough space to spool a new request --
        !           134: 
        !           135: InvalidPrintParameters: ERROR = 2; -- call to Print specified inconsistent arguments --
        !           136: 
        !           137: MasterTooLarge: ERROR = 3; -- master is too large for the printer service to ever accept --
        !           138: 
        !           139: ServiceUnavailable: ERROR = 4;
        !           140: 
        !           141: MediumUnavailable: ERROR = 5; -- the service is not accepting any remote procedure calls --
        !           142: 
        !           143: SpoolingDisabled: ERROR = 6; -- print service is not accepting print requests --
        !           144: 
        !           145: SpoolingQueueFull: ERROR = 7; -- print service does not have enough space to accept a new request --
        !           146: 
        !           147: SystemError: ERROR = 8; -- print service is in an internally inconsistent state --
        !           148: 
        !           149: TooManyClients: ERROR = 9; -- print service does not have enough resources to open a new connection --
        !           150: 
        !           151: Undefined: ERROR [problem: UndefinedProblem] = 10; -- some procedure in Printing is not implemented --
        !           152: 
        !           153: ConnectionError: ERROR [problem: ConnectionProblem] = 11;
        !           154: 
        !           155: TransferError: ERROR [problem: TransferProblem] = 12;
        !           156: 
        !           157: -- Remote Procedures --
        !           158: 
        !           159: Print: PROCEDURE [master: BulkData.Source, printAttributes: PrintAttributes,
        !           160:        printOptions: PrintOptions]
        !           161: RETURNS [printRequestID: RequestID]
        !           162: REPORTS [Busy, ConnectionError, InsufficientSpoolSpace,
        !           163:        InvalidPrintParameters, MasterTooLarge, MediumUnavailable,
        !           164:        ServiceUnavailable, SpoolingDisabled, SpoolingQueueFull, SystemError,
        !           165:        TooManyClients, TransferError, Undefined] = 0;
        !           166: 
        !           167: GetPrinterProperties: PROCEDURE
        !           168: RETURNS [properties: PrinterProperties]
        !           169: REPORTS [ServiceUnavailable, SystemError, Undefined] = 1;
        !           170: 
        !           171: GetPrintRequestStatus: PROCEDURE [printRequestID: RequestID]
        !           172: RETURNS [status: RequestStatus]
        !           173: REPORTS [ServiceUnavailable, SystemError, Undefined] = 2;
        !           174: 
        !           175: GetPrinterStatus: PROCEDURE
        !           176: RETURNS [status: PrinterStatus]
        !           177: REPORTS [ServiceUnavailable, SystemError, Undefined] = 3;
        !           178: 
        !           179: END.

unix.superglobalmegacorp.com

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