generated from VLADIMIR/template
Добавить API таймера экранов
This commit is contained in:
+61
-23
@@ -656,6 +656,17 @@ service EveningDetectiveServer {
|
||||
};
|
||||
}
|
||||
|
||||
rpc SetScreenTimer(SetScreenTimerReq) returns (SetScreenTimerRsp) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/games/{gameId}/screens/timer"
|
||||
body: "*"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
tags : "Экраны";
|
||||
summary: "Настроить таймер экранов";
|
||||
};
|
||||
}
|
||||
|
||||
// Отправить общую команду экранам игры.
|
||||
rpc SendScreenCommand(SendScreenCommandReq) returns (SendScreenCommandRsp) {
|
||||
option (google.api.http) = {
|
||||
@@ -1425,35 +1436,52 @@ enum ScreenMode {
|
||||
SCREEN_MODE_CONCLUSION = 4;
|
||||
SCREEN_MODE_CONCLUSION_DONE = 5;
|
||||
SCREEN_MODE_RESULTS = 6;
|
||||
SCREEN_MODE_TIMER = 7;
|
||||
}
|
||||
|
||||
enum ScreenTimerState {
|
||||
SCREEN_TIMER_STATE_UNSPECIFIED = 0;
|
||||
SCREEN_TIMER_STATE_STOPPED = 1;
|
||||
SCREEN_TIMER_STATE_RUNNING = 2;
|
||||
SCREEN_TIMER_STATE_PAUSED = 3;
|
||||
SCREEN_TIMER_STATE_FINISHED = 4;
|
||||
}
|
||||
|
||||
enum ScreenCommand {
|
||||
SCREEN_COMMAND_UNSPECIFIED = 0;
|
||||
SCREEN_COMMAND_PLAY = 1;
|
||||
SCREEN_COMMAND_PAUSE = 2;
|
||||
SCREEN_COMMAND_RESUME = 3;
|
||||
SCREEN_COMMAND_STOP = 4;
|
||||
SCREEN_COMMAND_REPLAY = 5;
|
||||
SCREEN_COMMAND_SEEK = 6;
|
||||
SCREEN_COMMAND_VOLUME = 7;
|
||||
SCREEN_COMMAND_UNSPECIFIED = 0;
|
||||
SCREEN_COMMAND_PLAY = 1;
|
||||
SCREEN_COMMAND_PAUSE = 2;
|
||||
SCREEN_COMMAND_RESUME = 3;
|
||||
SCREEN_COMMAND_STOP = 4;
|
||||
SCREEN_COMMAND_REPLAY = 5;
|
||||
SCREEN_COMMAND_SEEK = 6;
|
||||
SCREEN_COMMAND_VOLUME = 7;
|
||||
SCREEN_COMMAND_TIMER_START = 8;
|
||||
SCREEN_COMMAND_TIMER_PAUSE = 9;
|
||||
SCREEN_COMMAND_TIMER_RESUME = 10;
|
||||
SCREEN_COMMAND_TIMER_RESET = 11;
|
||||
}
|
||||
|
||||
message ScreenState {
|
||||
string id = 1;
|
||||
string status = 2;
|
||||
optional int32 game_id = 3;
|
||||
ScreenMode mode = 4;
|
||||
bool sound_enabled = 5;
|
||||
string error = 6;
|
||||
int64 state_version = 7;
|
||||
int64 position_ms = 8;
|
||||
string game_name = 9;
|
||||
string cover_image = 10;
|
||||
string intro_audio = 11;
|
||||
string conclusion_video = 12;
|
||||
ScreenCommand command = 13;
|
||||
int32 volume = 14;
|
||||
string background_image = 15;
|
||||
string id = 1;
|
||||
string status = 2;
|
||||
optional int32 game_id = 3;
|
||||
ScreenMode mode = 4;
|
||||
bool sound_enabled = 5;
|
||||
string error = 6;
|
||||
int64 state_version = 7;
|
||||
int64 position_ms = 8;
|
||||
string game_name = 9;
|
||||
string cover_image = 10;
|
||||
string intro_audio = 11;
|
||||
string conclusion_video = 12;
|
||||
ScreenCommand command = 13;
|
||||
int32 volume = 14;
|
||||
string background_image = 15;
|
||||
string timer_label = 16;
|
||||
int64 timer_duration_seconds = 17;
|
||||
int64 timer_remaining_seconds = 18;
|
||||
ScreenTimerState timer_state = 19;
|
||||
}
|
||||
|
||||
message CreateScreenSessionReq {}
|
||||
@@ -1551,6 +1579,16 @@ message SetScreenModeRsp {
|
||||
string error = 1;
|
||||
}
|
||||
|
||||
message SetScreenTimerReq {
|
||||
int32 gameId = 1;
|
||||
int64 duration_seconds = 2;
|
||||
string label = 3;
|
||||
}
|
||||
|
||||
message SetScreenTimerRsp {
|
||||
string error = 1;
|
||||
}
|
||||
|
||||
message SendScreenCommandReq {
|
||||
int32 gameId = 1;
|
||||
ScreenCommand command = 2;
|
||||
|
||||
Reference in New Issue
Block a user