#[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

source§

fn clone(&self) -> pw_core_events

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for pw_core_events

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Copy for pw_core_events

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.