You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
1.4 KiB
65 lines
1.4 KiB
syntax = "proto3";
|
|
import "google/protobuf/empty.proto";
|
|
import "common.proto";
|
|
import "connection.proto";
|
|
import "lobby.proto";
|
|
import "game.proto";
|
|
|
|
package protocol;
|
|
|
|
message ClientServerPacket {
|
|
oneof data {
|
|
// CONNECTION
|
|
google.protobuf.Empty queryName = 1;
|
|
common.Name connect = 2;
|
|
google.protobuf.Empty disconnect = 3;
|
|
connection.LobbyCode joinLobby = 4;
|
|
connection.LobbyConfig createLobby = 5;
|
|
google.protobuf.Empty queryGames = 6;
|
|
google.protobuf.Empty queryPublicLobbies = 7;
|
|
|
|
// LOBBY
|
|
google.protobuf.Empty queryUsers = 8;
|
|
lobby.SingleVote vote = 9;
|
|
google.protobuf.Empty ready = 10;
|
|
google.protobuf.Empty leave = 11;
|
|
|
|
// GAME
|
|
game.CardKind queryCardImage = 12;
|
|
game.CardId callOnClick = 13;
|
|
google.protobuf.Empty queryGameStatus = 14;
|
|
game.CardKind queryCardImages = 15;
|
|
}
|
|
}
|
|
|
|
message ServerClientPacket {
|
|
oneof data {
|
|
// CONNECTION
|
|
common.Name returnName = 1;
|
|
connection.UserID returnConnect = 2;
|
|
connection.LobbyCode returnCreateLobby = 3;
|
|
Games returnGames = 4;
|
|
LobbyCodes returnPublicLobbies = 5;
|
|
|
|
// LOBBY
|
|
Names returnUsers = 6;
|
|
lobby.LobbyStatus lobbyStatus = 7;
|
|
|
|
// GAME
|
|
game.Image returnCardImage = 8;
|
|
game.Images returnCardsImages = 10;
|
|
game.GameStatus gameStatus = 9;
|
|
}
|
|
}
|
|
|
|
message Games {
|
|
repeated connection.Game games = 1;
|
|
}
|
|
|
|
message LobbyCodes {
|
|
repeated connection.LobbyCode lobbyCodes = 1;
|
|
}
|
|
|
|
message Names {
|
|
repeated common.Name names = 1;
|
|
}
|