This repository has been archived on 2020-12-20. You can view files and clone it, but cannot push or open issues or pull requests.
aurora-sharp-desktop/Aurora/Proto/events.proto

60 lines
1.3 KiB
Protocol Buffer

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