-- File: WalnutRetrieve.mesa
-- Created by: Haugeland, August 26, 1982
-- Edited by
-- Willie-Sue on May 18, 1983 3:04 pm

DIRECTORY
IO USING [STREAM],
 WalnutLog USING [MsgRec, RName],
 WalnutParse USING [ParseStatus];

WalnutRetrieve: CEDAR DEFINITIONS =

BEGIN OPEN WalnutLog;

-- ***********************************************************
-- Operations for retrieving messages [WalnutRetrieveImpl]

OpenConnection: PROC[user: RName];
-- Establish a connection for this user.

CloseConnection: PROC;

NewUser: PROC[user: RName];
-- Establish a new user on this connection.

RetrieveGVMessages: PROC RETURNS[numRetrieved: INT, allOK: BOOL];
-- reads messages from Grapevine & writes them on the log file

-- ***********************************************************
-- Operations for parsing new messages [WalnutRetrieveParseImpl]

ParseMsgIntoFields: PROC[msg: MsgRec, strm: IO.STREAM, msgLength: INT]
  RETURNS[s: WalnutParse.ParseStatus, sPos, mPos: INT];

END.