2020-09-16 18:34:24 +02:00
|
|
|
syntax = "proto3";
|
|
|
|
|
2020-09-18 15:51:15 +02:00
|
|
|
/*********** PARTIAL MESSAGES **************/
|
2020-09-18 13:57:38 +02:00
|
|
|
|
|
|
|
message PositionMessage {
|
|
|
|
int32 x = 1;
|
|
|
|
int32 y = 2;
|
|
|
|
enum Direction {
|
|
|
|
UP = 0;
|
|
|
|
RIGHT = 1;
|
|
|
|
DOWN = 2;
|
|
|
|
LEFT = 3;
|
|
|
|
}
|
|
|
|
Direction direction = 3;
|
|
|
|
bool moving = 4;
|
|
|
|
}
|
|
|
|
|
2020-09-18 17:47:18 +02:00
|
|
|
message PointMessage {
|
|
|
|
int32 x = 1;
|
|
|
|
int32 y = 2;
|
|
|
|
}
|
|
|
|
|
2020-09-18 13:57:38 +02:00
|
|
|
message ViewportMessage {
|
|
|
|
int32 left = 1;
|
|
|
|
int32 top = 2;
|
|
|
|
int32 right = 3;
|
|
|
|
int32 bottom = 4;
|
|
|
|
}
|
|
|
|
|
2020-09-28 18:52:54 +02:00
|
|
|
message SilentMessage {
|
|
|
|
bool silent = 1;
|
|
|
|
}
|
|
|
|
|
2020-09-18 15:51:15 +02:00
|
|
|
/*********** CLIENT TO SERVER MESSAGES *************/
|
|
|
|
|
|
|
|
message SetPlayerDetailsMessage {
|
|
|
|
string name = 1;
|
|
|
|
repeated string characterLayers = 2;
|
|
|
|
}
|
|
|
|
|
2020-09-18 13:57:38 +02:00
|
|
|
message UserMovesMessage {
|
|
|
|
PositionMessage position = 1;
|
|
|
|
ViewportMessage viewport = 2;
|
|
|
|
}
|
|
|
|
|
2020-09-29 16:01:22 +02:00
|
|
|
message WebRtcSignalToServerMessage {
|
|
|
|
int32 receiverId = 1;
|
|
|
|
string signal = 2;
|
|
|
|
}
|
|
|
|
|
2020-10-12 11:22:41 +02:00
|
|
|
message ReportPlayerMessage {
|
|
|
|
int32 reportedUserId = 1;
|
|
|
|
string reportComment = 2;
|
|
|
|
}
|
|
|
|
|
2020-10-16 19:13:26 +02:00
|
|
|
message QueryJitsiJwtMessage {
|
|
|
|
string jitsiRoom = 1;
|
|
|
|
string tag = 2; // FIXME: rather than reading the tag from the query, we should read it from the current map!
|
|
|
|
}
|
|
|
|
|
2020-09-28 18:52:54 +02:00
|
|
|
message ClientToServerMessage {
|
|
|
|
oneof message {
|
|
|
|
UserMovesMessage userMovesMessage = 2;
|
|
|
|
SilentMessage silentMessage = 3;
|
|
|
|
ViewportMessage viewportMessage = 4;
|
|
|
|
ItemEventMessage itemEventMessage = 5;
|
|
|
|
SetPlayerDetailsMessage setPlayerDetailsMessage = 6;
|
2020-09-29 16:01:22 +02:00
|
|
|
WebRtcSignalToServerMessage webRtcSignalToServerMessage = 7;
|
|
|
|
WebRtcSignalToServerMessage webRtcScreenSharingSignalToServerMessage = 8;
|
2020-10-01 14:11:34 +02:00
|
|
|
PlayGlobalMessage playGlobalMessage = 9;
|
|
|
|
StopGlobalMessage stopGlobalMessage = 10;
|
2020-10-12 11:22:41 +02:00
|
|
|
ReportPlayerMessage reportPlayerMessage = 11;
|
2020-10-16 19:13:26 +02:00
|
|
|
QueryJitsiJwtMessage queryJitsiJwtMessage = 12;
|
2020-09-28 18:52:54 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-09-24 17:24:37 +02:00
|
|
|
/************ BI-DIRECTIONAL MESSAGES **************/
|
|
|
|
|
|
|
|
message ItemEventMessage {
|
|
|
|
int32 itemId = 1;
|
|
|
|
string event = 2;
|
|
|
|
string stateJson = 3;
|
|
|
|
string parametersJson = 4;
|
|
|
|
}
|
2020-09-18 13:57:38 +02:00
|
|
|
|
2020-10-01 14:11:34 +02:00
|
|
|
message PlayGlobalMessage {
|
|
|
|
string id = 1;
|
|
|
|
string type = 2;
|
|
|
|
string message = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message StopGlobalMessage {
|
|
|
|
string id = 1;
|
|
|
|
}
|
|
|
|
|
2020-09-18 13:57:38 +02:00
|
|
|
/*********** SERVER TO CLIENT MESSAGES *************/
|
|
|
|
|
|
|
|
message UserMovedMessage {
|
|
|
|
int32 userId = 1;
|
|
|
|
PositionMessage position = 2;
|
|
|
|
}
|
2020-09-18 15:51:15 +02:00
|
|
|
|
|
|
|
message SubMessage {
|
|
|
|
oneof message {
|
|
|
|
UserMovedMessage userMovedMessage = 1;
|
2020-09-24 10:05:16 +02:00
|
|
|
GroupUpdateMessage groupUpdateMessage = 2;
|
|
|
|
GroupDeleteMessage groupDeleteMessage = 3;
|
2020-09-24 14:50:28 +02:00
|
|
|
UserJoinedMessage userJoinedMessage = 4;
|
2020-09-24 16:11:47 +02:00
|
|
|
UserLeftMessage userLeftMessage = 5;
|
2020-09-24 17:24:37 +02:00
|
|
|
ItemEventMessage itemEventMessage = 6;
|
2020-09-18 15:51:15 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
message BatchMessage {
|
|
|
|
string event = 1;
|
|
|
|
repeated SubMessage payload = 2;
|
|
|
|
}
|
2020-09-18 17:47:18 +02:00
|
|
|
|
|
|
|
message GroupUpdateMessage {
|
|
|
|
int32 groupId = 1;
|
|
|
|
PointMessage position = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GroupDeleteMessage {
|
|
|
|
int32 groupId = 1;
|
|
|
|
}
|
2020-09-24 14:50:28 +02:00
|
|
|
|
|
|
|
message UserJoinedMessage {
|
|
|
|
int32 userId = 1;
|
|
|
|
string name = 2;
|
|
|
|
repeated string characterLayers = 3;
|
|
|
|
PositionMessage position = 4;
|
|
|
|
}
|
2020-09-24 16:11:47 +02:00
|
|
|
|
|
|
|
message UserLeftMessage {
|
|
|
|
int32 userId = 1;
|
|
|
|
}
|
2020-09-28 18:52:54 +02:00
|
|
|
|
|
|
|
message ErrorMessage {
|
|
|
|
string message = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ItemStateMessage {
|
|
|
|
int32 itemId = 1;
|
|
|
|
string stateJson = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message RoomJoinedMessage {
|
|
|
|
repeated UserJoinedMessage user = 1;
|
|
|
|
repeated GroupUpdateMessage group = 2;
|
|
|
|
repeated ItemStateMessage item = 3;
|
2020-10-13 16:46:46 +02:00
|
|
|
int32 currentUserId = 4;
|
2020-10-14 11:07:34 +02:00
|
|
|
repeated string tag = 5;
|
2020-09-28 18:52:54 +02:00
|
|
|
}
|
|
|
|
|
2020-09-29 16:01:22 +02:00
|
|
|
message WebRtcStartMessage {
|
|
|
|
int32 userId = 1;
|
|
|
|
string name = 2;
|
|
|
|
bool initiator = 3;
|
|
|
|
}
|
2020-09-28 18:52:54 +02:00
|
|
|
|
2020-09-29 16:01:22 +02:00
|
|
|
message WebRtcDisconnectMessage {
|
|
|
|
int32 userId = 1;
|
|
|
|
}
|
2020-09-28 18:52:54 +02:00
|
|
|
|
2020-09-29 16:01:22 +02:00
|
|
|
message WebRtcSignalToClientMessage {
|
|
|
|
int32 userId = 1;
|
|
|
|
string signal = 2;
|
|
|
|
}
|
2020-09-28 18:52:54 +02:00
|
|
|
|
2020-10-13 11:39:07 +02:00
|
|
|
message TeleportMessageMessage{
|
|
|
|
string map = 1;
|
|
|
|
}
|
|
|
|
|
2020-10-16 19:13:26 +02:00
|
|
|
message SendJitsiJwtMessage {
|
|
|
|
string jitsiRoom = 1;
|
|
|
|
string jwt = 2;
|
|
|
|
}
|
|
|
|
|
2020-09-28 18:52:54 +02:00
|
|
|
message ServerToClientMessage {
|
|
|
|
oneof message {
|
|
|
|
BatchMessage batchMessage = 1;
|
|
|
|
ErrorMessage errorMessage = 2;
|
|
|
|
RoomJoinedMessage roomJoinedMessage = 3;
|
2020-10-13 16:46:46 +02:00
|
|
|
WebRtcStartMessage webRtcStartMessage = 4;
|
|
|
|
WebRtcSignalToClientMessage webRtcSignalToClientMessage = 5;
|
|
|
|
WebRtcSignalToClientMessage webRtcScreenSharingSignalToClientMessage = 6;
|
|
|
|
WebRtcDisconnectMessage webRtcDisconnectMessage = 7;
|
|
|
|
PlayGlobalMessage playGlobalMessage = 8;
|
|
|
|
StopGlobalMessage stopGlobalMessage = 9;
|
2020-10-13 20:39:29 +02:00
|
|
|
TeleportMessageMessage teleportMessageMessage = 10;
|
2020-10-16 19:13:26 +02:00
|
|
|
SendJitsiJwtMessage sendJitsiJwtMessage = 11;
|
2020-09-28 18:52:54 +02:00
|
|
|
}
|
|
|
|
}
|