pub struct AudioModeSynchronousProxy { /* private fields */ }
Implementations§
source§impl AudioModeSynchronousProxy
impl AudioModeSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
sourcepub fn wait_for_event(&self, deadline: Time) -> Result<AudioModeEvent, Error>
pub fn wait_for_event(&self, deadline: Time) -> Result<AudioModeEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
sourcepub fn set_role(&self, role: Role, ___deadline: Time) -> Result<(), Error>
pub fn set_role(&self, role: Role, ___deadline: Time) -> Result<(), Error>
Switch the device to act as the specified A2DP Role. If the device is already set to the requested role, calling this method is a no-op.
When this method returns, a client can depend on the following:
- If the role was switched, the previous profile has requested removal from the hosts’ SDP databases, and all L2CAP channels associated with the previous profile have initiated or completed the process of closing.
- The device is in the requested A2DP role.
If the role cannot be set due to an internal error, the server will close the channel.