(*
    Title: 	Table of services in this address space
    LastEdit:	"Mon Jan  4 10:02:30 1988"
    Author: 	Derek McAuley,Oms1,4663,329629
		Cambridge University Computer Laboratory
*)

DEFINITION MODULE RPCTable;


IMPORT
  Iterator, PktBufs;

FROM RPCBasics   IMPORT Place, ServiceId, Distance, Instance, BinderInfo;
FROM SystemTypes IMPORT String;


EXPORT QUALIFIED 
  Find, FindId, Offer, SuggestId, OfferId, ReOffer, Info, InfoById, 
  Retract, Init;


PROCEDURE Find(
      name:String;
  VAR svId:ServiceId
 ):BOOLEAN;

PROCEDURE FindId(
      id:ServiceId;
  VAR at:PktBufs.ReceiveProc;
  VAR i: Instance
 ):BOOLEAN;

PROCEDURE Offer(
      name:String;
      d:   Distance;
      p:   PktBufs.ReceiveProc;
      i:   Instance;
  VAR svID:ServiceId
 ):BOOLEAN;

PROCEDURE SuggestId():ServiceId;

PROCEDURE OfferId(
      id:ServiceId;
      p: PktBufs.ReceiveProc;
      i: Instance
 ):BOOLEAN;

PROCEDURE ReOffer(
  id:ServiceId;
  p: PktBufs.ReceiveProc;
  i: Instance
 ):BOOLEAN;

PROCEDURE Info(
  VAR s:    Iterator.State;     (* InOut *)
  VAR count:CARDINAL;           (* Out   *)
  VAR ids:  ARRAY OF ServiceId; (* Out   *)
      bra:  Distance;
      ket:  Distance
 );

PROCEDURE InfoById(
      id:  ServiceId;
  VAR b:   BinderInfo;   (* Out *)
  VAR name:ARRAY OF CHAR (* Out *)
 ):BOOLEAN;

PROCEDURE Retract(service:ServiceId);

PROCEDURE Init();

END RPCTable.
