Struct pipewire_sys::pw_core_events
source · #[repr(C)]pub struct pw_core_events {
pub version: u32,
pub info: Option<unsafe extern "C" fn(data: *mut c_void, info: *const pw_core_info)>,
pub done: Option<unsafe extern "C" fn(data: *mut c_void, id: u32, seq: c_int)>,
pub ping: Option<unsafe extern "C" fn(data: *mut c_void, id: u32, seq: c_int)>,
pub error: Option<unsafe extern "C" fn(data: *mut c_void, id: u32, seq: c_int, res: c_int, message: *const c_char)>,
pub remove_id: Option<unsafe extern "C" fn(data: *mut c_void, id: u32)>,
pub bound_id: Option<unsafe extern "C" fn(data: *mut c_void, id: u32, global_id: u32)>,
pub add_mem: Option<unsafe extern "C" fn(data: *mut c_void, id: u32, type_: u32, fd: c_int, flags: u32)>,
pub remove_mem: Option<unsafe extern "C" fn(data: *mut c_void, id: u32)>,
pub bound_props: Option<unsafe extern "C" fn(data: *mut c_void, id: u32, global_id: u32, props: *const spa_dict)>,
}
Expand description
\struct pw_core_events \brief Core events
Fields§
§version: u32
§info: Option<unsafe extern "C" fn(data: *mut c_void, info: *const pw_core_info)>
Notify new core info
This event is emitted when first bound to the core or when the hello method is called.
\param info new core info
done: Option<unsafe extern "C" fn(data: *mut c_void, id: u32, seq: c_int)>
Emit a done event
The done event is emitted as a result of a sync method with the same seq number.
\param seq the seq number passed to the sync method call
ping: Option<unsafe extern "C" fn(data: *mut c_void, id: u32, seq: c_int)>
Emit a ping event
The client should reply with a pong reply with the same seq number.
error: Option<unsafe extern "C" fn(data: *mut c_void, id: u32, seq: c_int, res: c_int, message: *const c_char)>
Fatal error event
The error event is sent out when a fatal (non-recoverable) error has occurred. The id argument is the proxy object where the error occurred, most often in response to a request to that object. The message is a brief description of the error, for (debugging) convenience.
This event is usually also emitted on the proxy object with \a id.
\param id object where the error occurred \param seq the sequence number that generated the error \param res error code \param message error description
remove_id: Option<unsafe extern "C" fn(data: *mut c_void, id: u32)>
Remove an object ID
This event is used internally by the object ID management logic. When a client deletes an object, the server will send this event to acknowledge that it has seen the delete request. When the client receives this event, it will know that it can safely reuse the object ID.
\param id deleted object ID
bound_id: Option<unsafe extern "C" fn(data: *mut c_void, id: u32, global_id: u32)>
Notify an object binding
This event is emitted when a local object ID is bound to a global ID. It is emitted before the global becomes visible in the registry.
\param id bound object ID \param global_id the global id bound to
add_mem: Option<unsafe extern "C" fn(data: *mut c_void, id: u32, type_: u32, fd: c_int, flags: u32)>
Add memory for a client
Memory is given to a client as \a fd of a certain memory \a type.
Further references to this fd will be made with the per memory unique identifier \a id.
\param id the unique id of the memory \param type the memory type, one of enum spa_data_type \param fd the file descriptor \param flags extra flags
remove_mem: Option<unsafe extern "C" fn(data: *mut c_void, id: u32)>
Remove memory for a client
\param id the memory id to remove
bound_props: Option<unsafe extern "C" fn(data: *mut c_void, id: u32, global_id: u32, props: *const spa_dict)>
Trait Implementations§
source§impl Clone for pw_core_events
impl Clone for pw_core_events
source§fn clone(&self) -> pw_core_events
fn clone(&self) -> pw_core_events
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more