<> <> <> <> <<<> <> <> <> <> <> <> <> <> <>>> DIRECTORY BasicTime USING [GMT, nullGMT], FS USING [OpenFile, nullOpenFile], NSString USING [nullString, String], PaperTypes USING [Paper], PrintingTypes USING [Option], System USING [nullID, UniversalID], TargetPSStatus USING [Communication], XNS USING [Address, unknownAddress]; PrintQueue: CEDAR DEFINITIONS = BEGIN <<>> <> QueueStage: TYPE = { spooling, spooledLow, spooledNormal, spooledHigh, decomposing, decomposed, marking, marked, merging, merged, forwarding, forwarded, temp, bannerOnly, retrySpooled, retryDecomposed, retransmit, hold, aborted, errors, tpSpooled, tpDecomposed, tpMerged, tpInactive, inactive}; <> QueueObject: TYPE = MACHINE DEPENDENT RECORD [ fileID(0): FS.OpenFile _ FS.nullOpenFile, --for PrintObject fileName(2): NSString.String _ NSString.nullString, <> localFileName(4): NSString.String _ NSString.nullString, <> sender(6): NSString.String _ NSString.nullString, <> recipient(8): NSString.String _ NSString.nullString, <> operatorMsg(10): NSString.String _ NSString.nullString, <> errorMsg(12): NSString.String _ NSString.nullString, -- _[bytes:@errorMsgBody] uid(14): System.UniversalID _ System.nullID, --equivalent to requestID in NSPrint fileSize(19): LONG CARDINAL _ 0, --size in bytes of object fileTypeHint(21): PrintFileType _ unknown, numberCopies(22): CARDINAL _ 1, firstPageToPrint(23): CARDINAL _ 1, lastPageToPrint(24): CARDINAL _ LAST[CARDINAL], paper(25): PaperTypes.Paper _ [], twoSided(28): BOOLEAN _ FALSE, staple(29): BOOLEAN _ FALSE, priority(30): Priority _ normal, releaseKey(31): CARDINAL _ LAST[CARDINAL], fileCreateDate(32): BasicTime.GMT _ BasicTime.nullGMT, --date and time of creation of interpress file fileQueuedDate(34): BasicTime.GMT _ BasicTime.nullGMT, --date and time file is queued on print service startDecomposeDate(36): BasicTime.GMT _ BasicTime.nullGMT, --date and time when decomposition of file began decomposeTime(38): LONG CARDINAL _ 0, --elapsed time in seconds for file in decomposer markTime(40): LONG CARDINAL _ 0, --elapsed time in seconds for file in marker (or merger for feps9700) completionDate(42): BasicTime.GMT _ BasicTime.nullGMT, --date and time processing completed on file sourceSystemElement(44): XNS.Address _ XNS.unknownAddress, --sent from printObjectHandle(50): PrintObjectHandle _ nilPrintObjectHandle, --for Decompose.Handle platesDecomposed(52): CARDINAL _ 0, currentStatus(53): ObjectStatus _ null, priorStatus(54): ObjectStatus _ null, --for retries and banner only bannerOnly(55): BOOLEAN _ FALSE, --TRUE for banner only jobs deleteInactiveFile(56): BOOLEAN _ TRUE, --FALSE for Test Pattern files, which should not be deleted fileNameBody(57): PACKED ARRAY StringBody OF CHAR _ ALL[blank], localFileNameBody(107): PACKED ARRAY StringBody OF CHAR _ ALL[blank], senderBody(157): PACKED ARRAY StringBody OF CHAR _ ALL[blank], recipientBody(207): PACKED ARRAY StringBody OF CHAR _ ALL[blank], operatorMsgBody(257): PACKED ARRAY StringBody OF CHAR _ ALL[blank], errorMsgBody(307): PACKED ARRAY StringBody OF CHAR _ ALL[blank], optionVariant(357): SELECT option(357): PrintingTypes.Option FROM fax495 => [ localPrintStatus(358): FaxLocalPrintStatus _ null, localPrintCompletionDate(359): BasicTime.GMT _ BasicTime.nullGMT, phoneNoCount(361): [0..maxFaxPhoneNos] _ 0, <> transmitData(362): ARRAY [0..maxFaxPhoneNos) OF FaxMitData _ ALL[] <> ], feps9700 => [ ivFileID(358): FS.OpenFile _ FS.nullOpenFile, <> targetRequestID(360): System.UniversalID _ System.nullID, <> forwardingStatus(365): TargetPSStatus.Communication _ okay <> ], bansheeDl, d1, fax295, fx3500, raven, unknown => [], ENDCASE ]; QueueObjectHandle: TYPE = REF QueueObject; NewObjectQueuedProc: TYPE = PROCEDURE; --for notification purposes (see QueueWatcher). PrintObjectHandle: TYPE = REF ANY; Errortype: TYPE = {invalidQueueObject, malformedQueue, nullQueueObject, multipleWatchers, unspecified}; PrintFileType: TYPE = {unknown, xeroxEncoding1, interpress10}; Priority: TYPE = {low, normal, high}; ObjectStatus: TYPE = { restart, spooling, spooled, decomposing, decomposed, marking, printed, merging, merged, forwarding, forwarded, canceledInDecomposer, canceledInMarker, canceledInMerger, canceledInForwarder, canceledInQueue, spoolFailure, decomposeFailure, markFailure, mergeFailure, forwardFailure, --for startup:-- sysRestartInSpooler, sysRestartInDecomposer, sysRestartInMarker, sysRestartInMerger, sysRestartInForwarder, sysRestartInQueue, faxInProgress, faxCompleted, faxCanceled, faxAborted, held, null}; FaxMitStatus: TYPE = { queued, transmitting, transmitted, canceled, busy, noAnswer, transmitError, invalidPhoneNumber, localFaxFailure, purgedAtSysRestart, null}; <> FaxLocalPrintStatus: TYPE = { queued, marking, printed, canceled, localFaxFailure, purgedAtSysRestart, null}; <> FaxMitData: TYPE = RECORD [ phoneNumber: NSString.String _ NSString.nullString, -- _[bytes:@phoneNumberBody] status: FaxMitStatus _ null, retryCount: CARDINAL _ 0, --number of retries so far queuedForRetry: BOOLEAN _ FALSE, completionDate: BasicTime.GMT _ BasicTime.nullGMT, --date and time of successful transmit or transmit failure. elapsedTime: LONG CARDINAL _ 0, --duration of phone call(s) in seconds. errorCode: NSString.String _ NSString.nullString, --valid if status is transmitError or localFaxFailure phoneNumberBody: PACKED ARRAY [0..maxPhoneNoLength) OF CHAR _ ALL[blank], errorCodeBody: PACKED ARRAY [0..4) OF CHAR _ ALL[blank] ]; RelativePosition: TYPE = {front, back}; ObjectStringField: TYPE = {fileName, localFileName, sender, recipient, operatorMsg, errorMsg}; StatsRecord: TYPE = RECORD [ statsFrom: BasicTime.GMT _ BasicTime.nullGMT, inconsistantAtInit: CARDINAL, activity: QueueActivity _ ALL[0]]; StringBody: TYPE = [0..maxStringBytes); QueueActivity: TYPE = ARRAY QueueStage OF LONG CARDINAL; <> maxQueueStage: CARDINAL = 14; maxStringBytes: CARDINAL = 100; maxPhoneNoLength: CARDINAL = 34; maxFaxPhoneNos: CARDINAL = 10; nilQueueObjectHandle: QueueObjectHandle = NIL; nilPrintObjectHandle: PrintObjectHandle = NIL; blank: CHAR = ' ; <> Error: ERROR [errortype: Errortype]; <> Requeue: PROCEDURE [qOH: QueueObjectHandle _ nilQueueObjectHandle, fromQueue: QueueStage, toQueue: QueueStage, position: RelativePosition _ back] RETURNS [QueueObjectHandle]; <> <> Next: PROCEDURE [qOH: QueueObjectHandle _ nilQueueObjectHandle, fromQueue: QueueStage] RETURNS [QueueObjectHandle]; <> <> <> <> <> Previous: PROCEDURE [qOH: QueueObjectHandle _ nilQueueObjectHandle, fromQueue: QueueStage] RETURNS [QueueObjectHandle]; <> <> <> <> <> GetQueueObject: PROCEDURE [] RETURNS [qOH: PrintQueue.QueueObjectHandle]; <> <<>> Empty: PROCEDURE [queueStage: QueueStage] RETURNS [BOOLEAN]; <> ReserveForTestPattern: PROCEDURE [qOH: QueueObjectHandle _ nilQueueObjectHandle, fromQueue: QueueStage _ inactive, toQueue: QueueStage _ tpInactive] RETURNS [QueueObjectHandle]; <> <> ReleaseAsTestPattern: PROCEDURE [qOH: QueueObjectHandle, fromQueue: QueueStage _ tpInactive, toQueue: QueueStage _ inactive]; <> <> QueueWatcher: PROCEDURE [proc: NewObjectQueuedProc, queueStage: QueueStage]; <> <> LocateHandle: PROCEDURE [fileSent: System.UniversalID] RETURNS [qOH: QueueObjectHandle, queueStage: QueueStage]; <> WhereIs: PROCEDURE [qOH: QueueObjectHandle] RETURNS [valid: BOOLEAN, queueStage: QueueStage]; <> CopyStringIn: PROCEDURE [qOH: QueueObjectHandle, fromString: NSString.String, toField: ObjectStringField]; <> CopyQueueObject: PROCEDURE [fromQOH: QueueObjectHandle, toQOH: QueueObjectHandle]; <> Initialize: PROCEDURE [directory: REF TEXT, queueEntries: CARDINAL, currentOption: PrintingTypes.Option] RETURNS [queueSize: CARDINAL]; <> Backup: PROCEDURE[]; --Backup the print queue to the backing file. Cleanup: PROCEDURE[]; <> <> <> <> END. LOG when/who/what ****EARLIER LOG ENTRIES DELETED. See archived version from 8.0. 18-Sep-84 13:25:29 - Jacks - QueueStage: added forwarding and forwarded; QueueObject: added twoSided, staple, and new engine variants, removed paperTray variant for raven and fx3500 and PaperTray type; added Backup proc; made QueueObject MACHINE DEPENDENT; ObjectStatus: added feps9700 statuses and faxCanceled. 14-Nov-84 12:10:20 - Jacks - Second round of changes for 9.0: added targetRequestID and forwardingStatus to QueueObject; added tpMerged to QueueStage; made transmitData [0..maxFaxPhoneNos) instead of [1..maxFaxPhoneNos]. 17-Jun-85 15:43:26 - Jacks - Added copyright notice; updated to PS Euclid interfaces. 25-Jun-85 13:35:56 - Jacks - Added d1 variant to QueueObject. 1-Jul-85 13:06:44 - Jacks - Added faxAborted to ObjectStatus; added queuedForRetry to QueueObject. 14-Oct-85 9:56:05 - Jacks - Added errorCode to FaxMitData.