songbird/driver/tasks/message/
core.rs1#![allow(missing_docs)]
2
3use crate::{
4 driver::{connection::error::Error, Bitrate, Config},
5 events::{context_data::DisconnectReason, EventData},
6 tracks::{Track, TrackCommand, TrackHandle},
7 ConnectionInfo,
8};
9use flume::{Receiver, Sender};
10
11pub enum CoreMessage {
12 ConnectWithResult(ConnectionInfo, Sender<Result<(), Error>>),
13 RetryConnect(usize),
14 SignalWsClosure(usize, ConnectionInfo, Option<DisconnectReason>),
15 Disconnect,
16 SetTrack(Option<TrackContext>),
17 AddTrack(TrackContext),
18 SetBitrate(Bitrate),
19 AddEvent(EventData),
20 RemoveGlobalEvents,
21 SetConfig(Config),
22 Mute(bool),
23 Reconnect,
24 FullReconnect,
25 RebuildInterconnect,
26 Poison,
27}
28
29pub struct TrackContext {
30 pub track: Track,
31 pub handle: TrackHandle,
32 pub receiver: Receiver<TrackCommand>,
33}