Struct pipewire_sys::pw_core_methods
source · #[repr(C)]pub struct pw_core_methods {
pub version: u32,
pub add_listener: Option<unsafe extern "C" fn(object: *mut c_void, listener: *mut spa_hook, events: *const pw_core_events, data: *mut c_void) -> c_int>,
pub hello: Option<unsafe extern "C" fn(object: *mut c_void, version: u32) -> c_int>,
pub sync: Option<unsafe extern "C" fn(object: *mut c_void, id: u32, seq: c_int) -> c_int>,
pub pong: Option<unsafe extern "C" fn(object: *mut c_void, id: u32, seq: c_int) -> c_int>,
pub error: Option<unsafe extern "C" fn(object: *mut c_void, id: u32, seq: c_int, res: c_int, message: *const c_char) -> c_int>,
pub get_registry: Option<unsafe extern "C" fn(object: *mut c_void, version: u32, user_data_size: usize) -> *mut pw_registry>,
pub create_object: Option<unsafe extern "C" fn(object: *mut c_void, factory_name: *const c_char, type_: *const c_char, version: u32, props: *const spa_dict, user_data_size: usize) -> *mut c_void>,
pub destroy: Option<unsafe extern "C" fn(object: *mut c_void, proxy: *mut c_void) -> c_int>,
}
Expand description
\struct pw_core_methods \brief Core methods
The core global object. This is a singleton object used for creating new objects in the remote PipeWire instance. It is also used for internal features.
Fields§
§version: u32
§add_listener: Option<unsafe extern "C" fn(object: *mut c_void, listener: *mut spa_hook, events: *const pw_core_events, data: *mut c_void) -> c_int>
§hello: Option<unsafe extern "C" fn(object: *mut c_void, version: u32) -> c_int>
Start a conversation with the server. This will send the core info and will destroy all resources for the client (except the core and client resource).
This requires X permissions on the core.
sync: Option<unsafe extern "C" fn(object: *mut c_void, id: u32, seq: c_int) -> c_int>
Do server roundtrip
Ask the server to emit the ‘done’ event with \a seq.
Since methods are handled in-order and events are delivered in-order, this can be used as a barrier to ensure all previous methods and the resulting events have been handled.
\param seq the seq number passed to the done event
This requires X permissions on the core.
pong: Option<unsafe extern "C" fn(object: *mut c_void, id: u32, seq: c_int) -> c_int>
Reply to a server ping event.
Reply to the server ping event with the same seq.
\param seq the seq number received in the ping event
This requires X permissions on the core.
error: Option<unsafe extern "C" fn(object: *mut c_void, id: u32, seq: c_int, res: c_int, message: *const c_char) -> c_int>
Fatal error event
The error method 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 an event on that object. The message is a brief description of the error, for (debugging) convenience.
This method is usually also emitted on the resource object with \a id.
\param id resource id where the error occurred \param res error code \param message error description
This requires X permissions on the core.
get_registry: Option<unsafe extern "C" fn(object: *mut c_void, version: u32, user_data_size: usize) -> *mut pw_registry>
Get the registry object
Create a registry object that allows the client to list and bind the global objects available from the PipeWire server \param version the client version \param user_data_size extra size
This requires X permissions on the core.
create_object: Option<unsafe extern "C" fn(object: *mut c_void, factory_name: *const c_char, type_: *const c_char, version: u32, props: *const spa_dict, user_data_size: usize) -> *mut c_void>
Create a new object on the PipeWire server from a factory.
\param factory_name the factory name to use \param type the interface to bind to \param version the version of the interface \param props extra properties \param user_data_size extra size
This requires X permissions on the core.
destroy: Option<unsafe extern "C" fn(object: *mut c_void, proxy: *mut c_void) -> c_int>
Destroy an resource
Destroy the server resource for the given proxy.
\param obj the proxy to destroy
This requires X permissions on the core.
Trait Implementations§
source§impl Clone for pw_core_methods
impl Clone for pw_core_methods
source§fn clone(&self) -> pw_core_methods
fn clone(&self) -> pw_core_methods
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more