<> <> <> Printing: PROGRAM 4 VERSION 3 = BEGIN DEPENDS UPON BulkData (0) VERSION 1, Authentication (14) VERSION 2, Time (15) VERSION 2; <> <<>> Source: TYPE = BulkData.Source; Time: TYPE = Time.Time; -- the standard time and date format UndefinedProblem: TYPE = CARDINAL; <> <<>> AttributeKind: TYPE = { printObjectName(0), printObjectCreateDate(1), senderName(2) }; ConnectionProblem: TYPE = { noRoute(0), -- no route to the other party could be found. noResponse(1), -- the other party never answered. transmissionHardware(2), -- some local transmission hardware was inoperative. transportTimeout(3), -- the other party responded once, but later failed to respond. tooManyLocalConnections(4), -- no additional connection is possible. tooManyRemoteConnections(5), -- the other party rejected the connection attempt. missingCourier(6), -- the other party has no Courier implementation. missingProgram(7), -- the other party does not implement the Bulk Data program. missingProcedure(8), -- the other party does not implement the procedure. protocolMismatch(9), -- the two parties have no Courier version in commmon. parameterInconsistency(10), -- a protocol violation occurred in parameters. invalidMessage(11), -- a protocol violation occurred in message format. returnTimedOut(12), -- the procedure call never returned. otherCallProblem(177777B) -- some other protocol violation occurred during a call. }; FormatterStatus: TYPE = { available(0), busy(1), disabled(2) }; InterpressMasterStatus: TYPE = { pending(0), inProgress(1), completed(2), completedWithWarning(3), unknown(4), rejected(5), aborted(6), canceled(7), held(8) }; JobStatusKind: TYPE = { status(0), statusMessage(1) }; KnownPaperSize: TYPE = { usLetter(1), -- defined as 8.5" x 11.0" or 216mm x 297mm usLegal(2), -- defined as 8.5" x 14.0" or 216mm x 356mm a0(3), -- anybody know what an 'a' is? a1(4), a2(5), a3(6), a4(7), a5(8), a6(9), a7(10), a8(11), a9(12), a10(35), -- sneaky! isoB0(13), -- anybody know what an 'iso' is? isoB1(14), isoB2(15), isoB3(16), isoB4(17), isoB5(18), isoB6(19), isoB7(20), isoB8(21), isoB9(22), isoB10(23), jisB0(24), -- anybody know what an 'jis' is? jisB1(25), jisB2(26), jisB3(27), jisB4(28), jisB5(29), jisB6(30), jisB7(31), jisB8(32), jisB9(33), jisB10(34) }; MarkingEngineStatus: TYPE = { available(0), busy(1), disabled(2), needsAttention(3), needsKeyOperator(4) }; MediumKind: TYPE = { paper(0) }; OptionKind: TYPE = { printObjectSize(0), recipientName(1), message(2), copyCount(3), pagesToPrint(4), mediumHint(5), priorityHint(6), releaseKey(7), staple(8), twoSided(9) }; PaperKind: TYPE = { unknown(0), knownSize(1), otherSize(2) }; Priority: TYPE = { low(0), normal(1), high(2) }; PropertyKind: TYPE = { ppmedia(0), ppstaple(1), pptwoSided(2) }; SpoolerStatus: TYPE = { available(0), busy(1), disabled(2), full(3) }; StatusKind: TYPE = { spooler(0), formatter(1), printer(2), media(3) }; TransferProblem: TYPE = { aborted(0), -- The bulk data transfer was aborted by the party at the other end of the connection. formatIncorrect(2), -- The bulk data received from the souce did not have the expected format. noRendezvous(3), -- The identifier from the other party never appeared. wrongDirection(4) -- The other party wanted to transfer the data in the wrong direction. }; <> RequestID: TYPE = ARRAY 5 OF UNSPECIFIED; -- the standard time and date format <> <<>> DocumentSubrange: TYPE = RECORD [ beginningPageNumber: CARDINAL, -- default is 1, the first page of the master endingPageNumber: CARDINAL -- default is the last page of the master ]; EmptyRecord: TYPE = RECORD [ ]; PaperDimensions: TYPE = RECORD [ width: CARDINAL, -- both in millimeters length: CARDINAL ]; <> <<>> Attribute: TYPE = CHOICE AttributeKind OF { printObjectName => STRING, -- (0) default is implementation-dependent printObjectCreateDate => Time, -- (1) default is implementation-dependent senderName => STRING -- (2) default is implementation-dependent }; JobStatus: TYPE = CHOICE JobStatusKind OF { status => InterpressMasterStatus, -- (0) statusMessage => STRING -- (1) default is "" }; Medium: TYPE = CHOICE MediumKind OF { paper => Paper -- (0) }; Option: TYPE = CHOICE OptionKind OF { printObjectSize => LONG CARDINAL, -- (0) default is size of master recipientName => STRING, -- (1) default is senderName message => STRING, -- (2) default is "" copyCount => CARDINAL, -- (3) default is 1 pagesToPrint => DocumentSubrange, -- (4) mediumHint => Medium, -- (5) default is implementation-dependent priorityHint => Priority, -- (6) default is implementation-dependent releaseKey => Authentication.HashedPassword, -- (7) default is 177777B staple => BOOLEAN, -- (8) default is FALSE twoSided => BOOLEAN -- (9) default is FALSE }; Paper: TYPE = CHOICE PaperKind OF { unknown => EmptyRecord, -- (0) knownSize => KnownPaperSize, -- (1) otherSize => PaperDimensions -- (2) }; Property: TYPE = CHOICE PropertyKind OF { ppmedia => Media, -- (0) ppstaple => BOOLEAN, -- (1) default is FALSE pptwoSided => BOOLEAN -- (2) default is FALSE }; ServiceStatus: TYPE = CHOICE StatusKind OF { spooler => SpoolerStatus, -- (0) formatter => FormatterStatus, -- (1) printer => MarkingEngineStatus, -- (2) media => Media -- (3) }; <<>> <> <<>> Media: TYPE = SEQUENCE 100 OF Medium; PrintAttributes: TYPE = SEQUENCE 3 OF Attribute; PrinterProperties: TYPE = SEQUENCE 3 OF Property; PrinterStatus: TYPE = SEQUENCE 4 OF ServiceStatus; PrintOptions: TYPE = SEQUENCE 10 OF Option; RequestStatus: TYPE = SEQUENCE 2 OF JobStatus; <> <> <<>> <> <<>> Busy: ERROR = 0; -- service cannot accept a new request at this time ConnectionError: ERROR [problem: ConnectionProblem] = 11; InsufficientSpoolSpace: ERROR = 1; -- service does not have enough space to spool a new request InvalidPrintParameters: ERROR = 2; -- call to Print specified inconsistent arguments MasterTooLarge: ERROR = 3; -- master is too large for the printer service to ever accept MediumUnavailable: ERROR = 5; -- service is not accepting any remote procedure calls ServiceUnavailable: ERROR = 4; SpoolingDisabled: ERROR = 6; -- service is not accepting print requests SpoolingQueueFull: ERROR = 7; -- service does not have enough space to accept a new request SystemError: ERROR = 8; -- service is in an internally inconsistent state TooManyClients: ERROR = 9; -- service does not have enough resources to open a new connection TransferError: ERROR [problem: TransferProblem] = 12; Undefined: ERROR [problem: UndefinedProblem] = 10; -- some procedure in Printing is not implemented <> GetPrinterProperties: PROCEDURE RETURNS [properties: PrinterProperties] REPORTS [ServiceUnavailable, SystemError, Undefined] = 1; GetPrintRequestStatus: PROCEDURE [printRequestID: RequestID] RETURNS [status: RequestStatus] REPORTS [ServiceUnavailable, SystemError, Undefined] = 2; GetPrinterStatus: PROCEDURE RETURNS [status: PrinterStatus] REPORTS [ServiceUnavailable, SystemError, Undefined] = 3; Print: PROCEDURE [master: Source, printAttributes: PrintAttributes, printOptions: PrintOptions] RETURNS [printRequestID: RequestID] REPORTS [Busy, ConnectionError, InsufficientSpoolSpace, InvalidPrintParameters, MasterTooLarge, MediumUnavailable, ServiceUnavailable, SpoolingDisabled, SpoolingQueueFull, SystemError, TooManyClients, TransferError, Undefined] = 0; END.