Struct libpulse_binding::context::ext_device_manager::DeviceManager
source · pub struct DeviceManager { /* private fields */ }Expand description
A wrapper object providing device manager routines to a context. Note: Saves a copy of active multi-use closure callbacks, which it frees on drop.
Implementations
sourceimpl DeviceManager
impl DeviceManager
sourcepub fn test<F>(&mut self, callback: F) -> Operation<dyn FnMut(u32)>where
F: FnMut(u32) + 'static,
pub fn test<F>(&mut self, callback: F) -> Operation<dyn FnMut(u32)>where
F: FnMut(u32) + 'static,
Test if this extension module is available in the server.
sourcepub fn read<F>(
&mut self,
callback: F
) -> Operation<dyn FnMut(ListResult<&Info<'_>>)>where
F: FnMut(ListResult<&Info<'_>>) + 'static,
pub fn read<F>(
&mut self,
callback: F
) -> Operation<dyn FnMut(ListResult<&Info<'_>>)>where
F: FnMut(ListResult<&Info<'_>>) + 'static,
Read all entries from the device database.
sourcepub fn set_device_description<F>(
&mut self,
device: &str,
description: &str,
callback: F
) -> Operation<dyn FnMut(bool)>where
F: FnMut(bool) + 'static,
pub fn set_device_description<F>(
&mut self,
device: &str,
description: &str,
callback: F
) -> Operation<dyn FnMut(bool)>where
F: FnMut(bool) + 'static,
Sets the description for a device.
The callback must accept a bool, which indicates success.
sourcepub fn delete<F>(
&mut self,
devices: &[&str],
callback: F
) -> Operation<dyn FnMut(bool)>where
F: FnMut(bool) + 'static,
pub fn delete<F>(
&mut self,
devices: &[&str],
callback: F
) -> Operation<dyn FnMut(bool)>where
F: FnMut(bool) + 'static,
Delete entries from the device database.
The callback must accept a bool, which indicates success.
sourcepub fn enable_role_device_priority_routing<F>(
&mut self,
enable: bool,
callback: F
) -> Operation<dyn FnMut(bool)>where
F: FnMut(bool) + 'static,
pub fn enable_role_device_priority_routing<F>(
&mut self,
enable: bool,
callback: F
) -> Operation<dyn FnMut(bool)>where
F: FnMut(bool) + 'static,
Enable the role-based device-priority routing mode.
The callback must accept a bool, which indicates success.
sourcepub fn reorder_devices_for_role<F>(
&mut self,
role: &str,
devices: &[&str],
callback: F
) -> Operation<dyn FnMut(bool)>where
F: FnMut(bool) + 'static,
pub fn reorder_devices_for_role<F>(
&mut self,
role: &str,
devices: &[&str],
callback: F
) -> Operation<dyn FnMut(bool)>where
F: FnMut(bool) + 'static,
Prefer a given device in the priority list.
The callback must accept a bool, which indicates success.
sourcepub fn subscribe<F>(
&mut self,
enable: bool,
callback: F
) -> Operation<dyn FnMut(bool)>where
F: FnMut(bool) + 'static,
pub fn subscribe<F>(
&mut self,
enable: bool,
callback: F
) -> Operation<dyn FnMut(bool)>where
F: FnMut(bool) + 'static,
Subscribe to changes in the device database.
The callback must accept a bool, which indicates success.
sourcepub fn set_subscribe_cb<F>(&mut self, callback: F)where
F: FnMut() + 'static,
pub fn set_subscribe_cb<F>(&mut self, callback: F)where
F: FnMut() + 'static,
Set the subscription callback that is called when subscribe was
called.