PipeWire
0.3.29
|
a list of hooks More...
Data Structures | |
struct | spa_hook_list |
A list of hooks. More... | |
struct | spa_callbacks |
Callbacks, contains the structure with functions and the data passed to the functions. More... | |
struct | spa_interface |
struct | spa_hook |
A hook, contains the structure with functions and the data passed to the functions. More... | |
Macros | |
#define | SPA_CALLBACK_CHECK(c, m, v) ((c) && ((v) == 0 || (c)->version > (v)-1) && (c)->m) |
Check if a callback c has method m of version v. More... | |
#define | SPA_CALLBACKS_INIT(_funcs, _data) (struct spa_callbacks){ _funcs, _data, } |
#define | SPA_INTERFACE_INIT(_type, _version, _funcs, _data) (struct spa_interface){ _type, _version, SPA_CALLBACKS_INIT(_funcs,_data), } |
#define | spa_callbacks_call(callbacks, type, method, vers, ...) |
#define | spa_callbacks_call_res(callbacks, type, res, method, vers, ...) |
#define | spa_interface_call(iface, type, method, vers, ...) spa_callbacks_call(&(iface)->cb,type,method,vers,##__VA_ARGS__) |
#define | spa_interface_call_res(iface, type, res, method, vers, ...) spa_callbacks_call_res(&(iface)->cb,type,res,method,vers,##__VA_ARGS__) |
#define | spa_hook_list_call_simple(l, type, method, vers, ...) |
#define | spa_hook_list_do_call(l, start, type, method, vers, once, ...) |
Call all hooks in a list, starting from the given one and optionally stopping after calling the first non-NULL function, returns the number of methods called. More... | |
#define | spa_hook_list_call(l, t, m, v, ...) spa_hook_list_do_call(l,NULL,t,m,v,false,##__VA_ARGS__) |
#define | spa_hook_list_call_once(l, t, m, v, ...) spa_hook_list_do_call(l,NULL,t,m,v,true,##__VA_ARGS__) |
#define | spa_hook_list_call_start(l, s, t, m, v, ...) spa_hook_list_do_call(l,s,t,m,v,false,##__VA_ARGS__) |
#define | spa_hook_list_call_once_start(l, s, t, m, v, ...) spa_hook_list_do_call(l,s,t,m,v,true,##__VA_ARGS__) |
Functions | |
void | spa_hook_list_init (struct spa_hook_list *list) |
Initialize a hook list. More... | |
bool | spa_hook_list_is_empty (struct spa_hook_list *list) |
void | spa_hook_list_append (struct spa_hook_list *list, struct spa_hook *hook, const void *funcs, void *data) |
Append a hook. More... | |
void | spa_hook_list_prepend (struct spa_hook_list *list, struct spa_hook *hook, const void *funcs, void *data) |
Prepend a hook. More... | |
void | spa_hook_remove (struct spa_hook *hook) |
Remove a hook. More... | |
void | spa_hook_list_clean (struct spa_hook_list *list) |
void | spa_hook_list_isolate (struct spa_hook_list *list, struct spa_hook_list *save, struct spa_hook *hook, const void *funcs, void *data) |
void | spa_hook_list_join (struct spa_hook_list *list, struct spa_hook_list *save) |
a list of hooks
The hook list provides a way to keep track of hooks.
#define SPA_CALLBACK_CHECK | ( | c, | |
m, | |||
v | |||
) | ((c) && ((v) == 0 || (c)->version > (v)-1) && (c)->m) |
Check if a callback c has method m of version v.
#define spa_callbacks_call | ( | callbacks, | |
type, | |||
method, | |||
vers, | |||
... | |||
) |
#define spa_callbacks_call_res | ( | callbacks, | |
type, | |||
res, | |||
method, | |||
vers, | |||
... | |||
) |
Referenced by pw_impl_factory_create_object(), and spa_pod_builder_raw().
#define SPA_CALLBACKS_INIT | ( | _funcs, | |
_data | |||
) | (struct spa_callbacks){ _funcs, _data, } |
#define spa_hook_list_call | ( | l, | |
t, | |||
m, | |||
v, | |||
... | |||
) | spa_hook_list_do_call(l,NULL,t,m,v,false,##__VA_ARGS__) |
#define spa_hook_list_call_once | ( | l, | |
t, | |||
m, | |||
v, | |||
... | |||
) | spa_hook_list_do_call(l,NULL,t,m,v,true,##__VA_ARGS__) |
#define spa_hook_list_call_once_start | ( | l, | |
s, | |||
t, | |||
m, | |||
v, | |||
... | |||
) | spa_hook_list_do_call(l,s,t,m,v,true,##__VA_ARGS__) |
#define spa_hook_list_call_simple | ( | l, | |
type, | |||
method, | |||
vers, | |||
... | |||
) |
#define spa_hook_list_call_start | ( | l, | |
s, | |||
t, | |||
m, | |||
v, | |||
... | |||
) | spa_hook_list_do_call(l,s,t,m,v,false,##__VA_ARGS__) |
#define spa_hook_list_do_call | ( | l, | |
start, | |||
type, | |||
method, | |||
vers, | |||
once, | |||
... | |||
) |
Call all hooks in a list, starting from the given one and optionally stopping after calling the first non-NULL function, returns the number of methods called.
#define spa_interface_call | ( | iface, | |
type, | |||
method, | |||
vers, | |||
... | |||
) | spa_callbacks_call(&(iface)->cb,type,method,vers,##__VA_ARGS__) |
Referenced by pw_log_log(), and pw_log_logv().
#define spa_interface_call_res | ( | iface, | |
type, | |||
res, | |||
method, | |||
vers, | |||
... | |||
) | spa_callbacks_call_res(&(iface)->cb,type,res,method,vers,##__VA_ARGS__) |
Referenced by spa_dbus_get_connection(), spa_i18n_ntext(), and spa_i18n_text().
#define SPA_INTERFACE_INIT | ( | _type, | |
_version, | |||
_funcs, | |||
_data | |||
) | (struct spa_interface){ _type, _version, SPA_CALLBACKS_INIT(_funcs,_data), } |
Referenced by pw_proxy_install_marshal(), and pw_resource_install_marshal().
|
inline |
Append a hook.
References cb, link, spa_hook_list::list, SPA_CALLBACKS_INIT, spa_list_append, and spa_zero.
Referenced by pw_context_add_listener(), pw_control_add_listener(), pw_data_loop_add_listener(), pw_filter_add_listener(), pw_global_add_listener(), pw_impl_client_add_listener(), pw_impl_core_add_listener(), pw_impl_device_add_listener(), pw_impl_factory_add_listener(), pw_impl_link_add_listener(), pw_impl_module_add_listener(), pw_impl_node_add_listener(), pw_impl_port_add_listener(), pw_main_loop_add_listener(), pw_mempool_add_listener(), pw_protocol_add_listener(), pw_proxy_add_listener(), pw_proxy_add_object_listener(), pw_resource_add_listener(), pw_resource_add_object_listener(), pw_stream_add_listener(), pw_thread_loop_add_listener(), and spa_hook_list_isolate().
|
inline |
References link, spa_hook_list::list, spa_hook_remove(), and spa_list_consume.
Referenced by pw_control_destroy(), pw_data_loop_destroy(), pw_impl_core_destroy(), pw_impl_factory_destroy(), pw_impl_module_destroy(), pw_main_loop_destroy(), pw_mempool_destroy(), pw_protocol_destroy(), and pw_thread_loop_destroy().
|
inline |
Initialize a hook list.
References spa_hook_list::list, and spa_list_init().
Referenced by pw_context_create_core(), pw_context_create_device(), pw_context_create_factory(), pw_context_create_port(), pw_control_new(), pw_mempool_new(), pw_protocol_new(), pw_resource_new(), and spa_hook_list_isolate().
|
inline |
References spa_hook_list::list, and spa_list_is_empty.
|
inline |
References spa_hook_list::list, spa_hook_list_append(), spa_hook_list_init(), and spa_list_insert_list().
|
inline |
References spa_hook_list::list, and spa_list_insert_list().
|
inline |
Prepend a hook.
References cb, link, spa_hook_list::list, SPA_CALLBACKS_INIT, spa_list_prepend, and spa_zero.
|
inline |
Remove a hook.
References link, removed, and spa_list_remove().
Referenced by pw_filter_destroy(), pw_filter_disconnect(), pw_impl_client_destroy(), pw_impl_core_destroy(), pw_impl_factory_destroy(), pw_impl_module_destroy(), pw_stream_destroy(), pw_stream_disconnect(), pw_thread_loop_destroy(), and spa_hook_list_clean().