pub enum DeviceRequest {
GetIdentifier {
responder: DeviceGetIdentifierResponder,
},
GetConfigurations {
responder: DeviceGetConfigurationsResponder,
},
GetConfigurations2 {
responder: DeviceGetConfigurations2Responder,
},
WatchCurrentConfiguration {
responder: DeviceWatchCurrentConfigurationResponder,
},
SetCurrentConfiguration {
index: u32,
control_handle: DeviceControlHandle,
},
WatchMuteState {
responder: DeviceWatchMuteStateResponder,
},
SetSoftwareMuteState {
muted: bool,
responder: DeviceSetSoftwareMuteStateResponder,
},
ConnectToStream {
index: u32,
request: ServerEnd<Stream_Marker>,
control_handle: DeviceControlHandle,
},
Rebind {
request: ServerEnd<DeviceMarker>,
control_handle: DeviceControlHandle,
},
}
Expand description
A Device represents a unique physical camera present in the system. Only one client may connect to an unbound physical camera, however the “Rebind” method can be used to create multiple connections to it to be used by a coordinated set of clients.
Variants§
GetIdentifier
Returns an identifier for the camera. If present, identical devices on different systems will have the same identifier. Clients may use this to determine if additional semantics known a priori for a given device apply to the current camera.
Fields
responder: DeviceGetIdentifierResponder
GetConfigurations
Returns a list of configurations supported by the camera. All cameras will have at least one configuration. The values returned are immutable - they will not change for the lifetime of the client’s connection to the Camera.
Fields
responder: DeviceGetConfigurationsResponder
GetConfigurations2
Returns a list of configurations supported by the camera. All cameras will have at least one configuration. The values returned are immutable - they will not change for the lifetime of the client’s connection to the Camera.
Fields
responder: DeviceGetConfigurations2Responder
WatchCurrentConfiguration
Returns the index of the current configuration when it has changed from a previously returned configuration, or is called by a client for the first time.
Fields
responder: DeviceWatchCurrentConfigurationResponder
SetCurrentConfiguration
Sets the configuration using the provided index. Calling this method disconnects any existing Stream clients associated with this camera. An epitaph of ZX_OK will be sent for any connected Stream clients on closing.
WatchMuteState
Returns the camera’s current mute state when it has changed from a previously returned state, or is called by a client for the first time. A camera may be muted using SetSoftwareMuteState or by a physical switch. If either muted mode is active, stream clients associated with this physical camera will stop receiving new frames.
Fields
responder: DeviceWatchMuteStateResponder
SetSoftwareMuteState
Sets the current camera’s software mute state. When transitioning to the muted state, this method returns when the camera has successfully ceased sending new frames to stream clients. When transitioning to the unmuted state, this method returns immediately.
ConnectToStream
Connects to the Stream at the provided index. If any clients already exist for this stream, the request is closed with the ZX_ERR_ALREADY_BOUND epitaph.
Rebind
Request another connection to this Device. This allows a client to delegate different operations to different coordinated clients.
Implementations§
Source§impl DeviceRequest
impl DeviceRequest
pub fn into_get_identifier(self) -> Option<DeviceGetIdentifierResponder>
pub fn into_get_configurations(self) -> Option<DeviceGetConfigurationsResponder>
pub fn into_get_configurations2( self, ) -> Option<DeviceGetConfigurations2Responder>
pub fn into_watch_current_configuration( self, ) -> Option<DeviceWatchCurrentConfigurationResponder>
pub fn into_set_current_configuration( self, ) -> Option<(u32, DeviceControlHandle)>
pub fn into_watch_mute_state(self) -> Option<DeviceWatchMuteStateResponder>
pub fn into_set_software_mute_state( self, ) -> Option<(bool, DeviceSetSoftwareMuteStateResponder)>
pub fn into_connect_to_stream( self, ) -> Option<(u32, ServerEnd<Stream_Marker>, DeviceControlHandle)>
pub fn into_rebind( self, ) -> Option<(ServerEnd<DeviceMarker>, DeviceControlHandle)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL