-- File: FTPPupComDefs.mesa,  Last Edit: HGM July 31, 1980  5:48 PM

-- Copyright  Xerox Corporation 1979, 1980

DIRECTORY
  FTPDefs,
  Stream USING [Handle],
  PupStream USING [CloseReason];

FTPPupComDefs: DEFINITIONS =
  BEGIN

  PupConnection: TYPE = POINTER TO PupConnectionObject;
  PupConnectionObject: TYPE = RECORD [
    streamHandle: Stream.Handle,
    thirdPartyClose, inputDiscontinuity, outputDiscontinuity,
      inputDiscontinuityConsumed, terminateOnEndPhysicalRecord: BOOLEAN,
    mark: Byte];

  BytePointer: TYPE = FTPDefs.BytePointer;
  CommunicationSystem: TYPE = FTPDefs.CommunicationSystem;
  Connection: TYPE = FTPDefs.Connection;
  Byte: TYPE = FTPDefs.Byte;

  SendBytes: PROCEDURE [
    communicationSystem: CommunicationSystem, connection: Connection,
    bytePointer: BytePointer];
  ReceiveBytes: PUBLIC PROCEDURE [
    communicationSystem: CommunicationSystem, connection: Connection,
    bytePointer: BytePointer, settleForLess: BOOLEAN];
  SendByte: PROCEDURE [
    communicationSystem: CommunicationSystem, connection: Connection, byte: Byte];
  ReceiveByte: PUBLIC PROCEDURE [
    communicationSystem: CommunicationSystem, connection: Connection,
    settleForNone: BOOLEAN] RETURNS [byte: Byte, settledForNone: BOOLEAN];
  ProduceDiscontinuity: PROCEDURE [
    communicationSystem: CommunicationSystem, connection: Connection];
  ConsumeDiscontinuity: PROCEDURE [
    communicationSystem: CommunicationSystem, connection: Connection];
  ForceOutput: PROCEDURE [
    communicationSystem: CommunicationSystem, connection: Connection];

  AbortBecauseStreamClosing: PUBLIC PROCEDURE [
    closeReason: PupStream.CloseReason, message: STRING];

  END.