Struct libpulse_binding::context::ext_device_restore::DeviceRestore
source ·
[−]pub struct DeviceRestore { /* private fields */ }
Expand description
A wrapper object providing device restore routines to a context.
Note: Saves a copy of active multi-use closure callbacks, which it frees on drop.
Implementations
Tests if this extension module is available in the server.
The callback must accept an integer, which indicates version.
Panics if the underlying C function returns a null pointer.
Subscribes to changes in the device database.
The callback must accept a bool
, which indicates success.
Panics if the underlying C function returns a null pointer.
Sets the subscription callback that is called when subscribe()
was
called.
The callback must accept two parameters, firstly a Device
variant, and secondly an
integer index.
pub fn read_formats_all<F>(
&mut self,
callback: F
) -> Operation<dyn FnMut(ListResult<&Info>)> where
F: FnMut(ListResult<&Info>) + 'static,
pub fn read_formats_all<F>(
&mut self,
callback: F
) -> Operation<dyn FnMut(ListResult<&Info>)> where
F: FnMut(ListResult<&Info>) + 'static,
Reads the formats for all present devices from the device database.
Panics if the underlying C function returns a null pointer.
pub fn read_formats<F>(
&mut self,
type_: Device,
index: u32,
callback: F
) -> Operation<dyn FnMut(ListResult<&Info>)> where
F: FnMut(ListResult<&Info>) + 'static,
pub fn read_formats<F>(
&mut self,
type_: Device,
index: u32,
callback: F
) -> Operation<dyn FnMut(ListResult<&Info>)> where
F: FnMut(ListResult<&Info>) + 'static,
Reads an entry from the device database.
Panics if the underlying C function returns a null pointer.
Reads an entry from the device database.
The callback must accept a bool
, which indicates success.
Panics if the underlying C function returns a null pointer.