-- Route66QueryP2233V1AuxImpl.Mesa
	-- Copyright (C) 1986 by Xerox Corporation.  All rights reserved.
	-- Generated by BJackson.pa at July 15, 1988 4:26:23 pm PDT
	--  using Sirocco [2.0] of January 31, 1987 1:52:42 am PST
	
DIRECTORY
	Convert,
	Rope,
	Route66QueryP2233V1,
	AuthenticationP14V2Aux,
	Route66QueryP2233V1Aux;

Route66QueryP2233V1AuxImpl: CEDAR PROGRAM
	IMPORTS Convert, Rope, AuthenticationP14V2Aux
	EXPORTS Route66QueryP2233V1Aux ~ {
	OPEN Route66QueryP2233V1, Route66QueryP2233V1Aux;
	
	ROPE: TYPE ~ Rope.ROPE;
	
	ExposeStringList: PUBLIC PROC [arg: StringList, level: NAT] RETURNS [res: ROPE] ~ {
		res ← "[";
		FOR i: CARDINAL IN [0..arg.length) DO
			res ← Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, arg.body[i]];
			ENDLOOP;
		res ← Rope.Concat[res, "]"];
		};
	
	ExposeIdLocList: PUBLIC PROC [arg: IdLocList, level: NAT] RETURNS [res: ROPE] ~ {
		res ← "[";
		FOR i: CARDINAL IN [0..arg.length) DO
			res ← Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, ExposeIdLoc[arg.body[i], (level+1)]];
			ENDLOOP;
		res ← Rope.Concat[res, "]"];
		};
	
	ExposeOpHandle: PUBLIC PROC [arg: OpHandle, level: NAT] RETURNS [res: ROPE] ~ {
		res ← "[";
		res ← Rope.Cat[res, "operation~", Convert.RopeFromCard[arg.operation], ", "];
		res ← Rope.Cat[res, "sequence~", Convert.RopeFromCard[arg.sequence], "]"];
		};
	
	ExposeFileLocation: PUBLIC PROC [arg: FileLocation, level: NAT] RETURNS [res: ROPE] ~ {
		res ← "[";
		res ← Rope.Cat[res, "fileServer~", arg.fileServer, ", "];
		res ← Rope.Cat[res, "fileName~", arg.fileName, ", "];
		res ← Rope.Cat[res, "fileFormat~", arg.fileFormat, ", "];
		res ← Rope.Cat[res, "startByte~", Convert.RopeFromInt[arg.startByte], ", "];
		res ← Rope.Cat[res, "numBytes~", Convert.RopeFromInt[arg.numBytes], ", "];
		res ← Rope.Cat[res, "timeLimit~", Convert.RopeFromCard[arg.timeLimit], "]"];
		};
	
	ExposeProgressReport: PUBLIC PROC [arg: ProgressReport, level: NAT] RETURNS [res: ROPE] ~ {
		res ← "[";
		res ← Rope.Cat[res, "workDone~", Convert.RopeFromInt[arg.workDone], ", "];
		res ← Rope.Cat[res, "workPending~", Convert.RopeFromInt[arg.workPending], ", "];
		res ← Rope.Cat[res, "timePending~", Convert.RopeFromInt[arg.timePending], ", "];
		res ← Rope.Cat[res, "timeWait~", Convert.RopeFromInt[arg.timeWait], "]"];
		};
	
	ExposeSession: PUBLIC PROC [arg: Session, level: NAT] RETURNS [res: ROPE] ~ {
		res ← "[";
		res ← Rope.Cat[res, "token~", Convert.RopeFromCard[arg.token], ", "];
		res ← Rope.Cat[res, "verifier~", AuthenticationP14V2Aux.ExposeSeqWords[arg.verifier, (level+1)], "]"];
		};
	
	ExposeFileLocFilter: PUBLIC PROC [arg: FileLocFilter, level: NAT] RETURNS [res: ROPE] ~ {
		res ← "[";
		res ← Rope.Cat[res, "servers~", ExposeStringList[arg.servers, (level+1)], ", "];
		res ← Rope.Cat[res, "formats~", ExposeStringList[arg.formats, (level+1)], ", "];
		res ← Rope.Cat[res, "timeLimit~", Convert.RopeFromCard[arg.timeLimit], "]"];
		};
	
	ExposeResultType: PUBLIC PROC [arg: ResultType, level: NAT] RETURNS [res: ROPE] ~ {
		SELECT arg FROM
			matches => res ← "matches";
			handles => res ← "handles";
			locations => res ← "locations";
			handlesAndLocations => res ← "handlesAndLocations";
			timeEstimate => res ← "timeEstimate";
			lengths => res ← "lengths";
			last => res ← "last";
			ENDCASE => ERROR
		};
	
	ExposeIdLoc: PUBLIC PROC [arg: IdLoc, level: NAT] RETURNS [res: ROPE] ~ {
		res ← "[";
		res ← Rope.Cat[res, "docId~", arg.docId, ", "];
		res ← Rope.Cat[res, "fileLocation~", ExposeFileLocation[arg.fileLocation, (level+1)], "]"];
		};
	
}...