-- File DBFilePilot.mesa
-- Last edited by:
--   MBrown on February 7, 1983 12:25 pm

  DIRECTORY
    DBEnvironment,
    DBCommon,
    Rope USING [ROPE, Text];

DBFilePilot: DEFINITIONS = BEGIN
  ROPE: TYPE = Rope.ROPE;
  VersionOptions: TYPE = DBCommon.VersionOptions;

  PilotTrans: TYPE = DBEnvironment.PilotTrans;
  PilotTransRecord: TYPE = DBEnvironment.PilotTransRecord;
  PilotOpenFileHandle: TYPE = DBEnvironment.PilotOpenFileHandle;
  PilotOpenFileRecord: TYPE = DBEnvironment.PilotOpenFileRecord;

  --    Transactions

  CreateTransaction: PROC [] RETURNS [t: PilotTrans];      

  FinishTransaction: PROC [t: PilotTrans, abort: BOOL, continue: BOOL];

  --    Files

  OpenFile: PROC [
    t: PilotTrans, file: Rope.Text, version: VersionOptions, nPagesInitial: INT]
    RETURNS [f: PilotOpenFileHandle, createdFile: BOOL];

  ReadFilePage: PROC [
    f: PilotOpenFileHandle, p: CARDINAL, corePage: LONG POINTER];

  WriteFilePage: PROC [
    f: PilotOpenFileHandle, p: CARDINAL, corePage: LONG POINTER];

  GetSize: PROC [f: PilotOpenFileHandle] RETURNS [nPages: CARDINAL];

  SetSize: PROC [f: PilotOpenFileHandle, nPages: CARDINAL];

  END.