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