syntax = "proto3"; package Aurora.Proto.Events; import "Proto/general.proto"; import "Proto/party.proto"; service RemoteEventService { //Party Service rpc GetEvents(Aurora.Proto.General.Empty) returns (stream BaseEvent) {}; rpc SubscribeToEvents(SubscribeRequest) returns(SubscriptionResponse); rpc UnsubscribeFromEvents(UnsubscribeRequest) returns (SubscriptionResponse); rpc UnsubscribeFromAll(UnsubscribeAllRequest) returns (SubscriptionResponse); } /* Subscription messages */ message SubscribeRequest { repeated EventType eventTypes = 1; } message UnsubscribeRequest { repeated EventType eventTypes = 1; } message UnsubscribeAllRequest { } message SubscriptionResponse { bool successful = 1; } /* Event Types */ enum EventType { PartyMemberJoined = 0; PartyMemberLeft = 1; } message BaseEvent { EventType eventType = 1; oneof derivedEvent { PartyMemberJoinedEvent partyMemberJoinedEvent = 2; PartyMemberLeftEvent partyMemberLeftEvent = 3; } } message PartyMemberJoinedEvent { Aurora.Proto.Party.PartyMember member = 2; } message PartyMemberLeftEvent { Aurora.Proto.Party.PartyMember member = 2; }