Skip to main content

opentalk_roomserver_types_timer/
state.rs

1// SPDX-FileCopyrightText: OpenTalk GmbH <mail@opentalk.eu>
2//
3// SPDX-License-Identifier: EUPL-1.2
4
5use serde::{Deserialize, Serialize};
6
7use crate::TimerConfig;
8
9/// Status of and belonging to a currently active timer
10#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
11pub struct TimerState {
12    /// config of the timer
13    #[serde(flatten)]
14    pub config: TimerConfig,
15
16    /// Flag to indicate that the current participant has marked themselves as ready
17    #[serde(skip_serializing_if = "Option::is_none")]
18    pub ready_status: Option<bool>,
19}
20
21impl opentalk_types_signaling::SignalingModuleFrontendData for TimerState {
22    const NAMESPACE: Option<opentalk_types_common::modules::ModuleId> =
23        Some(crate::TIMER_MODULE_ID);
24}