mirror of
https://github.com/ratspeak/rsLXST
synced 2026-11-22 23:10:37 +00:00
api: preserve host type paths in shared LXST sources
This commit is contained in:
1 parent
f301dfbda6
commit
7d3e17c71d
9 files changed
+34
-39
No files matched your search
@@ -17,8 +17,6 @@ mod stream;
|
||||
mod synthetic;
|
||||
mod telephony;
|
||||
mod wire;
|
||||
#[path = "shared/wire_types.rs"]
|
||||
mod wire_types;
|
||||
|
||||
pub use codec2::{Codec2Backend, Codec2PacketCodec, Codec2PacketError};
|
||||
pub use opus::{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use crate::Signal;
|
||||
use crate::call_state::TelephonyAction;
|
||||
use crate::TelephonyAction;
|
||||
|
||||
/// Every current transition emits at most four ordered actions.
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
use crate::{Profile, Signal, SignallingStatus};
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub enum CallRole {
|
||||
Incoming,
|
||||
Outgoing,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum TelephonyAction {
|
||||
SendSignal(Signal),
|
||||
IdentifyLocalIdentity,
|
||||
SelectProfile(Profile),
|
||||
PrepareDialingPipelines,
|
||||
ResetDialingPipelines,
|
||||
OpenAudioPipelines,
|
||||
StartAudioPipelines,
|
||||
StartDialTone,
|
||||
Terminate(Option<SignallingStatus>),
|
||||
TeardownLink,
|
||||
RingIncomingCall,
|
||||
SwitchProfile(Profile),
|
||||
IgnoreSignal(Signal),
|
||||
}
|
||||
@@ -1,33 +1,10 @@
|
||||
use crate::actions::Actions;
|
||||
use crate::{Profile, Signal, SignallingStatus};
|
||||
use crate::{CallRole, Profile, Signal, SignallingStatus, TelephonyAction};
|
||||
|
||||
macro_rules! actions {
|
||||
($($value:expr),* $(,)?) => { Actions::from_array([$($value),*]) };
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub enum CallRole {
|
||||
Incoming,
|
||||
Outgoing,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum TelephonyAction {
|
||||
SendSignal(Signal),
|
||||
IdentifyLocalIdentity,
|
||||
SelectProfile(Profile),
|
||||
PrepareDialingPipelines,
|
||||
ResetDialingPipelines,
|
||||
OpenAudioPipelines,
|
||||
StartAudioPipelines,
|
||||
StartDialTone,
|
||||
Terminate(Option<SignallingStatus>),
|
||||
TeardownLink,
|
||||
RingIncomingCall,
|
||||
SwitchProfile(Profile),
|
||||
IgnoreSignal(Signal),
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct CallState {
|
||||
role: CallRole,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
// Shared directly with lxst-embedded. The enclosing wire module supplies its
|
||||
// own error type; wire identifiers and conversions have one implementation.
|
||||
use crate::profile::{Profile, SignallingStatus};
|
||||
use crate::wire::Error;
|
||||
const PREFERRED_PROFILE_BASE: u32 = 0xFF;
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
use crate::call_state::CallState;
|
||||
pub use crate::call_state::{CallRole, TelephonyAction};
|
||||
use crate::{Profile, Signal, SignallingStatus};
|
||||
include!("shared/call_types.rs");
|
||||
|
||||
/// Allocating host facade over the same bounded transition core used on MCUs.
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
|
||||
@@ -3,9 +3,6 @@ use rmpv::decode::read_value;
|
||||
use rmpv::encode::write_value;
|
||||
use thiserror::Error;
|
||||
|
||||
#[cfg(test)]
|
||||
use crate::profile::Profile;
|
||||
|
||||
pub const FIELD_SIGNALLING: u8 = 0x00;
|
||||
pub const FIELD_FRAMES: u8 = 0x01;
|
||||
|
||||
@@ -45,7 +42,7 @@ pub enum Error {
|
||||
UnknownCodec2Mode(u8),
|
||||
}
|
||||
|
||||
pub use crate::wire_types::{Codec2Mode, CodecKind, Signal};
|
||||
include!("shared/wire_types.rs");
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct Frame {
|
||||
|
||||
@@ -11,13 +11,14 @@ mod call_state;
|
||||
#[path = "../../lxst-core/src/shared/profile.rs"]
|
||||
mod profile;
|
||||
pub mod wire;
|
||||
#[path = "../../lxst-core/src/shared/wire_types.rs"]
|
||||
mod wire_types;
|
||||
|
||||
pub use actions::Actions;
|
||||
pub use call_state::{CallRole, CallState, TelephonyAction};
|
||||
pub use call_state::CallState;
|
||||
#[path = "../../lxst-core/src/shared/call_types.rs"]
|
||||
mod call_types;
|
||||
pub use call_types::{CallRole, TelephonyAction};
|
||||
pub use profile::{AudioCodec, OpusApplication, OpusProfile, Profile, SignallingStatus};
|
||||
pub use wire_types::{Codec2Mode, CodecKind, Signal};
|
||||
pub use wire::{Codec2Mode, CodecKind, Signal};
|
||||
|
||||
#[path = "../../lxst-core/src/shared/codec2.rs"]
|
||||
mod codec2;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//! Borrowed, bounded MessagePack adaptation of lxst-core::wire.
|
||||
use crate::{CodecKind, Signal};
|
||||
include!("../../lxst-core/src/shared/wire_types.rs");
|
||||
|
||||
pub const MAX_PACKET_BYTES: usize = 512;
|
||||
pub const MAX_FRAME_BYTES: usize = 256;
|
||||
|
||||
Reference in new issue
Block a user