-- DBStash.Mesa, last edit April 20, 1982 10:53 am
-- Pilot 6.0/ Mesa 7.0
-- definitions file for the cache of file info

DIRECTORY
  Dir: TYPE USING [DepSeq],
  TimeStamp: TYPE USING [Stamp],
  UserExec: TYPE USING[CommandProc];

DBStash: DEFINITIONS = {

-- returns NIL if not found
Lookup: PROC[create: LONG CARDINAL, fileName: LONG STRING] RETURNS[depseq: Dir.DepSeq];
	
BcdVersLookup: PROC[bcdVers: TimeStamp.Stamp] RETURNS[depseq: Dir.DepSeq];

-- the newdepseq this returns is not re-used and may be saved.
-- don't ever free it.
Insert: PROC[create: LONG CARDINAL, fileName: LONG STRING, depseq: Dir.DepSeq]
	 RETURNS[newdepseq: Dir.DepSeq];

Flush: UserExec.CommandProc;	-- call this only once

ForceOut: PROC RETURNS[npages: CARDINAL];	-- just make sure HugeZone is forced out to disk

-- this is the official way to get one of these DepSeq's
-- don't ever free this, or save it as it is re-used
GetTemporaryDepSeq: PROC RETURNS[depseq: Dir.DepSeq];
-- note that this depseq VIOLATES the MONITOR


-- to get at the # of leaders in other instances of SubrImpl
SetNLeaders: PROC;
GetNLeaders: PROC RETURNS[nleaders: CARDINAL];

-- to get stats of DB
SetNHits: PROC;
GetNHits: PROC RETURNS[nhits, nmisses: LONG CARDINAL];

}.