Unmarshal / Marshal Procs --
UProc46:
PROC [h: CrRPC.Handle, s: CrRPC.
STREAM]
RETURNS [res: PrintAttributes] ~ {
{
length50: CARDINAL ~ CrRPC.GetCard16[s];
res ← NEW[PrintAttributesObject[length50]];
FOR i49:
CARDINAL
IN [0..length50)
DO
res.body[i49] ← UProc51[h, s];
ENDLOOP;
};
};
UProc47:
PROC [h: CrRPC.Handle, s: CrRPC.
STREAM]
RETURNS [res: PrintOptions] ~ {
{
length53: CARDINAL ~ CrRPC.GetCard16[s];
res ← NEW[PrintOptionsObject[length53]];
FOR i52:
CARDINAL
IN [0..length53)
DO
res.body[i52] ← UProc54[h, s];
ENDLOOP;
};
};
MProc43:
PROC [h: CrRPC.Handle, s: CrRPC.
STREAM, val: RequestStatus] ~ {
CrRPC.PutCard16[s, val.length];
FOR i55:
CARDINAL
IN [0..val.length)
DO
MProc56[h, s, val.body[i55]];
ENDLOOP;
};
UProc54:
PROC [h: CrRPC.Handle, s: CrRPC.
STREAM]
RETURNS [res: Option] ~ {
{
tag57: OptionKind ~ VAL[CrRPC.GetCard16[s]];
SELECT tag57
FROM
printObjectSize => {
temp58: CARD32;
temp58 ← CrRPC.GetCard32[s];
res ← NEW[OptionObject.printObjectSize ← [printObjectSize[temp58]]] };
recipientName => {
temp58: ROPE;
temp58 ← CrRPC.GetRope[s];
res ← NEW[OptionObject.recipientName ← [recipientName[temp58]]] };
message => {
temp58: ROPE;
temp58 ← CrRPC.GetRope[s];
res ← NEW[OptionObject.message ← [message[temp58]]] };
copyCount => {
temp58: CARD16;
temp58 ← CrRPC.GetCard16[s];
res ← NEW[OptionObject.copyCount ← [copyCount[temp58]]] };
pagesToPrint => {
temp58: DocumentSubrange;
temp58.beginningPageNumber ← CrRPC.GetCard16[s];
temp58.endingPageNumber ← CrRPC.GetCard16[s];
res ← NEW[OptionObject.pagesToPrint ← [pagesToPrint[temp58]]] };
mediumHint => {
temp58: Medium;
temp58 ← UProc59[h, s];
res ← NEW[OptionObject.mediumHint ← [mediumHint[temp58]]] };
priorityHint => {
temp58: Priority;
temp58 ← VAL[CrRPC.GetCard16[s]];
res ← NEW[OptionObject.priorityHint ← [priorityHint[temp58]]] };
releaseKey => {
temp58: CARD16;
temp58 ← CrRPC.GetCard16[s];
res ← NEW[OptionObject.releaseKey ← [releaseKey[temp58]]] };
staple => {
temp58: BOOLEAN;
temp58 ← CrRPC.GetBool[s];
res ← NEW[OptionObject.staple ← [staple[temp58]]] };
twoSided => {
temp58: BOOLEAN;
temp58 ← CrRPC.GetBool[s];
res ← NEW[OptionObject.twoSided ← [twoSided[temp58]]] };
ENDCASE => ERROR;
};
};
MProc45:
PROC [h: CrRPC.Handle, s: CrRPC.
STREAM, val: PrinterStatus] ~ {
CrRPC.PutCard16[s, val.length];
FOR i60:
CARDINAL
IN [0..val.length)
DO
MProc61[h, s, val.body[i60]];
ENDLOOP;
};
MProc56:
PROC [h: CrRPC.Handle, s: CrRPC.
STREAM, val: JobStatus] ~ {
CrRPC.PutCard16[s, ORD[val.type]];
WITH val
SELECT
FROM
it:
REF JobStatusObject.status => {
CrRPC.PutCard16[s, ORD[it^.status]];
};
it:
REF JobStatusObject.statusMessage => {
CrRPC.PutRope[s, it^.statusMessage];
};
ENDCASE;
};
MProc44:
PROC [h: CrRPC.Handle, s: CrRPC.
STREAM, val: PrinterProperties] ~ {
CrRPC.PutCard16[s, val.length];
FOR i63:
CARDINAL
IN [0..val.length)
DO
MProc64[h, s, val.body[i63]];
ENDLOOP;
};
UProc51:
PROC [h: CrRPC.Handle, s: CrRPC.
STREAM]
RETURNS [res: Attribute] ~ {
{
tag65: AttributeKind ~ VAL[CrRPC.GetCard16[s]];
SELECT tag65
FROM
printObjectName => {
temp66: ROPE;
temp66 ← CrRPC.GetRope[s];
res ← NEW[AttributeObject.printObjectName ← [printObjectName[temp66]]] };
printObjectCreateDate => {
temp66: CARD32;
temp66 ← CrRPC.GetCard32[s];
res ← NEW[AttributeObject.printObjectCreateDate ← [printObjectCreateDate[temp66]]] };
senderName => {
temp66: ROPE;
temp66 ← CrRPC.GetRope[s];
res ← NEW[AttributeObject.senderName ← [senderName[temp66]]] };
ENDCASE => ERROR;
};
};
MProc61:
PROC [h: CrRPC.Handle, s: CrRPC.
STREAM, val: ServiceStatus] ~ {
CrRPC.PutCard16[s, ORD[val.type]];
WITH val
SELECT
FROM
it:
REF ServiceStatusObject.spooler => {
CrRPC.PutCard16[s, ORD[it^.spooler]];
};
it:
REF ServiceStatusObject.formatter => {
CrRPC.PutCard16[s, ORD[it^.formatter]];
};
it:
REF ServiceStatusObject.printer => {
CrRPC.PutCard16[s, ORD[it^.printer]];
};
it:
REF ServiceStatusObject.media => {
MProc68[h, s, it^.media];
};
ENDCASE;
};
MProc64:
PROC [h: CrRPC.Handle, s: CrRPC.
STREAM, val: Property] ~ {
CrRPC.PutCard16[s, ORD[val.type]];
WITH val
SELECT
FROM
it:
REF PropertyObject.ppmedia => {
MProc68[h, s, it^.ppmedia];
};
it:
REF PropertyObject.ppstaple => {
CrRPC.PutBool[s, it^.ppstaple];
};
it:
REF PropertyObject.pptwoSided => {
CrRPC.PutBool[s, it^.pptwoSided];
};
ENDCASE;
};
UProc59:
PROC [h: CrRPC.Handle, s: CrRPC.
STREAM]
RETURNS [res: Medium] ~ {
{
tag70: MediumKind ~ VAL[CrRPC.GetCard16[s]];
SELECT tag70
FROM
paper => {
temp71: Paper;
temp71 ← UProc72[h, s];
res ← NEW[MediumObject.paper ← [paper[temp71]]] };
ENDCASE => ERROR;
};
};
MProc68:
PROC [h: CrRPC.Handle, s: CrRPC.
STREAM, val: Media] ~ {
CrRPC.PutCard16[s, val.length];
FOR i73:
CARDINAL
IN [0..val.length)
DO
MProc74[h, s, val.body[i73]];
ENDLOOP;
};
UProc72:
PROC [h: CrRPC.Handle, s: CrRPC.
STREAM]
RETURNS [res: Paper] ~ {
{
tag75: PaperKind ~ VAL[CrRPC.GetCard16[s]];
SELECT tag75
FROM
unknown => {
temp76: EmptyRecord;
temp76.null ← 0;
res ← NEW[PaperObject.unknown ← [unknown[temp76]]] };
knownSize => {
temp76: KnownPaperSize;
temp76 ← VAL[CrRPC.GetCard16[s]];
res ← NEW[PaperObject.knownSize ← [knownSize[temp76]]] };
otherSize => {
temp76: PaperDimensions;
temp76.width ← CrRPC.GetCard16[s];
temp76.length ← CrRPC.GetCard16[s];
res ← NEW[PaperObject.otherSize ← [otherSize[temp76]]] };
ENDCASE => ERROR;
};
};
MProc74:
PROC [h: CrRPC.Handle, s: CrRPC.
STREAM, val: Medium] ~ {
CrRPC.PutCard16[s, ORD[val.type]];
WITH val
SELECT
FROM
it:
REF MediumObject.paper => {
MProc78[h, s, it^.paper];
};
ENDCASE;
};
MProc78:
PROC [h: CrRPC.Handle, s: CrRPC.
STREAM, val: Paper] ~ {
CrRPC.PutCard16[s, ORD[val.type]];
WITH val
SELECT
FROM
it:
REF PaperObject.unknown => {
NULL; -- RECORD [] --
};
it:
REF PaperObject.knownSize => {
CrRPC.PutCard16[s, ORD[it^.knownSize]];
};
it:
REF PaperObject.otherSize => {
CrRPC.PutCard16[s, it^.otherSize.width];
CrRPC.PutCard16[s, it^.otherSize.length];
};
ENDCASE;
};