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