<> <> <> <> <<<>>> DIRECTORY BasicTime USING [GMT, nullGMT], BulkDataP0V1 USING [Source], CHNameP2V0 USING [Name], IO USING [STREAM], NSString USING [String], PaperHandling USING [ Banner, PaperFeed, PaperStacking, PaperSupply, PrintOrder, Registration], PaperTypes USING [Paper, PaperSize], PrintingP4V3 USING [InterpressMasterStatus], PrintingTypes USING [Option], PSAsyncMsg USING [Proc], PSState USING [CurrentActivity, StateHandle, TraceLevel], System USING [nullID, UniversalID], TargetPSStatus USING [Communication, Current, Properties], XNS USING [Address, unknownAddress]; PSCommand: CEDAR DEFINITIONS = BEGIN OPEN CHName: CHNameP2V0, NSDataStream: BulkDataP0V1; <> Priority: TYPE = {low, normal, high}; <<<>>> DocumentParameters: TYPE = REF DocumentParameterRecord; DocumentParameterRecord: TYPE = RECORD [ name: NSString.String _ NIL, createDate: BasicTime.GMT _ BasicTime.nullGMT, size: LONG CARDINAL _ 0, --document size in bytes senderName: NSString.String _ NIL, recipientName: NSString.String _ NIL, message: NSString.String _ NIL, copyCount: CARDINAL _ 1, firstPageToPrint: CARDINAL _ 1, lastPageToPrint: CARDINAL _ LAST[CARDINAL], paper: PaperTypes.Paper _ [], staple: BOOLEAN _ FALSE, twoSided: BOOLEAN _ FALSE, priority: Priority _ normal, releaseKey: CARDINAL _ LAST[CARDINAL] ]; <<<>>> DocumentID: TYPE = System.UniversalID; nullDocumentID: DocumentID = System.nullID; <<<> <<(1) the simple PrintingP4V3 status and>> <<(2) the more specific internal print queue status. >>>> <<>> DocumentStatus: TYPE = RECORD [ var: SELECT simple: SimpleDocStatus FROM pending => [specific: SpecificDocStatus], inProgress => [specific: SpecificDocStatus], completed => [specific: SpecificDocStatus], completedWithWarning => [specific: SpecificDocStatus], unknown => [], rejected => [specific: SpecificDocStatus], aborted => [specific: SpecificDocStatus], canceled => [specific: SpecificDocStatus], held => [], ENDCASE ]; <<<>>> SimpleDocStatus: TYPE = PrintingP4V3.InterpressMasterStatus; <> <<<>>> SpecificDocStatus: TYPE = { --Equivalent to PrintQueue.ObjectStatus. <> spooling, spooled, --being received; received and queued for decomposer restart, --requeued for decomposer (at system restart or StopPrinting call) decomposing, --being decomposed decomposed, --decomposed and queued for marker marking, printed, --being marked; already printed forwarding, --being forwarded to target PS****REMOTE9700 STATUS ONLY! forwarded, --already forwarded to target PS****REMOTE9700 STATUS ONLY! <> canceledInDecomposer, --canceled with status = decomposing canceledInMarker, --canceled with status = marking canceledInForwarder, --canceled with status = forwarding****REMOTE9700 ONLY! canceledInQueue, --canceled with status = spooled, restart, decomposed, or merged <> spoolFailure, --could not be received decomposeFailure, --could not be decomposed markFailure, --could not be marked forwardFailure, --could not be forwarded****REMOTE9700 STATUS ONLY! <> sysRestartInSpooler,--found with status = spooling sysRestartInDecomposer,--found with status = decomposing sysRestartInMarker, --found with status = marking sysRestartInForwarder,--found with status = forwarding****REMOTE9700 STATUS ONLY! sysRestartInQueue, --found with status = decomposed or merged <> faxStatus, --Document is currently in progress or completed; specific document status is contained in the optionDependent field of the DocumentAttrRecord****FAX495 STATUS ONLY! null}; <<<> <<'queued' indicates the document is not yet ready to be transmitted. (Equivalent to fax transmit status maintained by print queue.)>>>> FaxTransmitStatus: TYPE = {queued, transmitting, transmitted, canceled, busy, noAnswer, transmitError, invalidPhoneNumber, localFaxFailure, purgedAtSysRestart, null}; <<>> <<<> <<'queued' indicates the document is not yet ready to print;>> <<'null' indicates there was no local print request for the document.>> <<(Equivalent to fax local print status maintained by print queue.)>>>> FaxLocalPrintStatus: TYPE = {queued, marking, printed, canceled, localFaxFailure, purgedAtSysRestart, null}; FaxTransmitData: TYPE = RECORD [ phoneNumber: NSString.String _ NIL, transmit: FaxTransmitStatus _ null, retryCount: CARDINAL _ 0, --number of retries so far willRetry: BOOLEAN _ FALSE, --TRUE if we'll retry again completionDate: BasicTime.GMT _ BasicTime.nullGMT, phoneCallElapsedTime: LONG CARDINAL _ 0, --in seconds errorCode: NSString.String _ NIL --valid if FaxTransmitStatus is transmitError or localFaxFailure ]; Fax495DocumentStatus: TYPE = RECORD [ localPrint: FaxLocalPrintStatus _ null, localPrintCompletionDate: BasicTime.GMT _ BasicTime.nullGMT, phoneNumberCount: CARDINAL _ 0, transmitData: LONG DESCRIPTOR FOR ARRAY OF FaxTransmitData _ DESCRIPTOR[NIL, 0] --there's an array entry for every phone number ]; <<<>>> DocumentFilter: TYPE = RECORD [ id: DocumentID _ nullDocumentID, name: NSString.String _ NIL, sender: NSString.String _ NIL, status: PACKED ARRAY SimpleDocStatus OF BOOLEAN _ ALL[TRUE] ]; noDocuments: DocumentFilter = [nullDocumentID, NIL, NIL, ALL[FALSE]]; allDocuments: DocumentFilter = [nullDocumentID, NIL, NIL, ALL[TRUE]]; <<<>>> DocumentAttributes: TYPE = REF DocumentAttrRecord; DocumentAttrRecord: TYPE = RECORD [ id: DocumentID _ nullDocumentID, name, sender, recipient, errorMessage: NSString.String _ NIL, status: DocumentStatus _ [unknown[]], priority: Priority _ normal, sourceSystemElement: XNS.Address _ XNS.unknownAddress, sizeInBytes: LONG CARDINAL _ 0, pagesDecomposed: CARDINAL _ 0, numberOfCopies: CARDINAL _ 1, dateReceived: BasicTime.GMT _ BasicTime.nullGMT, secondsInFormatter: LONG CARDINAL _ 0, completionDate: BasicTime.GMT _ BasicTime.nullGMT, optionDependent: SELECT printingOption: PrintingTypes.Option FROM fax495 => [faxStatus: Fax495DocumentStatus _ []], bansheeDl, d1, fax295, feps9700, fx3500, raven, unknown => [], ENDCASE ]; <<<>>> DocumentProc: TYPE = PROCEDURE [document: DocumentAttributes] RETURNS [continue: BOOLEAN _ TRUE]; <> FontType: TYPE = {cdFont, any}; <<<>>> FontProc: TYPE = PROCEDURE [type: FontType, packageName: NSString.String, sizeInBytes: LONG CARDINAL, createDate: BasicTime.GMT] RETURNS [continue: BOOLEAN _ TRUE]; <<<>>> FontFilter: TYPE = RECORD [type: FontType _ any, packageName: NSString.String _ NIL]; allFontPackages: FontFilter = [any, NIL]; <> FileType: TYPE = {testPattern, any}; <<<>>> FileProc: TYPE = PROCEDURE [type: FileType, name: NSString.String, sizeInBytes: LONG CARDINAL, createDate: BasicTime.GMT] RETURNS [continue: BOOLEAN _ TRUE]; <<<>>> FileFilter: TYPE = RECORD [type: FileType _ any, name: NSString.String _ NIL]; allFiles: FileFilter = [any, NIL]; <<<>>> PaperTray: TYPE = {bottom, top, default}; maxPhoneNoLength: CARDINAL = 34; PrintFileOptions: TYPE = RECORD [var: SELECT printingOption: PrintingTypes.Option FROM fax295 => [paperSize: PaperTypes.PaperSize], fax495 => [localPrint: BOOLEAN _ TRUE, transmit: BOOLEAN _ FALSE, phoneNumber: NSString.String _ NIL, paperSize: PaperTypes.PaperSize], fx3500 => [tray: PaperTray _ default], raven => [tray: PaperTray _ default, stacking: PaperHandling.PaperStacking _ aligned], bansheeDl, d1, feps9700, unknown => [], ENDCASE ]; <> FaxTransmissionRetryReason: TYPE = {noConnectionMade, transmitError, always}; <<<>>> TraceParameters: TYPE = RECORD [spooler: PSState.TraceLevel, decomposer: PSState.TraceLevel, marker: PSState.TraceLevel]; <> <<<>>> ErrorType: TYPE = { abortedByClient, --aborted; operation may or may not have completed disallowedInCurrentMode, --disallowed because the PS is not in normal operation mode (e.g. PS is in repair mode or font loading mode) documentNotFound, --operation on a document which doesn't exist at PS documentInProgress, --disallowed because a document is in progress engineBusy, --operation depends on engine being idle enqueue, --spooling error raised by Enqueue fileNotFound, --operation on a file which doesn't exist at PS incompatiblePrintingOption, --operation not valid with current printing option insufficientSpace, --insufficient resources for operation invalidPhoneNumber, --syntax of phone number is invalid invalidParameters, --bad or unknown parameters supplied to operation parameterOptionNotAvailable, --parameter option invalid for current printing option systemError, --bug in implementation targetPS, --problem communicating with target print service targetPSNotSet, --target print service must be specified prior to operation undefined --some undefined problem (and implementation-dependent) occurred }; EnqueueError: TYPE = {busySpooling, masterTooLarge, mediumUnavailable, spoolingDisabled, spoolingQueueFull, tooManyClients, other}; UndefinedError: TYPE = CARDINAL; Error: ERROR [problem: ErrorRecord]; ErrorRecord: TYPE = RECORD [ SELECT errorType: ErrorType FROM abortedByClient, disallowedInCurrentMode, documentNotFound, documentInProgress, engineBusy => [], enqueue => [what: EnqueueError], fileNotFound, incompatiblePrintingOption, insufficientSpace, invalidPhoneNumber, invalidParameters, parameterOptionNotAvailable, systemError => [], targetPS => [what: TargetPSStatus.Communication], targetPSNotSet => [], undefined => [what: UndefinedError], ENDCASE ]; <<************************>> <> <<************************>> <> Start: PROCEDURE; <<<>>> Stop: PROCEDURE; <<<>>> StartPrinting: PROCEDURE [user: CHName.Name]; <<<>>> StopPrinting: PROCEDURE [user: CHName.Name, reason: NSString.String _ NIL]; <<<>>> StartQueuing: PROCEDURE [user: CHName.Name]; <<<>>> StopQueuing: PROCEDURE [user: CHName.Name, reason: NSString.String _ NIL]; <<<>>> ResetStatistics: PROCEDURE; <<<>>> <> GetPrintServiceStatus: PROCEDURE RETURNS [PSState.StateHandle]; <<<>>> GetPrintServiceActivity: PROCEDURE RETURNS [PSState.CurrentActivity]; <<<>>> GetTargetPSStatus: PROCEDURE RETURNS [activity: TargetPSStatus.Current, properties: TargetPSStatus.Properties]; <<<> <>>> <> Enqueue: PROCEDURE [document: NSDataStream.Source, parameters: DocumentParameters] RETURNS [documentID: PSCommand.DocumentID]; <<<> <> ListDocuments: PROCEDURE [proc: DocumentProc, filter: DocumentFilter _ allDocuments]; <<<> <>>> CancelDocument: PROCEDURE [documentID: DocumentID] RETURNS [status: DocumentStatus]; <<<> <>>> <> ListFonts: PROCEDURE [proc: FontProc, filter: FontFilter _ allFontPackages]; <<<>>> InstallFont: PROCEDURE [type: FontType, packageName: NSString.String, createDate: BasicTime.GMT, data: IO.STREAM, packageSizeHintInBytes: LONG CARDINAL _ 0]; <<<> <>>> DeleteFont: PROCEDURE [packageName: NSString.String]; <<<> <>>> <> ListFiles: PROCEDURE [proc: FileProc, filter: FileFilter _ allFiles]; <<<>>> InstallFile: PROCEDURE [type: FileType, name: NSString.String, createDate: BasicTime.GMT, data: IO.STREAM, fileSizeHintInBytes: LONG CARDINAL _ 0]; <<<> <>>> DeleteFile: PROCEDURE [name: NSString.String]; <<<> <>>> PrintFile: PROCEDURE [fileName, senderName: NSString.String, copies: CARDINAL, options: PrintFileOptions]; <<<> <>>> <> <> SetBanner: PROCEDURE [banner: PaperHandling.Banner]; <<<>>> SetPrintOrder: PROCEDURE [printOrder: PaperHandling.PrintOrder]; <> SetMultipleCopies: PROCEDURE [multLocalCopiesAllowed, multRemoteCopiesAllowed: BOOL]; <<<> <>>> SetPaperFeed: PROCEDURE [paperFeed: PaperHandling.PaperFeed]; <<<> <>>> SetPaperStacking: PROCEDURE [paperStacking: PaperHandling.PaperStacking]; <<<> <>>> SetPaperSupply: PROCEDURE [paperSupply: PaperHandling.PaperSupply]; <<<> <>>> SetRegistration: PROCEDURE [registration: PaperHandling.Registration]; <<<> <>>> SetTargetPrintService: PROCEDURE [address: XNS.Address, name: NSString.String _ NIL]; --Remote9700 only; address required, name is optional <<<>>> SetTransmissionResolution: PROCEDURE [fineResolutionSupported: BOOLEAN]; <<<> <>>> SetTransmissionRetries: PROCEDURE [retries: CARDINAL, delayInSeconds: LONG CARDINAL, reason: FaxTransmissionRetryReason _ always]; <<<> <>>> <> StartDiagnosticMode: PROCEDURE; <<<> <>>> StartRepairMode: PROCEDURE; <<<> <>>> PutPrinterDisplay: PROCEDURE [leftChar, rightChar: CHARACTER _ 0C]; <<<> <>>> GetPrinterDisplay: PROCEDURE RETURNS [leftChar, rightChar: CHARACTER _ 0C]; <<<> <>>> ShutDownEngine: PROCEDURE; <<<> <>>> WakeUpEngine: PROCEDURE; <<<> <>>> <> RegisterAsyncMessageProc: PROCEDURE [proc: PSAsyncMsg.Proc]; <<<>>> SetTrace: PROCEDURE [traceParms: TraceParameters]; <<<>>> END. --PSCommand LOG 25-Aug-83 9:34:58 - Jacks - Created as part of PSCommand rework; this is the public interface to the print service commands. 22-Sep-83 13:39:47 - Jacks - Changed PSState.EngineType to PrinterTypes.Engine. 25-Oct-83 11:27:15 - Jacks - Added abortedByClient error type. 11-Nov-83 10:15:46 - Jacks - Changed references to PSState for paper handling defs to PaperHandling def; removed PaperSupply and PaperFeed definitions and put them in PaperHandling. 18-Nov-83 14:47:10 - Jacks - Added return var 'status' to CancelDocument. 28-Nov-83 15:05:39 - Jacks - Added insufficientSpace error type. 6-Dec-83 10:16:38 - Jacks - Added RegisterAsyncMessageProc. 14-Dec-83 14:55:40 - Jacks - Added SetFaxMultipleCopies and SetFaxRetries; added activity parm to GetPrintServiceStatus. 20-Dec-83 8:11:36 - Jacks - Added PrintFileOptions for other engines; made GetPrintServiceActivity a separate proc. 24-Jan-84 8:48:18 - Jacks - Converted to 8.0 SCS; added GetNSExecStatus and ExpungePrintService; added fax status types and more fields to DocumentAttrRecord; made minor changes. 22-Feb-84 15:56:59 - Jacks - To accomodate fax, removed restrictions on intStatus withing DocumentStatus; added intStatus to completed and completedWithWarnings; added willRetry to FaxTransmitData; added ResetStatistics, GetPrinterDisplay, PutPrinterDisplay; added parameters to Start/Stop Queuing/Printing. 19-Sep-84 14:58:07 - Jacks - Removed Initialize (currently in PSCommandExtra--will be in new PSInit interface); renamed Expunge; added SetFax495TransmissionResolution and SetFEPSTargetPS; changed "user" in Queuing/Printing control operations from NSString.String to NSName.Name; added feps9700 specific statuses to InternalDocStatus; renamed many types and parameter procedures; added variants where necessary for feps9700, banshee and fax295; removed aps5 variants. 15-Nov-84 11:19:51 - Jacks - Second round of changes for 9.0: Changed parameters to SetTargetPrintService; defined ErrorRecord and changed ErrorType somewhat; defined SimpleDocStatus and renamed InternalDocStatus to SpecificDocStatus; changes to DocumentAttrRecord: priority and sourceSystemElement not defined in NSPrint types anymore; removed secondsInMarker. 18-Jun-85 15:09:16 - Jacks - Added copyright notice; updated to PS Euclid interfaces; folded in changes from PSCommandExtras. 26-Jun-85 10:13:44 - Jacks - Added d1 variants. 1-Jul-85 13:11:51 - Jacks - Added retryCount to FaxTransmitData. 17-Jul-85 9:40:32 - Jacks - Removed AsyncMessageProc in favor of using PSAsyncMsg.Proc; added senderName parm to PrintFile. 24-Sep-85 11:11:17 - Jacks - Made DocumentFilter status a packed array; added documentInProgress to ErrorType; renamed DocumentParameterRecord.paperSize to paper. 14-Oct-85 9:57:41 - Jacks - Added errorCode to FaxTransmitData and removed obsolete Expunge proc.