DIRECTORY CrRPC, TimeP15V2, AuthenticationP14V2, BulkDataP0V1, PrintingP4V3; PrintingP4V3ClientImpl: CEDAR PROGRAM IMPORTS CrRPC EXPORTS PrintingP4V3 ~ { OPEN PrintingP4V3; ConnectionError: PUBLIC ConnectionErrorType ~ CODE; SpoolingQueueFull: PUBLIC SpoolingQueueFullType ~ CODE; SystemError: PUBLIC SystemErrorType ~ CODE; InsufficientSpoolSpace: PUBLIC InsufficientSpoolSpaceType ~ CODE; Busy: PUBLIC BusyType ~ CODE; TransferError: PUBLIC TransferErrorType ~ CODE; SpoolingDisabled: PUBLIC SpoolingDisabledType ~ CODE; Undefined: PUBLIC UndefinedType ~ CODE; MediumUnavailable: PUBLIC MediumUnavailableType ~ CODE; InvalidPrintParameters: PUBLIC InvalidPrintParametersType ~ CODE; MasterTooLarge: PUBLIC MasterTooLargeType ~ CODE; ServiceUnavailable: PUBLIC ServiceUnavailableType ~ CODE; TooManyClients: PUBLIC TooManyClientsType ~ CODE; GetError: CrRPC.GetErrorProc ~ { SELECT errNum FROM 11 => { problem: ConnectionProblem; problem ¬ VAL[CrRPC.GetCard16[s]]; ERROR ConnectionError[problem] }; 7 => ERROR SpoolingQueueFull[]; 8 => ERROR SystemError[]; 1 => ERROR InsufficientSpoolSpace[]; 0 => ERROR Busy[]; 12 => { problem: TransferProblem; problem ¬ VAL[CrRPC.GetCard16[s]]; ERROR TransferError[problem] }; 6 => ERROR SpoolingDisabled[]; 10 => { problem: CARD16; problem ¬ CrRPC.GetCard16[s]; ERROR Undefined[problem] }; 4 => ERROR MediumUnavailable[]; 2 => ERROR InvalidPrintParameters[]; 3 => ERROR MasterTooLarge[]; 5 => ERROR ServiceUnavailable[]; 9 => ERROR TooManyClients[]; ENDCASE => { ERROR CrRPC.Error[h, remoteError, "Unexpected Remote Error"]; }; }; GetPrinterProperties: PUBLIC GetPrinterPropertiesType ~ { PutArgs: CrRPC.PutArgsProc ~ { }; GetResults: CrRPC.GetResultsProc ~ { properties ¬ UProc1[h, s]; }; CrRPC.Call[h~h, remotePgm~4, remotePgmVersion~3, remoteProc~1 , putArgs~PutArgs, getResults~GetResults, getError~GetError]; }; Print: PUBLIC PrintType ~ { PutArgs: CrRPC.PutArgsProc ~ { CrRPC.PutBulkDataSource[h, s, master]; MProc2[h, s, printAttributes]; MProc3[h, s, printOptions]; }; GetResults: CrRPC.GetResultsProc ~ { FOR i4: CARDINAL IN [0..5) DO printRequestID[i4] ¬ CrRPC.GetCard16[s]; ENDLOOP; }; CrRPC.Call[h~h, remotePgm~4, remotePgmVersion~3, remoteProc~0 , putArgs~PutArgs, getResults~GetResults, getError~GetError]; }; GetPrintRequestStatus: PUBLIC GetPrintRequestStatusType ~ { PutArgs: CrRPC.PutArgsProc ~ { FOR i5: CARDINAL IN [0..5) DO CrRPC.PutCard16[s, printRequestID[i5]]; ENDLOOP; }; GetResults: CrRPC.GetResultsProc ~ { status ¬ UProc6[h, s]; }; CrRPC.Call[h~h, remotePgm~4, remotePgmVersion~3, remoteProc~2 , putArgs~PutArgs, getResults~GetResults, getError~GetError]; }; GetPrinterStatus: PUBLIC GetPrinterStatusType ~ { PutArgs: CrRPC.PutArgsProc ~ { }; GetResults: CrRPC.GetResultsProc ~ { status ¬ UProc7[h, s]; }; CrRPC.Call[h~h, remotePgm~4, remotePgmVersion~3, remoteProc~3 , putArgs~PutArgs, getResults~GetResults, getError~GetError]; }; MProc2: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: PrintAttributes] ~ { CrRPC.PutCard16[s, val.length]; FOR i8: CARDINAL IN [0..val.length) DO MProc9[h, s, val.body[i8]]; ENDLOOP; }; MProc9: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: Attribute] ~ { CrRPC.PutCard16[s, ORD[val.type]]; WITH val SELECT FROM it: REF AttributeObject.printObjectName => { CrRPC.PutRope[s, it­.printObjectName]; }; it: REF AttributeObject.printObjectCreateDate => { CrRPC.PutCard32[s, it­.printObjectCreateDate]; }; it: REF AttributeObject.senderName => { CrRPC.PutRope[s, it­.senderName]; }; ENDCASE; }; UProc1: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: PrinterProperties] ~ { { length12: CARDINAL ~ CrRPC.GetCard16[s]; res ¬ NEW[PrinterPropertiesObject[length12]]; FOR i11: CARDINAL IN [0..length12) DO res.body[i11] ¬ UProc13[h, s]; ENDLOOP; }; }; UProc6: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: RequestStatus] ~ { { length15: CARDINAL ~ CrRPC.GetCard16[s]; res ¬ NEW[RequestStatusObject[length15]]; FOR i14: CARDINAL IN [0..length15) DO res.body[i14] ¬ UProc16[h, s]; ENDLOOP; }; }; MProc3: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: PrintOptions] ~ { CrRPC.PutCard16[s, val.length]; FOR i17: CARDINAL IN [0..val.length) DO MProc18[h, s, val.body[i17]]; ENDLOOP; }; UProc7: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: PrinterStatus] ~ { { length20: CARDINAL ~ CrRPC.GetCard16[s]; res ¬ NEW[PrinterStatusObject[length20]]; FOR i19: CARDINAL IN [0..length20) DO res.body[i19] ¬ UProc21[h, s]; ENDLOOP; }; }; UProc16: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: JobStatus] ~ { { tag22: JobStatusKind ~ VAL[CrRPC.GetCard16[s]]; SELECT tag22 FROM status => { temp23: InterpressMasterStatus; temp23 ¬ VAL[CrRPC.GetCard16[s]]; res ¬ NEW[JobStatusObject.status ¬ [status[temp23]]] }; statusMessage => { temp23: ROPE; temp23 ¬ CrRPC.GetRope[s]; res ¬ NEW[JobStatusObject.statusMessage ¬ [statusMessage[temp23]]] }; ENDCASE => ERROR; }; }; UProc13: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: Property] ~ { { tag24: PropertyKind ~ VAL[CrRPC.GetCard16[s]]; SELECT tag24 FROM ppmedia => { temp25: Media; temp25 ¬ UProc26[h, s]; res ¬ NEW[PropertyObject.ppmedia ¬ [ppmedia[temp25]]] }; ppstaple => { temp25: BOOLEAN; temp25 ¬ CrRPC.GetBool[s]; res ¬ NEW[PropertyObject.ppstaple ¬ [ppstaple[temp25]]] }; pptwoSided => { temp25: BOOLEAN; temp25 ¬ CrRPC.GetBool[s]; res ¬ NEW[PropertyObject.pptwoSided ¬ [pptwoSided[temp25]]] }; ENDCASE => ERROR; }; }; UProc21: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: ServiceStatus] ~ { { tag27: StatusKind ~ VAL[CrRPC.GetCard16[s]]; SELECT tag27 FROM spooler => { temp28: SpoolerStatus; temp28 ¬ VAL[CrRPC.GetCard16[s]]; res ¬ NEW[ServiceStatusObject.spooler ¬ [spooler[temp28]]] }; formatter => { temp28: FormatterStatus; temp28 ¬ VAL[CrRPC.GetCard16[s]]; res ¬ NEW[ServiceStatusObject.formatter ¬ [formatter[temp28]]] }; printer => { temp28: MarkingEngineStatus; temp28 ¬ VAL[CrRPC.GetCard16[s]]; res ¬ NEW[ServiceStatusObject.printer ¬ [printer[temp28]]] }; media => { temp28: Media; temp28 ¬ UProc26[h, s]; res ¬ NEW[ServiceStatusObject.media ¬ [media[temp28]]] }; ENDCASE => ERROR; }; }; MProc18: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: Option] ~ { CrRPC.PutCard16[s, ORD[val.type]]; WITH val SELECT FROM it: REF OptionObject.printObjectSize => { CrRPC.PutCard32[s, it­.printObjectSize]; }; it: REF OptionObject.recipientName => { CrRPC.PutRope[s, it­.recipientName]; }; it: REF OptionObject.message => { CrRPC.PutRope[s, it­.message]; }; it: REF OptionObject.copyCount => { CrRPC.PutCard16[s, it­.copyCount]; }; it: REF OptionObject.pagesToPrint => { CrRPC.PutCard16[s, it­.pagesToPrint.beginningPageNumber]; CrRPC.PutCard16[s, it­.pagesToPrint.endingPageNumber]; }; it: REF OptionObject.mediumHint => { MProc30[h, s, it­.mediumHint]; }; it: REF OptionObject.priorityHint => { CrRPC.PutCard16[s, ORD[it­.priorityHint]]; }; it: REF OptionObject.releaseKey => { CrRPC.PutCard16[s, it­.releaseKey]; }; it: REF OptionObject.staple => { CrRPC.PutBool[s, it­.staple]; }; it: REF OptionObject.twoSided => { CrRPC.PutBool[s, it­.twoSided]; }; ENDCASE; }; UProc26: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: Media] ~ { { length32: CARDINAL ~ CrRPC.GetCard16[s]; res ¬ NEW[MediaObject[length32]]; FOR i31: CARDINAL IN [0..length32) DO res.body[i31] ¬ UProc33[h, s]; ENDLOOP; }; }; MProc30: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: Medium] ~ { CrRPC.PutCard16[s, ORD[val.type]]; WITH val SELECT FROM it: REF MediumObject.paper => { MProc35[h, s, it­.paper]; }; ENDCASE; }; UProc33: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: Medium] ~ { { tag36: MediumKind ~ VAL[CrRPC.GetCard16[s]]; SELECT tag36 FROM paper => { temp37: Paper; temp37 ¬ UProc38[h, s]; res ¬ NEW[MediumObject.paper ¬ [paper[temp37]]] }; ENDCASE => ERROR; }; }; MProc35: 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; }; UProc38: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: Paper] ~ { { tag40: PaperKind ~ VAL[CrRPC.GetCard16[s]]; SELECT tag40 FROM unknown => { temp41: EmptyRecord; temp41.null ¬ 0; res ¬ NEW[PaperObject.unknown ¬ [unknown[temp41]]] }; knownSize => { temp41: KnownPaperSize; temp41 ¬ VAL[CrRPC.GetCard16[s]]; res ¬ NEW[PaperObject.knownSize ¬ [knownSize[temp41]]] }; otherSize => { temp41: PaperDimensions; temp41.width ¬ CrRPC.GetCard16[s]; temp41.length ¬ CrRPC.GetCard16[s]; res ¬ NEW[PaperObject.otherSize ¬ [otherSize[temp41]]] }; ENDCASE => ERROR; }; }; }...  PrintingP4V3ClientImpl.mesa Copyright Σ 1989 b, 1992y Xerox Corporation. All rights reserved. Generated by foote at January 8, 1992 8:07:10 am PST using Sirocco [2.0] of January 18, 2036 7:14:05 pm PST Errors GetErrorProc Remote Procedures -- Unmarshal / Marshal Procs -- Κ ί–(cedarcode) style•NewlineDelimiter ™šœ™Jšœ Οeœ6™BJšœ4™4Jšœ6™6Icode˜—šΟk ˜ K˜K˜ K˜K˜ K˜ —K˜šΟnœžœž˜%Kšžœ˜ Kšžœ˜Kšžœ˜—K˜šœ™K˜K˜KšŸœžœžœ˜3K˜KšŸœžœžœ˜7K˜KšŸ œžœžœ˜+K˜KšŸœžœžœ˜AK˜KšŸœžœ žœ˜K˜KšŸ œžœžœ˜/K˜KšŸœžœžœ˜5K˜KšŸ œžœžœ˜'K˜KšŸœžœžœ˜7K˜KšŸœžœžœ˜AK˜KšŸœžœžœ˜1K˜KšŸœžœžœ˜9K˜KšŸœžœžœ˜1K˜—šœ ™ K˜šŸœ˜ šžœž˜˜K˜Kšœ žœ˜"Kšžœ˜K˜—Kšœžœ˜ Kšœžœ˜Kšœžœ˜%Kšœžœ˜˜K˜Kšœ žœ˜"Kšžœ˜K˜—Kšœžœ˜˜Kšœ žœ˜K˜Kšžœ˜K˜—Kšœžœ˜ Kšœžœ˜%Kšœžœ˜Kšœžœ˜!Kšœžœ˜šžœ˜ Kšžœ8˜=K˜——K˜—K˜—šœ™K˜šŸœžœ˜9šŸœ˜K˜—šŸ œ˜$K˜K˜K˜—K˜{K˜—K˜šŸœžœ˜šŸœ˜K˜&K˜K˜K˜—šŸ œ˜$šžœžœžœž˜K˜(Kšžœ˜—K˜K˜—K˜{K˜—K˜šŸœžœ˜;šŸœ˜šžœžœžœž˜K˜'Kšžœ˜—K˜—šŸ œ˜$K˜K˜K˜—K˜{K˜—K˜šŸœžœ˜1šŸœ˜K˜—šŸ œ˜$K˜K˜K˜—K˜{K˜—K˜—šœ™K˜K˜šŸœžœžœ˜IK˜šžœžœžœž˜&K˜Kšžœ˜—K˜—K˜šŸœžœžœ˜CKšœžœ ˜"šžœžœž˜šœžœ%˜,K˜&K˜—šœžœ+˜2K˜.K˜—šœžœ ˜'K˜!K˜—Kšžœ˜—K˜—K˜šŸœžœžœžœ˜T˜Kšœ žœ˜(Kšœžœ$˜.šžœžœžœž˜%K˜Kšžœ˜—K˜—K˜—K˜šŸœžœžœžœ˜P˜Kšœ žœ˜(Kšœžœ ˜*šžœžœžœž˜%K˜Kšžœ˜—K˜—K˜—K˜šŸœžœžœ˜FK˜šžœžœžœž˜'K˜Kšžœ˜—K˜—K˜šŸœžœžœžœ˜P˜Kšœ žœ˜(Kšœžœ ˜*šžœžœžœž˜%K˜Kšžœ˜—K˜—K˜—K˜šŸœžœžœžœ˜M˜Kšœžœ˜/šžœž˜˜ K˜Kšœ žœ˜!Kšœžœ.˜7—˜Kšœžœ˜ K˜Kšœžœ<˜E—Kšžœžœ˜—K˜—K˜—K˜šŸœžœžœžœ˜L˜Kšœžœ˜.šžœž˜˜ K˜K˜Kšœžœ/˜8—˜ Kšœžœ˜K˜Kšœžœ1˜:—˜Kšœžœ˜K˜Kšœžœ5˜>—Kšžœžœ˜—K˜—K˜—K˜šŸœžœžœžœ˜Q˜Kšœžœ˜,šžœž˜˜ K˜Kšœ žœ˜!Kšœžœ4˜=—˜K˜Kšœ žœ˜!Kšœžœ8˜A—˜ K˜Kšœ žœ˜!Kšœžœ4˜=—˜ K˜K˜Kšœžœ0˜9—Kšžœžœ˜—K˜—K˜—K˜šŸœžœžœ˜AKšœžœ ˜"šžœžœž˜šœžœ"˜)K˜(K˜—šœžœ ˜'K˜$K˜—šœžœ˜!K˜K˜—šœžœ˜#K˜"K˜—šœžœ˜&K˜9K˜6K˜—šœžœ˜$K˜K˜—šœžœ˜&Kšœžœ˜*K˜—šœžœ˜$K˜#K˜—šœžœ˜ K˜K˜—šœžœ˜"K˜K˜—Kšžœ˜—K˜—K˜šŸœžœžœžœ˜I˜Kšœ žœ˜(Kšœžœ˜"šžœžœžœž˜%K˜Kšžœ˜—K˜—K˜—K˜šŸœžœžœ˜AKšœžœ ˜"šžœžœž˜šœžœ˜K˜K˜—Kšžœ˜—K˜—K˜šŸœžœžœžœ˜J˜Kšœžœ˜,šžœž˜˜ K˜K˜Kšœžœ)˜2—Kšžœžœ˜—K˜—K˜—K˜šŸœžœžœ˜@Kšœžœ ˜"šžœžœž˜šœžœ˜ KšžœΟc˜K˜—šœžœ˜"Kšœžœ˜'K˜—šœžœ˜"K˜(K˜)K˜—Kšžœ˜—K˜—K˜šŸœžœžœžœ˜I˜Kšœžœ˜+šžœž˜˜ K˜K˜Kšœžœ,˜5—˜K˜Kšœ žœ˜!Kšœžœ0˜9—˜K˜K˜"K˜#Kšœžœ0˜9—Kšžœžœ˜—K˜—K˜—K˜—K˜K˜—…—"4.+