rust-nex/rnex-core/src/rmc/protocols/matchmake.rs

22 lines
701 B
Rust
Raw Normal View History

2025-05-12 10:28:54 +02:00
use macros::{method_id, rmc_proto};
2025-09-21 15:59:27 +02:00
use rnex_core::prudp::station_url::StationUrl;
use rnex_core::rmc::response::ErrorCode;
2025-05-12 10:28:54 +02:00
2026-03-24 15:48:56 +01:00
use rnex_core::PID;
2025-05-12 10:28:54 +02:00
#[rmc_proto(21)]
2026-03-24 15:48:56 +01:00
pub trait Matchmake {
2025-05-12 10:28:54 +02:00
#[method_id(2)]
async fn unregister_gathering(&self, gid: u32) -> Result<bool, ErrorCode>;
#[method_id(41)]
async fn get_session_urls(&self, gid: u32) -> Result<Vec<StationUrl>, ErrorCode>;
#[method_id(42)]
async fn update_session_host(&self, gid: u32, change_owner: bool) -> Result<(), ErrorCode>;
2025-05-15 20:53:56 +02:00
#[method_id(44)]
2026-03-24 15:48:56 +01:00
async fn migrate_gathering_ownership(
&self,
gid: u32,
candidates: Vec<PID>,
participants_only: bool,
) -> Result<(), ErrorCode>;
}