mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-05-06 02:28:02 +02:00
proxy: add 'bound' signal
This commit is contained in:
parent
c06317ac3b
commit
c078a97d77
2 changed files with 8 additions and 0 deletions
|
|
@ -63,6 +63,7 @@ enum
|
|||
{
|
||||
SIGNAL_PW_PROXY_CREATED,
|
||||
SIGNAL_PW_PROXY_DESTROYED,
|
||||
SIGNAL_BOUND,
|
||||
SIGNAL_PARAM,
|
||||
LAST_SIGNAL,
|
||||
};
|
||||
|
|
@ -119,6 +120,7 @@ proxy_event_bound (void *data, uint32_t global_id)
|
|||
pw_proxy_set_bound_id() and this can be very bad... */
|
||||
g_warn_if_fail (!priv->global || priv->global->id == global_id);
|
||||
|
||||
g_signal_emit (self, wp_proxy_signals[SIGNAL_BOUND], 0, global_id);
|
||||
wp_proxy_set_feature_ready (self, WP_PROXY_FEATURE_BOUND);
|
||||
|
||||
/* construct a WpGlobal if it was not already there */
|
||||
|
|
@ -357,6 +359,11 @@ wp_proxy_class_init (WpProxyClass * klass)
|
|||
G_STRUCT_OFFSET (WpProxyClass, pw_proxy_destroyed), NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
wp_proxy_signals[SIGNAL_BOUND] = g_signal_new (
|
||||
"bound", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST,
|
||||
G_STRUCT_OFFSET (WpProxyClass, bound), NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1, G_TYPE_UINT);
|
||||
|
||||
wp_proxy_signals[SIGNAL_PARAM] = g_signal_new (
|
||||
"param", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST,
|
||||
G_STRUCT_OFFSET (WpProxyClass, param), NULL, NULL, NULL, G_TYPE_NONE, 5,
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@ struct _WpProxyClass
|
|||
|
||||
void (*pw_proxy_created) (WpProxy * self, struct pw_proxy * proxy);
|
||||
void (*pw_proxy_destroyed) (WpProxy * self);
|
||||
void (*bound) (WpProxy * self, guint32 id);
|
||||
void (*param) (WpProxy * self, gint seq, guint32 id, guint32 index,
|
||||
guint32 next, const struct spa_pod *param);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue