1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
use crate::{
db::{AccessoryListMember, AccessoryListPtr},
Error,
};
pub mod bonjour;
pub mod mdns;
pub(crate) mod http;
mod ip;
mod tcp;
pub use self::ip::IpTransport;
pub trait Transport {
fn start(&mut self) -> Result<(), Error>;
fn stop(&self) -> Result<(), Error>;
fn add_accessory<A: 'static + AccessoryListMember + Send>(
&mut self,
accessory: A,
) -> Result<AccessoryListPtr, Error>;
fn remove_accessory(&mut self, accessory: &AccessoryListPtr) -> Result<(), Error>;
}