PrintingP4V3AuxImpl.Mesa
Copyright (C) 1986 by Xerox Corporation. All rights reserved.
Generated by BJackson.pa at December 6, 1986 10:10:11 pm PST
using Sirocco [1.0] of September 25, 1986 3:44:23 am PDT
DIRECTORY
Convert,
Rope,
PrintingP4V3,
PrintingP4V3Aux;
PrintingP4V3AuxImpl: CEDAR PROGRAM
IMPORTS Convert, Rope
EXPORTS PrintingP4V3Aux ~ {
OPEN PrintingP4V3, PrintingP4V3Aux;
ROPE: TYPE ~ Rope.ROPE;
ExposeAttribute: PUBLIC PROC [c: Attribute, level: NAT] RETURNS [x: ROPE] ~ {
x ← "Attribute(";
x ← Rope.Concat[x, ExposeAttributeKind[c.type, (level+1)]];
x ← Rope.Concat[x, "): "];
WITH c SELECT FROM
v: printObjectName Attribute => {
x ← Rope.Concat[x, Convert.RopeFromRope[v.printObjectName]];
};
v: printObjectCreateDate Attribute => {
x ← Rope.Concat[x, Convert.RopeFromCard[v.printObjectCreateDate]];
};
v: senderName Attribute => {
x ← Rope.Concat[x, Convert.RopeFromRope[v.senderName]];
};
ENDCASE => { x ← Rope.Concat[x, "Unknown"]; };
};
ExposePrintAttributes: PUBLIC PROC [s: PrintAttributes, level: NAT] RETURNS [x: ROPE] ~ {
x ← "PrintAttributes: [";
FOR i: CARDINAL IN [0..s.length) DO
x ← Rope.Concat[x, "\n"];
FOR i: CARDINAL IN [0..2*level) DO x ← Rope.Concat[x, " "]; ENDLOOP;
x ← Rope.Concat[x, "("];
x ← Rope.Concat[x, Convert.RopeFromCard[i]];
x ← Rope.Concat[x, ") "];
x ← Rope.Concat[x, ExposeAttribute[s[i], (level+1)]];
ENDLOOP;
x ← Rope.Concat[x, "]"];
};
ExposeInterpressMasterStatus: PUBLIC PROC [e: InterpressMasterStatus, level: NAT] RETURNS [x: ROPE] ~ {
SELECT e FROM
pending => x ← "pending";
inProgress => x ← "inProgress";
completed => x ← "completed";
completedWithWarning => x ← "completedWithWarning";
unknown => x ← "unknown";
rejected => x ← "rejected";
aborted => x ← "aborted";
canceled => x ← "canceled";
held => x ← "held";
ENDCASE => x ← "unknown InterpressMasterStatus";
};
ExposeStatusKind: PUBLIC PROC [e: StatusKind, level: NAT] RETURNS [x: ROPE] ~ {
SELECT e FROM
spooler => x ← "spooler";
formatter => x ← "formatter";
printer => x ← "printer";
media => x ← "media";
ENDCASE => x ← "unknown StatusKind";
};
ExposeJobStatusKind: PUBLIC PROC [e: JobStatusKind, level: NAT] RETURNS [x: ROPE] ~ {
SELECT e FROM
status => x ← "status";
statusMessage => x ← "statusMessage";
ENDCASE => x ← "unknown JobStatusKind";
};
ExposeEmptyRecord: PUBLIC PROC [--r: EmptyRecord,-- level: NAT] RETURNS [x: ROPE] ~ {
x ← "[";
x ← Rope.Concat[x, "]"];
};
ExposePaperKind: PUBLIC PROC [e: PaperKind, level: NAT] RETURNS [x: ROPE] ~ {
SELECT e FROM
unknown => x ← "unknown";
knownSize => x ← "knownSize";
otherSize => x ← "otherSize";
ENDCASE => x ← "unknown PaperKind";
};
ExposeTransferProblem: PUBLIC PROC [e: TransferProblem, level: NAT] RETURNS [x: ROPE] ~ {
SELECT e FROM
aborted => x ← "aborted";
formatIncorrect => x ← "formatIncorrect";
noRendezvous => x ← "noRendezvous";
wrongDirection => x ← "wrongDirection";
ENDCASE => x ← "unknown TransferProblem";
};
ExposeKnownPaperSize: PUBLIC PROC [e: KnownPaperSize, level: NAT] RETURNS [x: ROPE] ~ {
SELECT e FROM
usLetter => x ← "usLetter";
usLegal => x ← "usLegal";
a0 => x ← "a0";
a1 => x ← "a1";
a2 => x ← "a2";
a3 => x ← "a3";
a4 => x ← "a4";
a5 => x ← "a5";
a6 => x ← "a6";
a7 => x ← "a7";
a8 => x ← "a8";
a9 => x ← "a9";
isoB0 => x ← "isoB0";
isoB1 => x ← "isoB1";
isoB2 => x ← "isoB2";
isoB3 => x ← "isoB3";
isoB4 => x ← "isoB4";
isoB5 => x ← "isoB5";
isoB6 => x ← "isoB6";
isoB7 => x ← "isoB7";
isoB8 => x ← "isoB8";
isoB9 => x ← "isoB9";
isoB10 => x ← "isoB10";
jisB0 => x ← "jisB0";
jisB1 => x ← "jisB1";
jisB2 => x ← "jisB2";
jisB3 => x ← "jisB3";
jisB4 => x ← "jisB4";
jisB5 => x ← "jisB5";
jisB6 => x ← "jisB6";
jisB7 => x ← "jisB7";
jisB8 => x ← "jisB8";
jisB9 => x ← "jisB9";
jisB10 => x ← "jisB10";
a10 => x ← "a10";
ENDCASE => x ← "unknown KnownPaperSize";
};
ExposeOptionKind: PUBLIC PROC [e: OptionKind, level: NAT] RETURNS [x: ROPE] ~ {
SELECT e FROM
printObjectSize => x ← "printObjectSize";
recipientName => x ← "recipientName";
message => x ← "message";
copyCount => x ← "copyCount";
pagesToPrint => x ← "pagesToPrint";
mediumHint => x ← "mediumHint";
priorityHint => x ← "priorityHint";
releaseKey => x ← "releaseKey";
staple => x ← "staple";
twoSided => x ← "twoSided";
ENDCASE => x ← "unknown OptionKind";
};
ExposeMedia: PUBLIC PROC [s: Media, level: NAT] RETURNS [x: ROPE] ~ {
x ← "Media: [";
FOR i: CARDINAL IN [0..s.length) DO
x ← Rope.Concat[x, "\n"];
FOR i: CARDINAL IN [0..2*level) DO x ← Rope.Concat[x, " "]; ENDLOOP;
x ← Rope.Concat[x, "("];
x ← Rope.Concat[x, Convert.RopeFromCard[i]];
x ← Rope.Concat[x, ") "];
x ← Rope.Concat[x, ExposeMedium[s[i], (level+1)]];
ENDLOOP;
x ← Rope.Concat[x, "]"];
};
ExposePriority: PUBLIC PROC [e: Priority, level: NAT] RETURNS [x: ROPE] ~ {
SELECT e FROM
low => x ← "low";
normal => x ← "normal";
high => x ← "high";
ENDCASE => x ← "unknown Priority";
};
ExposeMarkingEngineStatus: PUBLIC PROC [e: MarkingEngineStatus, level: NAT] RETURNS [x: ROPE] ~ {
SELECT e FROM
available => x ← "available";
busy => x ← "busy";
disabled => x ← "disabled";
needsAttention => x ← "needsAttention";
needsKeyOperator => x ← "needsKeyOperator";
ENDCASE => x ← "unknown MarkingEngineStatus";
};
ExposeAttributeKind: PUBLIC PROC [e: AttributeKind, level: NAT] RETURNS [x: ROPE] ~ {
SELECT e FROM
printObjectName => x ← "printObjectName";
printObjectCreateDate => x ← "printObjectCreateDate";
senderName => x ← "senderName";
ENDCASE => x ← "unknown AttributeKind";
};
ExposePrintOptions: PUBLIC PROC [s: PrintOptions, level: NAT] RETURNS [x: ROPE] ~ {
x ← "PrintOptions: [";
FOR i: CARDINAL IN [0..s.length) DO
x ← Rope.Concat[x, "\n"];
FOR i: CARDINAL IN [0..2*level) DO x ← Rope.Concat[x, " "]; ENDLOOP;
x ← Rope.Concat[x, "("];
x ← Rope.Concat[x, Convert.RopeFromCard[i]];
x ← Rope.Concat[x, ") "];
x ← Rope.Concat[x, ExposeOption[s[i], (level+1)]];
ENDLOOP;
x ← Rope.Concat[x, "]"];
};
ExposeSpoolerStatus: PUBLIC PROC [e: SpoolerStatus, level: NAT] RETURNS [x: ROPE] ~ {
SELECT e FROM
available => x ← "available";
busy => x ← "busy";
disabled => x ← "disabled";
full => x ← "full";
ENDCASE => x ← "unknown SpoolerStatus";
};
ExposeServiceStatus: PUBLIC PROC [c: ServiceStatus, level: NAT] RETURNS [x: ROPE] ~ {
x ← "ServiceStatus(";
x ← Rope.Concat[x, ExposeStatusKind[c.type, (level+1)]];
x ← Rope.Concat[x, "): "];
WITH c SELECT FROM
v: spooler ServiceStatus => {
x ← Rope.Concat[x, ExposeSpoolerStatus[v.spooler, (level+1)]];
};
v: formatter ServiceStatus => {
x ← Rope.Concat[x, ExposeFormatterStatus[v.formatter, (level+1)]];
};
v: printer ServiceStatus => {
x ← Rope.Concat[x, ExposeMarkingEngineStatus[v.printer, (level+1)]];
};
v: media ServiceStatus => {
x ← Rope.Concat[x, ExposeMedia[v.media, (level+1)]];
};
ENDCASE => { x ← Rope.Concat[x, "Unknown"]; };
};
ExposePrinterProperties: PUBLIC PROC [s: PrinterProperties, level: NAT] RETURNS [x: ROPE] ~ {
x ← "PrinterProperties: [";
FOR i: CARDINAL IN [0..s.length) DO
x ← Rope.Concat[x, "\n"];
FOR i: CARDINAL IN [0..2*level) DO x ← Rope.Concat[x, " "]; ENDLOOP;
x ← Rope.Concat[x, "("];
x ← Rope.Concat[x, Convert.RopeFromCard[i]];
x ← Rope.Concat[x, ") "];
x ← Rope.Concat[x, ExposeProperty[s[i], (level+1)]];
ENDLOOP;
x ← Rope.Concat[x, "]"];
};
ExposePrinterStatus: PUBLIC PROC [s: PrinterStatus, level: NAT] RETURNS [x: ROPE] ~ {
x ← "PrinterStatus: [";
FOR i: CARDINAL IN [0..s.length) DO
x ← Rope.Concat[x, "\n"];
FOR i: CARDINAL IN [0..2*level) DO x ← Rope.Concat[x, " "]; ENDLOOP;
x ← Rope.Concat[x, "("];
x ← Rope.Concat[x, Convert.RopeFromCard[i]];
x ← Rope.Concat[x, ") "];
x ← Rope.Concat[x, ExposeServiceStatus[s[i], (level+1)]];
ENDLOOP;
x ← Rope.Concat[x, "]"];
};
ExposeProperty: PUBLIC PROC [c: Property, level: NAT] RETURNS [x: ROPE] ~ {
x ← "Property(";
x ← Rope.Concat[x, ExposePropertyKind[c.type, (level+1)]];
x ← Rope.Concat[x, "): "];
WITH c SELECT FROM
v: ppmedia Property => {
x ← Rope.Concat[x, ExposeMedia[v.ppmedia, (level+1)]];
};
v: ppstaple Property => {
x ← Rope.Concat[x, Convert.RopeFromBool[v.ppstaple]];
};
v: pptwoSided Property => {
x ← Rope.Concat[x, Convert.RopeFromBool[v.pptwoSided]];
};
ENDCASE => { x ← Rope.Concat[x, "Unknown"]; };
};
ExposeMediumKind: PUBLIC PROC [e: MediumKind, level: NAT] RETURNS [x: ROPE] ~ {
SELECT e FROM
paper => x ← "paper";
ENDCASE => x ← "unknown MediumKind";
};
ExposeRequestStatus: PUBLIC PROC [s: RequestStatus, level: NAT] RETURNS [x: ROPE] ~ {
x ← "RequestStatus: [";
FOR i: CARDINAL IN [0..s.length) DO
x ← Rope.Concat[x, "\n"];
FOR i: CARDINAL IN [0..2*level) DO x ← Rope.Concat[x, " "]; ENDLOOP;
x ← Rope.Concat[x, "("];
x ← Rope.Concat[x, Convert.RopeFromCard[i]];
x ← Rope.Concat[x, ") "];
x ← Rope.Concat[x, ExposeJobStatus[s[i], (level+1)]];
ENDLOOP;
x ← Rope.Concat[x, "]"];
};
ExposeRequestID: PUBLIC PROC [a: RequestID, level: NAT] RETURNS [x: ROPE] ~ {
x ← "RequestID: [";
FOR i: CARDINAL IN [0..4) DO
x ← Rope.Concat[x, Convert.RopeFromCard[a[i]]];
x ← Rope.Concat[x, ", "];
ENDLOOP;
x ← Rope.Concat[x, Convert.RopeFromCard[a[4]]];
x ← Rope.Concat[x, "]"];
};
ExposeJobStatus: PUBLIC PROC [c: JobStatus, level: NAT] RETURNS [x: ROPE] ~ {
x ← "JobStatus(";
x ← Rope.Concat[x, ExposeJobStatusKind[c.type, (level+1)]];
x ← Rope.Concat[x, "): "];
WITH c SELECT FROM
v: status JobStatus => {
x ← Rope.Concat[x, ExposeInterpressMasterStatus[v.status, (level+1)]];
};
v: statusMessage JobStatus => {
x ← Rope.Concat[x, Convert.RopeFromRope[v.statusMessage]];
};
ENDCASE => { x ← Rope.Concat[x, "Unknown"]; };
};
ExposeFormatterStatus: PUBLIC PROC [e: FormatterStatus, level: NAT] RETURNS [x: ROPE] ~ {
SELECT e FROM
available => x ← "available";
busy => x ← "busy";
disabled => x ← "disabled";
ENDCASE => x ← "unknown FormatterStatus";
};
ExposePaper: PUBLIC PROC [c: Paper, level: NAT] RETURNS [x: ROPE] ~ {
x ← "Paper(";
x ← Rope.Concat[x, ExposePaperKind[c.type, (level+1)]];
x ← Rope.Concat[x, "): "];
WITH c SELECT FROM
v: unknown Paper => {
x ← Rope.Concat[x, ExposeEmptyRecord[--v.unknown,-- (level+1)]];
};
v: knownSize Paper => {
x ← Rope.Concat[x, ExposeKnownPaperSize[v.knownSize, (level+1)]];
};
v: otherSize Paper => {
x ← Rope.Concat[x, ExposePaperDimensions[v.otherSize, (level+1)]];
};
ENDCASE => { x ← Rope.Concat[x, "Unknown"]; };
};
ExposePropertyKind: PUBLIC PROC [e: PropertyKind, level: NAT] RETURNS [x: ROPE] ~ {
SELECT e FROM
ppmedia => x ← "ppmedia";
ppstaple => x ← "ppstaple";
pptwoSided => x ← "pptwoSided";
ENDCASE => x ← "unknown PropertyKind";
};
ExposeOption: PUBLIC PROC [c: Option, level: NAT] RETURNS [x: ROPE] ~ {
x ← "Option(";
x ← Rope.Concat[x, ExposeOptionKind[c.type, (level+1)]];
x ← Rope.Concat[x, "): "];
WITH c SELECT FROM
v: printObjectSize Option => {
x ← Rope.Concat[x, Convert.RopeFromCard[v.printObjectSize]];
};
v: recipientName Option => {
x ← Rope.Concat[x, Convert.RopeFromRope[v.recipientName]];
};
v: message Option => {
x ← Rope.Concat[x, Convert.RopeFromRope[v.message]];
};
v: copyCount Option => {
x ← Rope.Concat[x, Convert.RopeFromCard[v.copyCount]];
};
v: pagesToPrint Option => {
x ← Rope.Concat[x, ExposeDocumentSubrange[v.pagesToPrint, (level+1)]];
};
v: mediumHint Option => {
x ← Rope.Concat[x, ExposeMedium[v.mediumHint, (level+1)]];
};
v: priorityHint Option => {
x ← Rope.Concat[x, ExposePriority[v.priorityHint, (level+1)]];
};
v: releaseKey Option => {
x ← Rope.Concat[x, Convert.RopeFromCard[v.releaseKey]];
};
v: staple Option => {
x ← Rope.Concat[x, Convert.RopeFromBool[v.staple]];
};
v: twoSided Option => {
x ← Rope.Concat[x, Convert.RopeFromBool[v.twoSided]];
};
ENDCASE => { x ← Rope.Concat[x, "Unknown"]; };
};
ExposeConnectionProblem: PUBLIC PROC [e: ConnectionProblem, level: NAT] RETURNS [x: ROPE] ~ {
SELECT e FROM
noRoute => x ← "noRoute";
noResponse => x ← "noResponse";
transmissionHardware => x ← "transmissionHardware";
transportTimeout => x ← "transportTimeout";
tooManyLocalConnections => x ← "tooManyLocalConnections";
tooManyRemoteConnections => x ← "tooManyRemoteConnections";
missingCourier => x ← "missingCourier";
missingProgram => x ← "missingProgram";
missingProcedure => x ← "missingProcedure";
protocolMismatch => x ← "protocolMismatch";
parameterInconsistency => x ← "parameterInconsistency";
invalidMessage => x ← "invalidMessage";
returnTimedOut => x ← "returnTimedOut";
otherCallProblem => x ← "otherCallProblem";
ENDCASE => x ← "unknown ConnectionProblem";
};
ExposePaperDimensions: PUBLIC PROC [r: PaperDimensions, level: NAT] RETURNS [x: ROPE] ~ {
x ← "[";
x ← Rope.Concat[x, "width: "];
x ← Rope.Concat[x, Convert.RopeFromCard[r.width]];
x ← Rope.Concat[x, ", "];
x ← Rope.Concat[x, "length: "];
x ← Rope.Concat[x, Convert.RopeFromCard[r.length]];
x ← Rope.Concat[x, "]"];
};
ExposeMedium: PUBLIC PROC [c: Medium, level: NAT] RETURNS [x: ROPE] ~ {
x ← "Medium(";
x ← Rope.Concat[x, ExposeMediumKind[c.type, (level+1)]];
x ← Rope.Concat[x, "): "];
WITH c SELECT FROM
v: paper Medium => {
x ← Rope.Concat[x, ExposePaper[v.paper, (level+1)]];
};
ENDCASE => { x ← Rope.Concat[x, "Unknown"]; };
};
ExposeDocumentSubrange: PUBLIC PROC [r: DocumentSubrange, level: NAT] RETURNS [x: ROPE] ~ {
x ← "[";
x ← Rope.Concat[x, "beginningPageNumber: "];
x ← Rope.Concat[x, Convert.RopeFromCard[r.beginningPageNumber]];
x ← Rope.Concat[x, ", "];
x ← Rope.Concat[x, "endingPageNumber: "];
x ← Rope.Concat[x, Convert.RopeFromCard[r.endingPageNumber]];
x ← Rope.Concat[x, "]"];
};
}...