pub struct AvdtpFacade { /* private fields */ }
Implementations§
Source§impl AvdtpFacade
Perform Bluetooth AVDTP fucntions for both Sink and Source.
impl AvdtpFacade
Perform Bluetooth AVDTP fucntions for both Sink and Source.
Note this object is shared among all threads created by server.
pub fn new() -> AvdtpFacade
Sourcepub async fn init_avdtp_service_proxy(&self) -> Result<(), Error>
pub async fn init_avdtp_service_proxy(&self) -> Result<(), Error>
Initialize the Avdtp service and starts A2DP.
Sourcepub async fn get_connected_peers(&self) -> Result<Vec<u64>, Error>
pub async fn get_connected_peers(&self) -> Result<Vec<u64>, Error>
Gets the currently connected peers.
Sourcepub async fn set_configuration(&self, peer_id: u64) -> Result<(), Error>
pub async fn set_configuration(&self, peer_id: u64) -> Result<(), Error>
Initiate a stream configuration procedure for the input peer_id.
§Arguments
peer_id
: The peer id associated with the PeerController.
Sourcepub async fn get_configuration(&self, peer_id: u64) -> Result<(), Error>
pub async fn get_configuration(&self, peer_id: u64) -> Result<(), Error>
Initiate a procedure to get the configuration information of the peer stream for the input peer_id.
§Arguments
peer_id
: The peer id associated with the PeerController.
Sourcepub async fn get_capabilities(&self, peer_id: u64) -> Result<(), Error>
pub async fn get_capabilities(&self, peer_id: u64) -> Result<(), Error>
Initiate a procedure to get the capabilities for the input peer_id.
§Arguments
peer_id
: The peer id associated with the PeerController.
Sourcepub async fn get_all_capabilities(&self, peer_id: u64) -> Result<(), Error>
pub async fn get_all_capabilities(&self, peer_id: u64) -> Result<(), Error>
Initiate a procedure to get all the capabilities for the input peer_id.
§Arguments
peer_id
: The peer id associated with the PeerController.
Sourcepub async fn reconfigure_stream(&self, peer_id: u64) -> Result<(), Error>
pub async fn reconfigure_stream(&self, peer_id: u64) -> Result<(), Error>
Initiate a suspend request to the stream for the input peer_id. This command will not resume nor reconfigure the stream.
§Arguments
peer_id
: The peer id associated with the PeerController.
Sourcepub async fn suspend_stream(&self, peer_id: u64) -> Result<(), Error>
pub async fn suspend_stream(&self, peer_id: u64) -> Result<(), Error>
A “chained” set of procedures on the current stream for the input peer_id. SuspendStream() followed by ReconfigureStream(). Reconfigure() configures the stream that is currently open.
§Arguments
peer_id
: The peer id associated with the PeerController.
Sourcepub async fn suspend_and_reconfigure(&self, peer_id: u64) -> Result<(), Error>
pub async fn suspend_and_reconfigure(&self, peer_id: u64) -> Result<(), Error>
Initiate a procedure to get the capabilities for the input peer_id.
§Arguments
peer_id
: The peer id associated with the PeerController.
Sourcepub async fn release_stream(&self, peer_id: u64) -> Result<(), Error>
pub async fn release_stream(&self, peer_id: u64) -> Result<(), Error>
Release the current stream that is owned by the input peer_id. If the streaming channel doesn’t exist, no action will be taken.
§Arguments
peer_id
: The peer id associated with the PeerController.
Sourcepub async fn establish_stream(&self, peer_id: u64) -> Result<(), Error>
pub async fn establish_stream(&self, peer_id: u64) -> Result<(), Error>
Initiate stream establishment for the input peer_id.
§Arguments
peer_id
: The peer id associated with the PeerController.
Sourcepub async fn start_stream(&self, peer_id: u64) -> Result<(), Error>
pub async fn start_stream(&self, peer_id: u64) -> Result<(), Error>
Start stream for the input peer_id.
§Arguments
peer_id
: The peer id associated with the PeerController.
Sourcepub async fn abort_stream(&self, peer_id: u64) -> Result<(), Error>
pub async fn abort_stream(&self, peer_id: u64) -> Result<(), Error>
Abort stream for the input peer_id.
§Arguments
peer_id
: The peer id associated with the PeerController.
Sourcepub async fn remove_service(&self)
pub async fn remove_service(&self)
A function to remove the profile service proxy and clear connected devices.
Trait Implementations§
Source§impl Debug for AvdtpFacade
impl Debug for AvdtpFacade
Source§impl Facade for AvdtpFacade
impl Facade for AvdtpFacade
Source§fn handle_request<'life0, 'async_trait>(
&'life0 self,
method: String,
args: Value,
) -> Pin<Box<dyn Future<Output = Result<Value, Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_request<'life0, 'async_trait>(
&'life0 self,
method: String,
args: Value,
) -> Pin<Box<dyn Future<Output = Result<Value, Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl !Freeze for AvdtpFacade
impl !RefUnwindSafe for AvdtpFacade
impl Send for AvdtpFacade
impl Sync for AvdtpFacade
impl Unpin for AvdtpFacade
impl !UnwindSafe for AvdtpFacade
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more