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

51 lines
1.2 KiB
Protocol Buffer
Raw Normal View History

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;
}