pub struct AvrcpFacade { /* private fields */ }
Implementations§
Source§impl AvrcpFacade
impl AvrcpFacade
pub fn new() -> AvrcpFacade
Sourcepub async fn init_avrcp(&self, id: u64) -> Result<(), Error>
pub async fn init_avrcp(&self, id: u64) -> Result<(), Error>
Initialize the AVRCP service and retrieve the controller for the provided Bluetooth target id.
§Arguments
id
- A u64 representing the device ID.
Sourcepub async fn get_media_attributes(&self) -> Result<String, Error>
pub async fn get_media_attributes(&self) -> Result<String, Error>
Returns the media attributes from the controller.
Sourcepub async fn get_play_status(&self) -> Result<CustomPlayStatus, Error>
pub async fn get_play_status(&self) -> Result<CustomPlayStatus, Error>
Returns the play status from the controller.
Sourcepub async fn send_command(
&self,
command: CustomAvcPanelCommand,
) -> Result<(), Error>
pub async fn send_command( &self, command: CustomAvcPanelCommand, ) -> Result<(), Error>
Sends an AVCPanelCommand to the controller.
§Arguments
command
- an enum representing the AVCPanelCommand.
Sourcepub async fn set_absolute_volume(
&self,
absolute_volume: u8,
) -> Result<u8, Error>
pub async fn set_absolute_volume( &self, absolute_volume: u8, ) -> Result<u8, Error>
Sends an AVCPanelCommand to the controller.
§Arguments
absolute_volume
- the value to which the volume is set.
Sourcepub async fn get_player_application_settings(
&self,
attribute_ids: CustomPlayerApplicationSettingsAttributeIds,
) -> Result<CustomPlayerApplicationSettings, Error>
pub async fn get_player_application_settings( &self, attribute_ids: CustomPlayerApplicationSettingsAttributeIds, ) -> Result<CustomPlayerApplicationSettings, Error>
Returns the player application settings from the controller.
§Arguments
attribute_ids
- the attribute ids for the application settings to return. If empty, returns all.
Sourcepub async fn set_player_application_settings(
&self,
settings: CustomPlayerApplicationSettings,
) -> Result<CustomPlayerApplicationSettings, Error>
pub async fn set_player_application_settings( &self, settings: CustomPlayerApplicationSettings, ) -> Result<CustomPlayerApplicationSettings, Error>
Sets the player application settings on the controller.
§Arguments
settings
- the player application settings to set.
Sourcepub async fn inform_battery_status(
&self,
battery_status: CustomBatteryStatus,
) -> Result<(), Error>
pub async fn inform_battery_status( &self, battery_status: CustomBatteryStatus, ) -> Result<(), Error>
Sourcepub async fn set_addressed_player(&self, player_id: u16) -> Result<(), Error>
pub async fn set_addressed_player(&self, player_id: u16) -> Result<(), Error>
Sets addressed player on the controller.
§Arguments
player_id
- the player id to set as the addressed player.
Sourcepub async fn set_notification_filter(
&self,
notifications_filter: u32,
position_change_interval: u32,
) -> Result<(), Error>
pub async fn set_notification_filter( &self, notifications_filter: u32, position_change_interval: u32, ) -> Result<(), Error>
Sets notification filter on the controller.
§Arguments
notifications_filter
- the notification ids as bit flags for which to filter.position_change_interval
- the interval in seconds that the controller client would like to be notified ofTRACK_POS_CHANGED
events. It is ignored if ‘TRACK_POS’ bit flag is not set.
Sourcepub async fn notify_notification_handled(&self) -> Result<(), Error>
pub async fn notify_notification_handled(&self) -> Result<(), Error>
Notifies that the OnNotification event was handled.
Trait Implementations§
Source§impl Debug for AvrcpFacade
impl Debug for AvrcpFacade
Source§impl Facade for AvrcpFacade
impl Facade for AvrcpFacade
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,
Asynchronously handle the incoming request for the given method and arguments, returning a
future object representing the pending operation.
Auto Trait Implementations§
impl !Freeze for AvrcpFacade
impl !RefUnwindSafe for AvrcpFacade
impl Send for AvrcpFacade
impl Sync for AvrcpFacade
impl Unpin for AvrcpFacade
impl !UnwindSafe for AvrcpFacade
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
Mutably borrows from an owned value. Read more
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> OptionalField for Twhere
T: ?Sized,
impl<T> OptionalField for Twhere
T: ?Sized,
§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
type Error = <U as TryFromExt<T>>::Error
Source§fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
Tries to perform the conversion.