diff --git a/jarust_plugins/Cargo.toml b/jarust_plugins/Cargo.toml index 125b007..4352c72 100644 --- a/jarust_plugins/Cargo.toml +++ b/jarust_plugins/Cargo.toml @@ -23,8 +23,8 @@ tokio = { workspace = true, features = ["sync"] } tracing.workspace = true [features] -default = ["echotest", "audio_bridge", "video_room"] -echotest = [] +default = ["echo_test", "audio_bridge", "video_room"] +echo_test = [] audio_bridge = [] video_room = [] diff --git a/jarust_plugins/examples/echotest.rs b/jarust_plugins/examples/echotest.rs index 7d4c43e..7d69ce0 100644 --- a/jarust_plugins/examples/echotest.rs +++ b/jarust_plugins/examples/echotest.rs @@ -1,9 +1,9 @@ use jarust::jaconfig::JaConfig; use jarust::jaconfig::TransportType; -use jarust_plugins::echotest::events::EchoTestEvent; -use jarust_plugins::echotest::events::PluginEvent; -use jarust_plugins::echotest::jahandle_ext::EchoTest; -use jarust_plugins::echotest::msg_options::StartOptions; +use jarust_plugins::echo_test::events::EchoTestEvent; +use jarust_plugins::echo_test::events::PluginEvent; +use jarust_plugins::echo_test::jahandle_ext::EchoTest; +use jarust_plugins::echo_test::msg_options::StartOptions; use std::path::Path; use tracing_subscriber::EnvFilter; @@ -18,7 +18,7 @@ async fn main() -> anyhow::Result<()> { let config = JaConfig::builder().url("ws://localhost:8188/ws").build(); let mut connection = jarust::connect(config, TransportType::Ws).await?; let session = connection.create(10).await?; - let (handle, mut event_receiver) = session.attach_echotest().await?; + let (handle, mut event_receiver) = session.attach_echo_test().await?; handle .start(StartOptions { diff --git a/jarust_plugins/examples/echotest_start_with_establishment.rs b/jarust_plugins/examples/echotest_start_with_establishment.rs index 5e716bc..d35f17c 100644 --- a/jarust_plugins/examples/echotest_start_with_establishment.rs +++ b/jarust_plugins/examples/echotest_start_with_establishment.rs @@ -3,10 +3,10 @@ use jarust::jaconfig::TransportType; use jarust::japrotocol::EstablishmentProtocol; use jarust::japrotocol::Jsep; use jarust::japrotocol::JsepType; -use jarust_plugins::echotest::events::EchoTestEvent; -use jarust_plugins::echotest::events::PluginEvent; -use jarust_plugins::echotest::jahandle_ext::EchoTest; -use jarust_plugins::echotest::msg_options::StartOptions; +use jarust_plugins::echo_test::events::EchoTestEvent; +use jarust_plugins::echo_test::events::PluginEvent; +use jarust_plugins::echo_test::jahandle_ext::EchoTest; +use jarust_plugins::echo_test::msg_options::StartOptions; use std::path::Path; use tracing_subscriber::EnvFilter; @@ -21,7 +21,7 @@ async fn main() -> anyhow::Result<()> { let config = JaConfig::builder().url("ws://localhost:8188/ws").build(); let mut connection = jarust::connect(config, TransportType::Ws).await?; let session = connection.create(10).await?; - let (handle, mut event_receiver) = session.attach_echotest().await?; + let (handle, mut event_receiver) = session.attach_echo_test().await?; let rsp = handle .start_with_establishment( diff --git a/jarust_plugins/src/audio_bridge/responses.rs b/jarust_plugins/src/audio_bridge/responses.rs index 058cdaa..4729497 100644 --- a/jarust_plugins/src/audio_bridge/responses.rs +++ b/jarust_plugins/src/audio_bridge/responses.rs @@ -1,4 +1,5 @@ -use super::common::{Identifier, Participant}; +use super::common::Identifier; +use super::common::Participant; use serde::Deserialize; #[derive(Debug, Deserialize)] diff --git a/jarust_plugins/src/echotest/events.rs b/jarust_plugins/src/echo_test/events.rs similarity index 98% rename from jarust_plugins/src/echotest/events.rs rename to jarust_plugins/src/echo_test/events.rs index 43523f0..c9d781a 100644 --- a/jarust_plugins/src/echotest/events.rs +++ b/jarust_plugins/src/echo_test/events.rs @@ -65,7 +65,7 @@ impl TryFrom for PluginEvent { #[cfg(test)] mod tests { use super::PluginEvent; - use crate::echotest::events::EchoTestEvent; + use crate::echo_test::events::EchoTestEvent; use jarust::japrotocol::EstablishmentProtocol; use jarust::japrotocol::JaHandleEvent; use jarust::japrotocol::JaResponse; diff --git a/jarust_plugins/src/echotest/handle.rs b/jarust_plugins/src/echo_test/handle.rs similarity index 100% rename from jarust_plugins/src/echotest/handle.rs rename to jarust_plugins/src/echo_test/handle.rs diff --git a/jarust_plugins/src/echotest/jahandle_ext.rs b/jarust_plugins/src/echo_test/jahandle_ext.rs similarity index 97% rename from jarust_plugins/src/echotest/jahandle_ext.rs rename to jarust_plugins/src/echo_test/jahandle_ext.rs index d8fdcb9..2a9ac4a 100644 --- a/jarust_plugins/src/echotest/jahandle_ext.rs +++ b/jarust_plugins/src/echo_test/jahandle_ext.rs @@ -9,7 +9,7 @@ pub trait EchoTest: Attach { type Event: TryFrom + Send + Sync + 'static; type Handle: From + Deref + PluginTask; - async fn attach_echotest( + async fn attach_echo_test( &self, ) -> JaResult<(Self::Handle, mpsc::UnboundedReceiver)> { let (handle, mut receiver) = self.attach("janus.plugin.echotest").await?; diff --git a/jarust_plugins/src/echotest/mod.rs b/jarust_plugins/src/echo_test/mod.rs similarity index 100% rename from jarust_plugins/src/echotest/mod.rs rename to jarust_plugins/src/echo_test/mod.rs diff --git a/jarust_plugins/src/echotest/msg_options.rs b/jarust_plugins/src/echo_test/msg_options.rs similarity index 100% rename from jarust_plugins/src/echotest/msg_options.rs rename to jarust_plugins/src/echo_test/msg_options.rs diff --git a/jarust_plugins/src/lib.rs b/jarust_plugins/src/lib.rs index 0e3c86e..d30572c 100644 --- a/jarust_plugins/src/lib.rs +++ b/jarust_plugins/src/lib.rs @@ -1,5 +1,5 @@ -#[cfg(feature = "echotest")] -pub mod echotest; +#[cfg(feature = "echo_test")] +pub mod echo_test; #[cfg(feature = "audio_bridge")] pub mod audio_bridge;