@0x901d08cd9d9aa0fa; # Unique file ID, generated by 'capnp id'


# register could include keys for directory service.

interface PungRpc {

  register @0 (rate :UInt32) -> (id :UInt64);
  
  sync @1 (id :UInt64) -> (round :UInt64); 

  send @2 (id :UInt64, round :UInt64, 
           tuples :List(Data)) -> (numMessages :List(UInt64), minLabels :List(Data));

  retr @3 (id :UInt64, round :UInt64, bucket :UInt32, collection :UInt32, 
           level :UInt32, query :Data, qnum :UInt64) -> (answer :Data, anum :UInt64);

  getMapping @4 (round :UInt64) -> (labels :List(List(Data)));

  getBloom @5 (round :UInt64) -> (blooms :List(Data));

  close @6 (id :UInt64) -> (success :Bool);

  changeExtra @7 (extra :UInt64) -> (success :Bool);
}
