Class
ALSATimerUserInstance
Description [src]
class ALSATimer.UserInstance : GObject.Object {
parent_instance: GObject
}
A GObject-derived object to express user instance.
A ALSATimerUserInstance
is a GObject-derived object to express information of user instance
attached to any timer device or the other instance as slave. After calling
alsatimer_user_instance_open()
, the object maintains file descriptor till object destruction. After
calling alsatimer_user_instance_attach()
or alsatimer_user_instance_attach_as_slave()
, the user instance
is attached to any timer device or the other instance as slave.
Constructors
alsatimer_user_instance_new
Allocate and return an instance of ALSATimerUserInstance
.
Instance methods
alsatimer_user_instance_attach
Attach the instance to the timer device. If the given device_id is for absent timer device, the instance can be detached with error.
alsatimer_user_instance_attach_as_slave
Attach the instance as an slave to another instance indicated by a pair of slave_class and
slave_id. If the slave_class is ALSATimerSlaveClass
, the slave_id is for the PID of
application process which owns the instance of timer. If the slave_class is
ALSATimerSlaveClass
, the slave_id is the numeric ID of queue bound for timer device.
alsatimer_user_instance_choose_event_type
Choose the type of event data to receive.
alsatimer_user_instance_continue
Continue timer event emission paused by alsatimer_user_instance_pause()
.
alsatimer_user_instance_create_source
Allocate GSource
structure to handle events from ALSA timer character device. In
each iteration of GMainContext
, the read(2)
system call is executed to dispatch
timer event for either ALSATimerUserInstance::handle-tick-time-event
or
ALSATimerUserInstance::handle-real-time-event
signals, according to the result of poll(2)
system call.
alsatimer_user_instance_get_info
Return the information of device if attached to the instance.
alsatimer_user_instance_get_protocol_version
Get the version of timer protocol currently used. The version is expressed as the array with three elements; major, minor, and micro version in the order. The length of major version is 16 bit, the length of minor and micro version is 8 bit each.
alsatimer_user_instance_get_status
Get the latest status of instance.
alsatimer_user_instance_open
Open ALSA Timer character device to allocate queue.
alsatimer_user_instance_pause
Pause timer event emission.
alsatimer_user_instance_set_params
Configure the instance with the parameters and return the latest parameters.
alsatimer_user_instance_start
Start timer event emission.
alsatimer_user_instance_stop
Stop timer event emission.
Signals
ALSATimer.UserInstance::handle-disconnection
Emitted when the attached timer device is not available anymore due to unbinding driver or
hot unplugging. The owner of this object should call g_object_unref()
as quickly
as possible to release ALSA timer character device.
ALSATimer.UserInstance::handle-real-time-event
Emitted when event occurs to notify real time.
ALSATimer.UserInstance::handle-tick-time-event
Emitted when event occurs to notify tick time.
Signals inherited from GObject (1)
GObject.Object::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.
Class structure
struct ALSATimerUserInstanceClass {
GObjectClass parent_class;
void (* handle_tick_time_event) (
ALSATimerUserInstance* self,
const ALSATimerTickTimeEvent* event
);
void (* handle_real_time_event) (
ALSATimerUserInstance* self,
const ALSATimerRealTimeEvent* event
);
void (* handle_disconnection) (
ALSATimerUserInstance* self
);
}
Class members
parent_class |
|
No description available. | |
handle_tick_time_event |
|
No description available. | |
handle_real_time_event |
|
No description available. | |
handle_disconnection |
|
No description available. |
Virtual methods
ALSATimer.UserInstanceClass.handle_disconnection
Class closure for the ALSATimerUserInstance::handle-disconnection
signal.
ALSATimer.UserInstanceClass.handle_real_time_event
Class closure for the ALSATimerUserInstance::handle-real-time-event
signal.
ALSATimer.UserInstanceClass.handle_tick_time_event
Class closure for the ALSATimerUserInstance::handle-tick-time-event
signal.