mirror of
https://github.com/librespot-org/librespot.git
synced 2024-11-08 16:45:43 +00:00
core API: dispatch
This commit is contained in:
parent
d34068c5a7
commit
434b824c6e
3 changed files with 3 additions and 3 deletions
|
@ -22,7 +22,7 @@ component! {
|
|||
}
|
||||
|
||||
impl AudioKeyManager {
|
||||
pub fn dispatch(&self, cmd: u8, mut data: Bytes) {
|
||||
pub(crate) fn dispatch(&self, cmd: u8, mut data: Bytes) {
|
||||
let seq = BigEndian::read_u32(data.split_to(4).as_ref());
|
||||
|
||||
let sender = self.lock(|inner| inner.pending.remove(&seq));
|
||||
|
|
|
@ -54,7 +54,7 @@ impl ChannelManager {
|
|||
(seq, channel)
|
||||
}
|
||||
|
||||
pub fn dispatch(&self, cmd: u8, mut data: Bytes) {
|
||||
pub(crate) fn dispatch(&self, cmd: u8, mut data: Bytes) {
|
||||
use std::collections::hash_map::Entry;
|
||||
|
||||
let id: u16 = BigEndian::read_u16(data.split_to(2).as_ref());
|
||||
|
|
|
@ -136,7 +136,7 @@ impl MercuryManager {
|
|||
}))
|
||||
}
|
||||
|
||||
pub fn dispatch(&self, cmd: u8, mut data: Bytes) {
|
||||
pub(crate) fn dispatch(&self, cmd: u8, mut data: Bytes) {
|
||||
let seq_len = BigEndian::read_u16(data.split_to(2).as_ref()) as usize;
|
||||
let seq = data.split_to(seq_len).as_ref().to_owned();
|
||||
|
||||
|
|
Loading…
Reference in a new issue