pub trait UserClientExt: IsA<UserClient> + 'static {
Show 18 methods
// Provided methods
fn create_source(&self) -> Result<Source, Error> { ... }
fn delete_port(&self, port_id: u8) -> Result<(), Error> { ... }
fn delete_queue(&self, queue_id: u8) -> Result<(), Error> { ... }
fn queue_tempo(&self, queue_id: u8) -> Result<QueueTempo, Error> { ... }
fn queue_usage(&self, queue_id: u8) -> Result<bool, Error> { ... }
fn open(&self, open_flag: i32) -> Result<(), Error> { ... }
fn operate_subscription(
&self,
subs_data: &impl IsA<SubscribeData>,
establish: bool,
) -> Result<(), Error> { ... }
fn remove_events(
&self,
filter: &impl IsA<RemoveFilter>,
) -> Result<(), Error> { ... }
fn schedule_event(&self, event: &Event) -> Result<(), Error> { ... }
fn set_info(&self, client_info: &impl IsA<ClientInfo>) -> Result<(), Error> { ... }
fn set_pool(&self, client_pool: &impl IsA<ClientPool>) -> Result<(), Error> { ... }
fn set_queue_tempo(
&self,
queue_id: u8,
queue_tempo: &impl IsA<QueueTempo>,
) -> Result<(), Error> { ... }
fn set_queue_usage(&self, queue_id: u8, use_: bool) -> Result<(), Error> { ... }
fn update_port(
&self,
port_info: &impl IsA<PortInfo>,
port_id: u8,
) -> Result<(), Error> { ... }
fn update_queue(
&self,
queue_info: &impl IsA<QueueInfo>,
) -> Result<(), Error> { ... }
fn client_id(&self) -> u8 { ... }
fn connect_handle_event<F: Fn(&Self, &EventCntr) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_client_id_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}Expand description
Provided Methods§
Sourcefn create_source(&self) -> Result<Source, Error>
fn create_source(&self) -> Result<Source, Error>
Allocate glib::Source structure to handle events from ALSA seq character device. In each
iteration of GLib::MainContext, the read(2) system call is exected to dispatch
sequencer event for handle-event signal, according to the result of
poll(2) system call.
§Returns
true when the overall operation finishes successfully, else false.
§gsrc
A #GSource to handle events from ALSA seq character device.
Sourcefn delete_queue(&self, queue_id: u8) -> Result<(), Error>
fn delete_queue(&self, queue_id: u8) -> Result<(), Error>
Delete the queue owned by the client.
The call of function executes ioctl(2) system call with SNDRV_SEQ_IOCTL_DELETE_QUEUE command
for ALSA sequencer character device.
§queue_id
The numeric ID of queue. An entry of SpecificQueueId is available as well.
§Returns
true when the overall operation finishes successfully, else false.
Sourcefn queue_tempo(&self, queue_id: u8) -> Result<QueueTempo, Error>
fn queue_tempo(&self, queue_id: u8) -> Result<QueueTempo, Error>
Get the data of tempo for the queue.
The call of function executes ioctl(2) system call with SNDRV_SEQ_IOCTL_GET_QUEUE_TEMPO
command for ALSA sequencer character device.
§queue_id
The numeric ID of queue. An entry of SpecificQueueId is available as well.
§Returns
true when the overall operation finishes successfully, else false.
§queue_tempo
The data of tempo for queue.
Sourcefn queue_usage(&self, queue_id: u8) -> Result<bool, Error>
fn queue_usage(&self, queue_id: u8) -> Result<bool, Error>
Get usage of the queue by the client.
The call of function executes ioctl(2) system call with SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT
command for ALSA sequencer character device.
§queue_id
The numeric ID of queue. An entry of SpecificQueueId is available as well.
§Returns
true when the overall operation finishes successfully, else false.
§use_
Whether the client uses the queue or not.
Sourcefn open(&self, open_flag: i32) -> Result<(), Error>
fn open(&self, open_flag: i32) -> Result<(), Error>
Open ALSA sequencer character device.
The call of function executes open(2) system call, then executes ioctl(2) system call with
SNDRV_SEQ_IOCTL_CLIENT_ID command for ALSA sequencer character device.
§open_flag
The flag of open(2) system call. O_RDWR is forced to fulfil internally.
§Returns
true when the overall operation finishes successfully, else false.
Sourcefn operate_subscription(
&self,
subs_data: &impl IsA<SubscribeData>,
establish: bool,
) -> Result<(), Error>
fn operate_subscription( &self, subs_data: &impl IsA<SubscribeData>, establish: bool, ) -> Result<(), Error>
Operate subscription between two ports pointed by the data.
The call of function executes ioctl(2) system call with SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT and
SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT commands for ALSA sequencer character device.
§subs_data
§establish
Whether to establish subscription between two ports, or break it.
§Returns
true when the overall operation finishes successfully, else false.
Sourcefn remove_events(&self, filter: &impl IsA<RemoveFilter>) -> Result<(), Error>
fn remove_events(&self, filter: &impl IsA<RemoveFilter>) -> Result<(), Error>
Remove queued events according to the filter.
The call of function executes ioctl(2) system call with SNDRV_SEQ_IOCTL_REMOVE_EVENTS
command for ALSA sequencer character device.
§filter
A RemoveFilter.
§Returns
true when the overall operation finishes successfully, else false.
Sourcefn schedule_event(&self, event: &Event) -> Result<(), Error>
fn schedule_event(&self, event: &Event) -> Result<(), Error>
Deliver the event immediately, or schedule it into memory pool of the client.
The call of function executes write(2) system call for ALSA sequencer character device. When
output-free is less than Event::calculate_pool_consumption() and
open() is called without non-blocking flag, the user process can be blocked
untill enough number of cells becomes available.
§event
An instance of Event.
§Returns
true when the overall operation finishes successfully, else false.
Sourcefn set_info(&self, client_info: &impl IsA<ClientInfo>) -> Result<(), Error>
fn set_info(&self, client_info: &impl IsA<ClientInfo>) -> Result<(), Error>
Get client information.
The call of function executes ioctl(2) system call with SNDRV_SEQ_IOCTL_SET_CLIENT_INFO
command for ALSA sequencer character device.
§client_info
A ClientInfo.
§Returns
true when the overall operation finishes successfully, else false.
Sourcefn set_pool(&self, client_pool: &impl IsA<ClientPool>) -> Result<(), Error>
fn set_pool(&self, client_pool: &impl IsA<ClientPool>) -> Result<(), Error>
Configure memory pool in the client.
The call of function executes ioctl(2) system call with SNDRV_SEQ_IOCTL_SET_CLIENT_POOL
command for ALSA sequencer character device.
§client_pool
A ClientPool to be configured for the client.
§Returns
true when the overall operation finishes successfully, else false.
Sourcefn set_queue_tempo(
&self,
queue_id: u8,
queue_tempo: &impl IsA<QueueTempo>,
) -> Result<(), Error>
fn set_queue_tempo( &self, queue_id: u8, queue_tempo: &impl IsA<QueueTempo>, ) -> Result<(), Error>
Set the data of tempo to the queue.
The call of function executes ioctl(2) system call with SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO
command for ALSA sequencer character device.
§queue_id
The numeric ID of queue. An entry of SpecificQueueId is available as well.
§queue_tempo
The data of tempo for queue.
§Returns
true when the overall operation finishes successfully, else false.
Sourcefn set_queue_usage(&self, queue_id: u8, use_: bool) -> Result<(), Error>
fn set_queue_usage(&self, queue_id: u8, use_: bool) -> Result<(), Error>
Start the queue to use or not.
The call of function executes ioctl(2) system call with SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT
command for ALSA sequencer character device.
§queue_id
The numeric ID of queue. An entry of SpecificQueueId is available as well.
§use_
Whether to use the queue or not.
§Returns
true when the overall operation finishes successfully, else false.
Sourcefn update_queue(&self, queue_info: &impl IsA<QueueInfo>) -> Result<(), Error>
fn update_queue(&self, queue_info: &impl IsA<QueueInfo>) -> Result<(), Error>
Update owned queue according to the information.
The call of function executes ioctl(2) system call with SNDRV_SEQ_IOCTL_SET_QUEUE_INFO
command for ALSA sequencer character device.
§queue_info
The information of queue to add.
§Returns
true when the overall operation finishes successfully, else false.
Sourcefn connect_handle_event<F: Fn(&Self, &EventCntr) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_handle_event<F: Fn(&Self, &EventCntr) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_client_id_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.