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.
38 lines
940 B
38 lines
940 B
syntax = "proto3";
|
|
|
|
import "google/protobuf/timestamp.proto";
|
|
import "google/protobuf/empty.proto";
|
|
import "common.proto";
|
|
|
|
package lobby;
|
|
|
|
// Lobby functionality (client_id required for most of them)
|
|
service Lobby {
|
|
rpc users(google.protobuf.Empty) returns(stream common.Name);
|
|
rpc vote(SingleVote) returns(google.protobuf.Empty);
|
|
rpc ready(google.protobuf.Empty) returns(google.protobuf.Empty);
|
|
rpc hasNewStatus(LastStatusTimestamp) returns(HasNewStatus);
|
|
rpc getStatus(google.protobuf.Empty) returns(LobbyStatus);
|
|
rpc leave(google.protobuf.Empty) returns(google.protobuf.Empty);
|
|
}
|
|
|
|
message HasNewStatus { bool value = 1; }
|
|
|
|
message LastStatusTimestamp {
|
|
google.protobuf.Timestamp time = 1;
|
|
uint32 lobby = 2;
|
|
}
|
|
|
|
message Vote {
|
|
string player = 1;
|
|
uint32 game = 2;
|
|
bool ready = 3;
|
|
}
|
|
|
|
message SingleVote { uint32 game = 2; }
|
|
|
|
message LobbyStatus {
|
|
repeated common.Name names = 1;
|
|
repeated Vote votes = 2;
|
|
bool isStarting = 3;
|
|
}
|