pub enum TargetHandlerRequest {
GetEventsSupported {
responder: TargetHandlerGetEventsSupportedResponder,
},
GetMediaAttributes {
responder: TargetHandlerGetMediaAttributesResponder,
},
GetPlayStatus {
responder: TargetHandlerGetPlayStatusResponder,
},
SendCommand {
command: AvcPanelCommand,
pressed: bool,
responder: TargetHandlerSendCommandResponder,
},
ListPlayerApplicationSettingAttributes {
responder: TargetHandlerListPlayerApplicationSettingAttributesResponder,
},
GetPlayerApplicationSettings {
attribute_ids: Vec<PlayerApplicationSettingAttributeId>,
responder: TargetHandlerGetPlayerApplicationSettingsResponder,
},
SetPlayerApplicationSettings {
requested_settings: PlayerApplicationSettings,
responder: TargetHandlerSetPlayerApplicationSettingsResponder,
},
GetNotification {
event_id: NotificationEvent,
responder: TargetHandlerGetNotificationResponder,
},
WatchNotification {
event_id: NotificationEvent,
current: Notification,
pos_change_interval: u32,
responder: TargetHandlerWatchNotificationResponder,
},
SetAddressedPlayer {
player_id: AddressedPlayerId,
responder: TargetHandlerSetAddressedPlayerResponder,
},
GetMediaPlayerItems {
responder: TargetHandlerGetMediaPlayerItemsResponder,
},
}
Expand description
Client wrapper for the local target. A client is a high level construct and does not represent a connection with a device.
Variants§
GetEventsSupported
Returns the event notification ids that are supported by the TG.
Fields
responder: TargetHandlerGetEventsSupportedResponder
GetMediaAttributes
Returns the currently playing media attributes. May send either the GetElementAttributes or GetItemAttributes command depending on what is supported.
Fields
responder: TargetHandlerGetMediaAttributesResponder
GetPlayStatus
Returns the status of the currently playing media.
Fields
responder: TargetHandlerGetPlayStatusResponder
SendCommand
Send an AV\C passthrough key command.
If key_pressed
, then the AV\C passthrough command shall be interpreted as a key
press down event. Otherwise, the command shall be interpreted as a key release event.
ListPlayerApplicationSettingAttributes
Request the target device to provide all the target supported player application setting attributes.
Fields
GetPlayerApplicationSettings
Returns currently set player application setting values for the attribute_ids
.
If no attribute_ids
are provided, this method will query the TG for all valid
attribute ID’s, and return the currently set player application setting values.
Fields
attribute_ids: Vec<PlayerApplicationSettingAttributeId>
SetPlayerApplicationSettings
Sets the player application settings specified by requested_settings
. Only
settings specified in the input requested_settings
will be overwritten.
Returns the actual settings that were set.
Settings provided in the requested_settings
that are unsupported or unknown
will not be set; and SetPlayerApplicationSettings
will not return an error.
Instead, the returned set_settings
will include only the settings that were
successfully set on the remote target.
Fields
requested_settings: PlayerApplicationSettings
GetNotification
Returns the current value for the notification specified by event_id
.
WatchNotification
Returns the changed value of the notification specified by ‘event_id’.
A changed value refers to any value that is different than the input parameter
current
Notification value.
WatchNotification
will not respond until the Notification value associated
with event_id
has changed from the current
Notification.
Fields
event_id: NotificationEvent
current: Notification
responder: TargetHandlerWatchNotificationResponder
SetAddressedPlayer
Changes the addressed player_id
on the target when multiple are supported.
GetMediaPlayerItems
Returns a list of media player information about the players on the target.
Fields
responder: TargetHandlerGetMediaPlayerItemsResponder
Implementations§
Source§impl TargetHandlerRequest
impl TargetHandlerRequest
pub fn into_get_events_supported( self, ) -> Option<TargetHandlerGetEventsSupportedResponder>
pub fn into_get_media_attributes( self, ) -> Option<TargetHandlerGetMediaAttributesResponder>
pub fn into_get_play_status(self) -> Option<TargetHandlerGetPlayStatusResponder>
pub fn into_send_command( self, ) -> Option<(AvcPanelCommand, bool, TargetHandlerSendCommandResponder)>
pub fn into_list_player_application_setting_attributes( self, ) -> Option<TargetHandlerListPlayerApplicationSettingAttributesResponder>
pub fn into_get_player_application_settings( self, ) -> Option<(Vec<PlayerApplicationSettingAttributeId>, TargetHandlerGetPlayerApplicationSettingsResponder)>
pub fn into_set_player_application_settings( self, ) -> Option<(PlayerApplicationSettings, TargetHandlerSetPlayerApplicationSettingsResponder)>
pub fn into_get_notification( self, ) -> Option<(NotificationEvent, TargetHandlerGetNotificationResponder)>
pub fn into_watch_notification( self, ) -> Option<(NotificationEvent, Notification, u32, TargetHandlerWatchNotificationResponder)>
pub fn into_set_addressed_player( self, ) -> Option<(AddressedPlayerId, TargetHandlerSetAddressedPlayerResponder)>
pub fn into_get_media_player_items( self, ) -> Option<TargetHandlerGetMediaPlayerItemsResponder>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL