File: PrintingP4V3.Mesa
Copyright c 1986 by Xerox Corporation. All rights reserved.
Automatically Generated by the Stub Generator on July 12, 1986 9:30:20 pm PDT
Tim Diebert: July 14, 1986 2:08:56 pm PDT
DIRECTORY
Rope,
CrRPC,
--TimeP15V2,-- BasicTime
AuthenticationP14V1,
BulkDataP0V1
;
PrintingP4V3: CEDAR DEFINITIONS ~ {
Printing3.cr
Copyright © 1986 by Xerox Corporation. All rights reserved.
Bill Jackson (bj) July 11, 1986 7:57:03 am PDT
Printing: PROGRAM 4 VERSION 3 = BEGIN
DEPENDS UPON
BulkData (0) VERSION 1,
Authentication (14) VERSION 1,
Time (15) VERSION 2;
Primitive types
Time: TYPE = Time.Time; -- the standard time and date format
UndefinedProblem: TYPE = CARDINAL;
Enumerated types
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 inoperable.
transportTimeout(3), -- the other party responded 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 vilation 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.
};
Array types
RequestID: TYPE = ARRAY 5 OF UNSPECIFIED; -- the standard time and date format
Record Types
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
];
Choice Types
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)
};
Sequence Types
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;
Constants
Initialized Constants
Remote Errors
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
Remote procedures
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: BulkData.Source, printAttributes: PrintAttributes, printOptions: PrintOptions]
RETURNS [printRequestID: RequestID]
REPORTS [Busy, ConnectionError, InsufficientSpoolSpace, InvalidPrintParameters, MasterTooLarge, MediumUnavailable, ServiceUnavailable, SpoolingDisabled, SpoolingQueueFull, SystemError, TooManyClients, TransferError, Undefined] = 0;
END.
ROPE: TYPE ~ Rope.ROPE;
Time: TYPE ~ BasicTime.GMT;
Handle: TYPE ~ CrRPC.Handle;
Property: TYPE ~ RECORD [
SELECT type: PropertyKind FROM
ppmedia => [ppmedia: Media],
ppstaple => [ppstaple: BOOLEAN],
pptwoSided => [pptwoSided: BOOLEAN]
ENDCASE
];
Print: PROC [--h: Handle, -- master: --BulkDataP0V1.Descriptor-- ROPE, printAttributes: PrintAttributes, printOptions: PrintOptions ] RETURNS [printRequestID: RequestID];
Busy: ERROR;
FormatterStatus: TYPE ~ MACHINE DEPENDENT {
available(0),
busy(1),
disabled(2)
};
PaperDimensions: TYPE ~ RECORD [
width: CARDINAL,
length: CARDINAL
];
GetPrinterProperties: PROC [--h: Handle--] RETURNS[properties: PrinterProperties ];
Medium: TYPE ~ RECORD [
SELECT type: MediumKind FROM
paper => [paper: Paper]
ENDCASE
];
MediumUnavailable: ERROR;
InvalidPrintParameters: ERROR;
PrinterProperties: TYPE ~ REF PrinterPropertiesObject;
PrinterPropertiesObject: TYPE ~ MACHINE DEPENDENT RECORD [
body: PACKED SEQUENCE length: CARDINAL OF Property
];
SpoolerStatus: TYPE ~ MACHINE DEPENDENT {
available(0),
busy(1),
disabled(2),
full(3)
};
TransferError: ERROR[problem: TransferProblem];
UndefinedProblem: TYPE ~ CARDINAL;
PaperKind: TYPE ~ MACHINE DEPENDENT {
unknown(0),
knownSize(1),
otherSize(2)
};
TooManyClients: ERROR;
RequestID: TYPE ~ ARRAY [0..5) OF CARDINAL;
Paper: TYPE ~ RECORD [
SELECT type: PaperKind FROM
unknown => [unknown: EmptyRecord],
knownSize => [knownSize: KnownPaperSize],
otherSize => [otherSize: PaperDimensions]
ENDCASE
];
ConnectionProblem: TYPE ~ MACHINE DEPENDENT {
noRoute(0),
noResponse(1),
transmissionHardware(2),
transportTimeout(3),
tooManyLocalConnections(4),
tooManyRemoteConnections(5),
missingCourier(6),
missingProgram(7),
missingProcedure(8),
protocolMismatch(9),
parameterInconsistency(10),
invalidMessage(11),
returnTimedOut(12),
otherCallProblem(65535)
};
ConnectionError: ERROR[problem: ConnectionProblem];
SpoolingDisabled: ERROR;
GetPrintRequestStatus: PROC [--h: Handle, -- printRequestID: RequestID ] RETURNS[status: RequestStatus ];
SpoolingQueueFull: ERROR;
JobStatusKind: TYPE ~ MACHINE DEPENDENT {
status(0),
statusMessage(1)
};
RequestStatus: TYPE ~ REF RequestStatusObject;
RequestStatusObject: TYPE ~ MACHINE DEPENDENT RECORD [
body: PACKED SEQUENCE length: CARDINAL OF JobStatus
];
InterpressMasterStatus: TYPE ~ MACHINE DEPENDENT {
pending(0),
inProgress(1),
completed(2),
completedWithWarning(3),
unknown(4),
rejected(5),
aborted(6),
canceled(7),
held(8)
};
Media: TYPE ~ REF MediaObject;
MediaObject: TYPE ~ MACHINE DEPENDENT RECORD [
body: PACKED SEQUENCE length: CARDINAL OF Medium
];
PrintAttributes: TYPE ~ REF PrintAttributesObject;
PrintAttributesObject: TYPE ~ MACHINE DEPENDENT RECORD [
body: PACKED SEQUENCE length: CARDINAL OF Attribute
];
ServiceUnavailable: ERROR;
ServiceStatus: TYPE ~ RECORD [
SELECT type: StatusKind FROM
spooler => [spooler: SpoolerStatus],
formatter => [formatter: FormatterStatus],
printer => [printer: MarkingEngineStatus],
media => [media: Media]
ENDCASE
];
Option: TYPE ~ RECORD [
SELECT type: OptionKind FROM
printObjectSize => [printObjectSize: CARD],
recipientName => [recipientName: ROPE],
message => [message: ROPE],
copyCount => [copyCount: CARDINAL],
pagesToPrint => [pagesToPrint: DocumentSubrange],
mediumHint => [mediumHint: Medium],
priorityHint => [priorityHint: Priority],
releaseKey => [releaseKey: CARDINAL],
staple => [staple: BOOLEAN],
twoSided => [twoSided: BOOLEAN]
ENDCASE
];
AttributeKind: TYPE ~ MACHINE DEPENDENT {
printObjectName(0),
printObjectCreateDate(1),
senderName(2)
};
JobStatus: TYPE ~ RECORD [
SELECT type: JobStatusKind FROM
status => [status: InterpressMasterStatus],
statusMessage => [statusMessage: ROPE]
ENDCASE
];
Priority: TYPE ~ MACHINE DEPENDENT {
low(0),
normal(1),
high(2)
};
TransferProblem: TYPE ~ MACHINE DEPENDENT {
aborted(0),
formatIncorrect(2),
noRendezvous(3),
wrongDirection(4)
};
InsufficientSpoolSpace: ERROR;
Attribute: TYPE ~ RECORD [
SELECT type: AttributeKind FROM
printObjectName => [printObjectName: ROPE],
printObjectCreateDate => [printObjectCreateDate: Time],
senderName => [senderName: ROPE]
ENDCASE
];
PrinterStatus: TYPE ~ REF PrinterStatusObject;
PrinterStatusObject: TYPE ~ MACHINE DEPENDENT RECORD [
body: PACKED SEQUENCE length: CARDINAL OF ServiceStatus
];
MarkingEngineStatus: TYPE ~ MACHINE DEPENDENT {
available(0),
busy(1),
disabled(2),
needsAttention(3),
needsKeyOperator(4)
};
KnownPaperSize: TYPE ~ MACHINE DEPENDENT {
usLetter(1),
usLegal(2),
a0(3),
a1(4),
a2(5),
a3(6),
a4(7),
a5(8),
a6(9),
a7(10),
a8(11),
a9(12),
isoB0(13),
isoB1(14),
isoB2(15),
isoB3(16),
isoB4(17),
isoB5(18),
isoB6(19),
isoB7(20),
isoB8(21),
isoB9(22),
isoB10(23),
jisB0(24),
jisB1(25),
jisB2(26),
jisB3(27),
jisB4(28),
jisB5(29),
jisB6(30),
jisB7(31),
jisB8(32),
jisB9(33),
jisB10(34),
a10(35)
};
OptionKind: TYPE ~ MACHINE DEPENDENT {
printObjectSize(0),
recipientName(1),
message(2),
copyCount(3),
pagesToPrint(4),
mediumHint(5),
priorityHint(6),
releaseKey(7),
staple(8),
twoSided(9)
};
SystemError: ERROR;
Undefined: ERROR[problem: CARDINAL];
DocumentSubrange: TYPE ~ RECORD [
beginningPageNumber: CARDINAL,
endingPageNumber: CARDINAL
];
MediumKind: TYPE ~ MACHINE DEPENDENT {
paper(0)
};
PropertyKind: TYPE ~ MACHINE DEPENDENT {
ppmedia(0),
ppstaple(1),
pptwoSided(2)
};
MasterTooLarge: ERROR;
GetPrinterStatus: PROC [--h: Handle--] RETURNS[status: PrinterStatus ];
EmptyRecord: TYPE ~ RECORD [];
PrintOptions: TYPE ~ REF PrintOptionsObject;
PrintOptionsObject: TYPE ~ MACHINE DEPENDENT RECORD [
body: PACKED SEQUENCE length: CARDINAL OF Option
];
StatusKind: TYPE ~ MACHINE DEPENDENT {
spooler(0),
formatter(1),
printer(2),
media(3)
};
}.