Skip to content

Commit

Permalink
refactor(echo-test): echotest -> echo_test
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghamza-Jd committed Jun 4, 2024
1 parent f9fc297 commit 308370f
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 17 deletions.
4 changes: 2 additions & 2 deletions jarust_plugins/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []

Expand Down
10 changes: 5 additions & 5 deletions jarust_plugins/examples/echotest.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand All @@ -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 {
Expand Down
10 changes: 5 additions & 5 deletions jarust_plugins/examples/echotest_start_with_establishment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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(
Expand Down
3 changes: 2 additions & 1 deletion jarust_plugins/src/audio_bridge/responses.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use super::common::{Identifier, Participant};
use super::common::Identifier;
use super::common::Participant;
use serde::Deserialize;

#[derive(Debug, Deserialize)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl TryFrom<JaResponse> 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;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub trait EchoTest: Attach {
type Event: TryFrom<JaResponse, Error = JaError> + Send + Sync + 'static;
type Handle: From<JaHandle> + Deref<Target = JaHandle> + PluginTask;

async fn attach_echotest(
async fn attach_echo_test(
&self,
) -> JaResult<(Self::Handle, mpsc::UnboundedReceiver<Self::Event>)> {
let (handle, mut receiver) = self.attach("janus.plugin.echotest").await?;
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions jarust_plugins/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit 308370f

Please sign in to comment.