From 5eecc5b68aa79f99d60944331e80b64fd75646c7 Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Thu, 14 May 2020 16:24:34 +0300 Subject: [PATCH] object-manager: remove deprecated API --- lib/wp/endpoint.c | 4 +- lib/wp/node.c | 2 +- lib/wp/object-manager.c | 140 +------------------ lib/wp/object-manager.h | 26 +--- lib/wp/session.c | 8 +- modules/module-client-permissions.c | 2 +- modules/module-config-endpoint/context.c | 4 +- modules/module-config-policy/context.c | 2 +- modules/module-config-static-nodes/context.c | 2 +- src/main.c | 2 +- tests/examples/audiotestsrc-play.c | 2 +- tests/modules/config-endpoint.c | 4 +- tests/modules/config-policy.c | 2 +- tests/modules/config-static-nodes.c | 2 +- tests/modules/si-audio-softdsp-endpoint.c | 2 +- tests/modules/si-simple-node-endpoint.c | 2 +- tests/modules/si-standard-link.c | 18 +-- tests/wp/core.c | 4 +- tests/wp/endpoint.c | 4 +- tests/wp/proxy.c | 4 +- tests/wp/session.c | 4 +- tools/wireplumber-cli.c | 10 +- 22 files changed, 44 insertions(+), 206 deletions(-) diff --git a/lib/wp/endpoint.c b/lib/wp/endpoint.c index a2da28e7..5b1193ed 100644 --- a/lib/wp/endpoint.c +++ b/lib/wp/endpoint.c @@ -110,12 +110,12 @@ wp_endpoint_ensure_feature_streams (WpEndpoint * self, guint32 bound_id) priv->streams_om = wp_object_manager_new (); /* proxy endpoint stream -> check for endpoint.id in global properties */ - wp_object_manager_add_interest_1 (priv->streams_om, + wp_object_manager_add_interest (priv->streams_om, WP_TYPE_ENDPOINT_STREAM, WP_CONSTRAINT_TYPE_PW_GLOBAL_PROPERTY, PW_KEY_ENDPOINT_ID, "=u", bound_id, NULL); /* impl endpoint stream -> check for endpoint.id in standard properties */ - wp_object_manager_add_interest_1 (priv->streams_om, + wp_object_manager_add_interest (priv->streams_om, WP_TYPE_IMPL_ENDPOINT_STREAM, WP_CONSTRAINT_TYPE_PW_PROPERTY, PW_KEY_ENDPOINT_ID, "=u", bound_id, NULL); diff --git a/lib/wp/node.c b/lib/wp/node.c index 27460c6a..bed963c3 100644 --- a/lib/wp/node.c +++ b/lib/wp/node.c @@ -102,7 +102,7 @@ wp_node_ensure_feature_ports (WpNode * self, guint32 bound_id) bound_id); priv->ports_om = wp_object_manager_new (); - wp_object_manager_add_interest_1 (priv->ports_om, + wp_object_manager_add_interest (priv->ports_om, WP_TYPE_PORT, WP_CONSTRAINT_TYPE_PW_GLOBAL_PROPERTY, PW_KEY_NODE_ID, "=u", bound_id, NULL); diff --git a/lib/wp/object-manager.c b/lib/wp/object-manager.c index 38cda517..0fa01821 100644 --- a/lib/wp/object-manager.c +++ b/lib/wp/object-manager.c @@ -225,108 +225,6 @@ wp_object_manager_is_installed (WpObjectManager * self) * wp_object_manager_add_interest: * @self: the object manager * @gtype: the #GType of the objects that we are declaring interest in - * @constraints: (nullable): a variant of type "aa{sv}" (array of dictionaries) - * with additional constraints on the managed objects - * @wanted_features: a set of features that will automatically be enabled - * on managed objects, if they are subclasses of #WpProxy - * - * Declares interest in a certain kind of object. Interest consists of a #GType - * that the object must be an ancestor of (g_type_is_a must match) and - * optionally, a set of additional constraints on certain properties of the - * object. - * - * The @constraints #GVariant should contain an array of dictionaries ("aa{sv}"). - * Each dictionary must have the following fields: - * - "type" (i): The constraint type, #WpObjectManagerConstraintType - * - "name" (s): The name of the constrained property - * - "value" (s): The value that the property must have - * - * For example, to discover all the 'node' objects in the PipeWire graph, - * the following code can be used: - * |[ - * WpObjectManager *om = wp_object_manager_new (); - * wp_object_manager_add_interest (om, WP_TYPE_NODE, NULL, - * WP_PROXY_FEATURES_STANDARD); - * wp_core_install_object_manager (core, om); - * WpIterator *nodes_it = wp_object_manager_iterate (om); - * ]| - * - * and to discover all 'port' objects that belong to a specific 'node': - * |[ - * WpObjectManager *om = wp_object_manager_new (); - * - * GVariantBuilder b; - * g_variant_builder_init (&b, G_VARIANT_TYPE ("aa{sv}")); - * g_variant_builder_open (&b, G_VARIANT_TYPE_VARDICT); - * g_variant_builder_add (&b, "{sv}", "type", - * g_variant_new_int32 (WP_OBJECT_MANAGER_CONSTRAINT_PW_GLOBAL_PROPERTY)); - * g_variant_builder_add (&b, "{sv}", "name", - * g_variant_new_string (PW_KEY_NODE_ID)); - * g_variant_builder_add (&b, "{sv}", "value", - * g_variant_new_string (node_id)); - * g_variant_builder_close (&b); - * - * wp_object_manager_add_interest (om, WP_TYPE_PORT, - * g_variant_builder_end (&b), - * WP_PROXY_FEATURES_STANDARD); - * - * wp_core_install_object_manager (core, om); - * WpIterator *ports_it = wp_object_manager_iterate (om); - * ]| - */ -void -wp_object_manager_add_interest (WpObjectManager *self, - GType gtype, GVariant * constraints, - WpProxyFeatures wanted_features) -{ - g_autoptr (WpObjectInterest) interest = NULL; - g_autoptr (GVariant) c = NULL; - GVariantIter iter; - WpObjectManagerConstraintType ctype; - const gchar *prop_name, *prop_value; - - g_return_if_fail (WP_IS_OBJECT_MANAGER (self)); - g_return_if_fail (constraints == NULL || - g_variant_is_of_type (constraints, G_VARIANT_TYPE ("aa{sv}"))); - - interest = wp_object_interest_new_type (gtype); - - if (constraints) { - g_variant_iter_init (&iter, constraints); - while (g_variant_iter_next (&iter, "@a{sv}", &c)) { - GVariantDict dict = G_VARIANT_DICT_INIT (c); - - if (!g_variant_dict_lookup (&dict, "type", "i", &ctype)) { - g_critical ("Invalid object manager constraint without a type"); - return; - } - - if (!g_variant_dict_lookup (&dict, "name", "&s", &prop_name)) { - g_critical ("property constraint is without a property name"); - return; - } - if (!g_variant_dict_lookup (&dict, "value", "&s", &prop_value)) { - g_critical ("property constraint is without a property value"); - return; - } - - wp_object_interest_add_constraint (interest, (WpConstraintType) ctype, - prop_name, WP_CONSTRAINT_VERB_EQUALS, g_variant_new_string (prop_value)); - - g_variant_dict_clear (&dict); - g_clear_pointer (&c, g_variant_unref); - } - } - - wp_object_manager_add_interest_full (self, g_steal_pointer (&interest)); - if (wanted_features != 0) - wp_object_manager_request_proxy_features (self, gtype, wanted_features); -} - -/** - * wp_object_manager_add_interest_1: - * @self: the object manager - * @gtype: the #GType of the objects that we are declaring interest in * @...: a list of constraints, terminated by %NULL * * Equivalent to: @@ -339,7 +237,7 @@ wp_object_manager_add_interest (WpObjectManager *self, * documented in wp_object_interest_new(). */ void -wp_object_manager_add_interest_1 (WpObjectManager * self, GType gtype, ...) +wp_object_manager_add_interest (WpObjectManager * self, GType gtype, ...) { WpObjectInterest *interest; va_list args; @@ -588,42 +486,6 @@ wp_object_manager_iterate_filtered_full (WpObjectManager * self, return it; } -static gboolean -find_proxy_fold_func (const GValue *item, GValue *ret, gpointer data) -{ - if (g_type_is_a (G_VALUE_TYPE (item), WP_TYPE_PROXY)) { - WpProxy *proxy = g_value_get_object (item); - if (wp_proxy_get_bound_id (proxy) == GPOINTER_TO_UINT (data)) { - g_value_init_from_instance (ret, proxy); - return FALSE; - } - } - return TRUE; -} - -/** - * wp_object_manager_find_proxy: - * @self: the object manager - * @bound_id: the bound id of the proxy to get - * - * Searches the managed objects to find a #WpProxy that has the given @bound_id - * - * Returns: (transfer full) (nullable): the proxy that has the given @bound_id, - * or %NULL if there is no such proxy managed by this object manager - */ -WpProxy * -wp_object_manager_find_proxy (WpObjectManager *self, guint bound_id) -{ - g_autoptr (WpIterator) it = wp_object_manager_iterate (self); - g_auto (GValue) ret = G_VALUE_INIT; - - if (!wp_iterator_fold (it, find_proxy_fold_func, &ret, - GUINT_TO_POINTER (bound_id))) - return g_value_dup_object (&ret); - - return NULL; -} - /** * wp_object_manager_lookup: * @self: the object manager diff --git a/lib/wp/object-manager.h b/lib/wp/object-manager.h index 538a032e..e36037d2 100644 --- a/lib/wp/object-manager.h +++ b/lib/wp/object-manager.h @@ -16,23 +16,6 @@ G_BEGIN_DECLS -/** - * WpObjectManagerConstraintType: - * @WP_OBJECT_MANAGER_CONSTRAINT_PW_GLOBAL_PROPERTY: constraint applies - * to a PipeWire global property of an object (the ones returned by - * wp_proxy_get_global_properties()) - * @WP_OBJECT_MANAGER_CONSTRAINT_PW_PROPERTY: constraint applies - * to a PipeWire property of the object (the ones returned by - * wp_proxy_get_properties()) - * @WP_OBJECT_MANAGER_CONSTRAINT_G_PROPERTY: constraint applies to a #GObject - * property of the managed object - */ -typedef enum { - WP_OBJECT_MANAGER_CONSTRAINT_PW_GLOBAL_PROPERTY = WP_CONSTRAINT_TYPE_PW_GLOBAL_PROPERTY, - WP_OBJECT_MANAGER_CONSTRAINT_PW_PROPERTY, - WP_OBJECT_MANAGER_CONSTRAINT_G_PROPERTY, -} WpObjectManagerConstraintType G_GNUC_DEPRECATED; - /** * WP_TYPE_OBJECT_MANAGER: * @@ -52,12 +35,8 @@ gboolean wp_object_manager_is_installed (WpObjectManager * self); /* interest */ -WP_API G_DEPRECATED -void wp_object_manager_add_interest (WpObjectManager *self, - GType gtype, GVariant * constraints, WpProxyFeatures wanted_features); - WP_API -void wp_object_manager_add_interest_1 (WpObjectManager * self, +void wp_object_manager_add_interest (WpObjectManager * self, GType gtype, ...) G_GNUC_NULL_TERMINATED; WP_API @@ -86,9 +65,6 @@ WP_API WpIterator * wp_object_manager_iterate_filtered_full (WpObjectManager * self, WpObjectInterest * interest); -WP_API G_DEPRECATED -WpProxy * wp_object_manager_find_proxy (WpObjectManager *self, guint bound_id); - WP_API gpointer wp_object_manager_lookup (WpObjectManager * self, GType gtype, ...) G_GNUC_NULL_TERMINATED; diff --git a/lib/wp/session.c b/lib/wp/session.c index 08f5ab46..eca337fd 100644 --- a/lib/wp/session.c +++ b/lib/wp/session.c @@ -129,12 +129,12 @@ wp_session_ensure_features_endpoints_links (WpSession * self, guint32 bound_id) priv->endpoints_om = wp_object_manager_new (); /* proxy endpoint -> check for session.id in global properties */ - wp_object_manager_add_interest_1 (priv->endpoints_om, + wp_object_manager_add_interest (priv->endpoints_om, WP_TYPE_ENDPOINT, WP_CONSTRAINT_TYPE_PW_GLOBAL_PROPERTY, PW_KEY_SESSION_ID, "=u", bound_id, NULL); /* impl endpoint -> check for session.id in standard properties */ - wp_object_manager_add_interest_1 (priv->endpoints_om, + wp_object_manager_add_interest (priv->endpoints_om, WP_TYPE_IMPL_ENDPOINT, WP_CONSTRAINT_TYPE_PW_PROPERTY, PW_KEY_SESSION_ID, "=u", bound_id, NULL); @@ -156,12 +156,12 @@ wp_session_ensure_features_endpoints_links (WpSession * self, guint32 bound_id) priv->links_om = wp_object_manager_new (); /* proxy link -> check for session.id in global properties */ - wp_object_manager_add_interest_1 (priv->links_om, + wp_object_manager_add_interest (priv->links_om, WP_TYPE_ENDPOINT_LINK, WP_CONSTRAINT_TYPE_PW_GLOBAL_PROPERTY, PW_KEY_SESSION_ID, "=u", bound_id, NULL); /* impl link -> check for session.id in standard properties */ - wp_object_manager_add_interest_1 (priv->links_om, + wp_object_manager_add_interest (priv->links_om, WP_TYPE_IMPL_ENDPOINT_LINK, WP_CONSTRAINT_TYPE_PW_PROPERTY, PW_KEY_SESSION_ID, "=u", bound_id, NULL); diff --git a/modules/module-client-permissions.c b/modules/module-client-permissions.c index f83510ab..e963259d 100644 --- a/modules/module-client-permissions.c +++ b/modules/module-client-permissions.c @@ -33,7 +33,7 @@ wireplumber__module_init (WpModule * module, WpCore * core, GVariant * args) WpObjectManager *om; om = wp_object_manager_new (); - wp_object_manager_add_interest_1 (om, WP_TYPE_CLIENT, NULL); + wp_object_manager_add_interest (om, WP_TYPE_CLIENT, NULL); wp_object_manager_request_proxy_features (om, WP_TYPE_CLIENT, WP_PROXY_FEATURES_STANDARD); diff --git a/modules/module-config-endpoint/context.c b/modules/module-config-endpoint/context.c index 365ba0bc..b2963c71 100644 --- a/modules/module-config-endpoint/context.c +++ b/modules/module-config-endpoint/context.c @@ -240,14 +240,14 @@ wp_config_endpoint_context_activate (WpPlugin * plugin) /* Install the session object manager */ self->sessions_om = wp_object_manager_new (); - wp_object_manager_add_interest_1 (self->sessions_om, WP_TYPE_SESSION, NULL); + wp_object_manager_add_interest (self->sessions_om, WP_TYPE_SESSION, NULL); wp_object_manager_request_proxy_features (self->sessions_om, WP_TYPE_SESSION, WP_SESSION_FEATURES_STANDARD); wp_core_install_object_manager (core, self->sessions_om); /* Handle node-added signal and install the nodes object manager */ self->nodes_om = wp_object_manager_new (); - wp_object_manager_add_interest_1 (self->nodes_om, WP_TYPE_NODE, NULL); + wp_object_manager_add_interest (self->nodes_om, WP_TYPE_NODE, NULL); wp_object_manager_request_proxy_features (self->nodes_om, WP_TYPE_NODE, WP_PROXY_FEATURES_STANDARD); g_signal_connect_object (self->nodes_om, "object-added", diff --git a/modules/module-config-policy/context.c b/modules/module-config-policy/context.c index c296fc5e..61f378b6 100644 --- a/modules/module-config-policy/context.c +++ b/modules/module-config-policy/context.c @@ -324,7 +324,7 @@ wp_config_policy_context_activate (WpPlugin * plugin) /* Install the session object manager */ self->sessions_om = wp_object_manager_new (); - wp_object_manager_add_interest_1 (self->sessions_om, WP_TYPE_SESSION, NULL); + wp_object_manager_add_interest (self->sessions_om, WP_TYPE_SESSION, NULL); wp_object_manager_request_proxy_features (self->sessions_om, WP_TYPE_SESSION, WP_SESSION_FEATURES_STANDARD); g_signal_connect_object (self->sessions_om, "object-added", diff --git a/modules/module-config-static-nodes/context.c b/modules/module-config-static-nodes/context.c index b609c27b..7238a459 100644 --- a/modules/module-config-static-nodes/context.c +++ b/modules/module-config-static-nodes/context.c @@ -168,7 +168,7 @@ wp_config_static_nodes_context_init (WpConfigStaticNodesContext *self) self->devices_om = wp_object_manager_new (); /* Only handle devices */ - wp_object_manager_add_interest_1 (self->devices_om, WP_TYPE_DEVICE, NULL); + wp_object_manager_add_interest (self->devices_om, WP_TYPE_DEVICE, NULL); wp_object_manager_request_proxy_features (self->devices_om, WP_TYPE_DEVICE, WP_PROXY_FEATURE_INFO); g_signal_connect (self->devices_om, "object-added", diff --git a/src/main.c b/src/main.c index 3e62b167..9b17fafa 100644 --- a/src/main.c +++ b/src/main.c @@ -82,7 +82,7 @@ activate_plugins (struct WpDaemonData *d) g_autoptr (WpObjectManager) om = NULL; om = wp_object_manager_new (); - wp_object_manager_add_interest_1 (om, WP_TYPE_PLUGIN, NULL); + wp_object_manager_add_interest (om, WP_TYPE_PLUGIN, NULL); g_signal_connect (om, "object-added", G_CALLBACK (on_plugin_added), d); wp_core_install_object_manager (d->core, om); diff --git a/tests/examples/audiotestsrc-play.c b/tests/examples/audiotestsrc-play.c index a7226423..7149af35 100644 --- a/tests/examples/audiotestsrc-play.c +++ b/tests/examples/audiotestsrc-play.c @@ -218,7 +218,7 @@ start_endpoints_provider (AppData * d) /* for example purposes, we pretend we don't have access to the data set by start_nodes_provider(), i.e. d->audiotestsrc & d->alsasink */ d->nodes_om = wp_object_manager_new (); - wp_object_manager_add_interest_1 (d->nodes_om, WP_TYPE_NODE, NULL); + wp_object_manager_add_interest (d->nodes_om, WP_TYPE_NODE, NULL); wp_object_manager_request_proxy_features (d->nodes_om, WP_TYPE_NODE, WP_PROXY_FEATURES_STANDARD); diff --git a/tests/modules/config-endpoint.c b/tests/modules/config-endpoint.c index 0203b057..62b8ff0b 100644 --- a/tests/modules/config-endpoint.c +++ b/tests/modules/config-endpoint.c @@ -132,7 +132,7 @@ simple (TestConfigEndpointFixture *f, gconstpointer data) /* Find the plugin context and handle the endpoint-created callback */ g_autoptr (WpObjectManager) om = wp_object_manager_new (); - wp_object_manager_add_interest_1 (om, WP_TYPE_PLUGIN, NULL); + wp_object_manager_add_interest (om, WP_TYPE_PLUGIN, NULL); wp_core_install_object_manager (f->base.core, om); g_autoptr (WpPlugin) ctx = wp_object_manager_lookup (om, WP_TYPE_PLUGIN, NULL); @@ -171,7 +171,7 @@ streams (TestConfigEndpointFixture *f, gconstpointer data) /* Find the plugin context and handle the endpoint-created callback */ g_autoptr (WpObjectManager) om = wp_object_manager_new (); - wp_object_manager_add_interest_1 (om, WP_TYPE_PLUGIN, NULL); + wp_object_manager_add_interest (om, WP_TYPE_PLUGIN, NULL); wp_core_install_object_manager (f->base.core, om); g_autoptr (WpPlugin) ctx = wp_object_manager_lookup (om, WP_TYPE_PLUGIN, NULL); diff --git a/tests/modules/config-policy.c b/tests/modules/config-policy.c index a9d0da2c..adb91b01 100644 --- a/tests/modules/config-policy.c +++ b/tests/modules/config-policy.c @@ -232,7 +232,7 @@ playback (TestFixture *f, gconstpointer data) /* Find the plugin context and handle the link-activated callback */ g_autoptr (WpObjectManager) om = wp_object_manager_new (); - wp_object_manager_add_interest_1 (om, WP_TYPE_PLUGIN, NULL); + wp_object_manager_add_interest (om, WP_TYPE_PLUGIN, NULL); wp_core_install_object_manager (f->base.core, om); g_autoptr (WpPlugin) ctx = wp_object_manager_lookup (om, WP_TYPE_PLUGIN, NULL); g_assert_nonnull (ctx); diff --git a/tests/modules/config-static-nodes.c b/tests/modules/config-static-nodes.c index 04ecfa2c..71df1b50 100644 --- a/tests/modules/config-static-nodes.c +++ b/tests/modules/config-static-nodes.c @@ -58,7 +58,7 @@ basic (TestConfigStaticNodesFixture *f, gconstpointer data) /* Find the plugin context and handle the node-created callback */ g_autoptr (WpObjectManager) om = wp_object_manager_new (); - wp_object_manager_add_interest_1 (om, WP_TYPE_PLUGIN, NULL); + wp_object_manager_add_interest (om, WP_TYPE_PLUGIN, NULL); wp_core_install_object_manager (f->base.core, om); g_autoptr (WpPlugin) ctx = wp_object_manager_lookup (om, WP_TYPE_PLUGIN, NULL); g_assert_nonnull (ctx); diff --git a/tests/modules/si-audio-softdsp-endpoint.c b/tests/modules/si-audio-softdsp-endpoint.c index 33b58f24..fd955a80 100644 --- a/tests/modules/si-audio-softdsp-endpoint.c +++ b/tests/modules/si-audio-softdsp-endpoint.c @@ -238,7 +238,7 @@ test_si_audio_softdsp_endpoint_export (TestFixture * f, gconstpointer user_data) /* find self_client, to be used for verifying endpoint.client.id */ clients_om = wp_object_manager_new (); - wp_object_manager_add_interest_1 (clients_om, WP_TYPE_CLIENT, NULL); + wp_object_manager_add_interest (clients_om, WP_TYPE_CLIENT, NULL); wp_object_manager_request_proxy_features (clients_om, WP_TYPE_CLIENT, WP_PROXY_FEATURE_BOUND); g_signal_connect_swapped (clients_om, "objects-changed", diff --git a/tests/modules/si-simple-node-endpoint.c b/tests/modules/si-simple-node-endpoint.c index 621e2182..7f905f21 100644 --- a/tests/modules/si-simple-node-endpoint.c +++ b/tests/modules/si-simple-node-endpoint.c @@ -235,7 +235,7 @@ test_si_simple_node_endpoint_export (TestFixture * f, gconstpointer user_data) /* find self_client, to be used for verifying endpoint.client.id */ clients_om = wp_object_manager_new (); - wp_object_manager_add_interest_1 (clients_om, WP_TYPE_CLIENT, NULL); + wp_object_manager_add_interest (clients_om, WP_TYPE_CLIENT, NULL); wp_object_manager_request_proxy_features (clients_om, WP_TYPE_CLIENT, WP_PROXY_FEATURE_BOUND); g_signal_connect_swapped (clients_om, "objects-changed", diff --git a/tests/modules/si-standard-link.c b/tests/modules/si-standard-link.c index 02f917ee..707207dc 100644 --- a/tests/modules/si-standard-link.c +++ b/tests/modules/si-standard-link.c @@ -153,7 +153,7 @@ test_si_standard_link_main (TestFixture * f, gconstpointer user_data) /* find the "audio" session from the client */ { g_autoptr (WpObjectManager) om = wp_object_manager_new (); - wp_object_manager_add_interest_1 (om, WP_TYPE_SESSION, NULL); + wp_object_manager_add_interest (om, WP_TYPE_SESSION, NULL); wp_object_manager_request_proxy_features (om, WP_TYPE_SESSION, WP_SESSION_FEATURES_STANDARD); test_ensure_object_manager_is_installed (om, f->base.client_core, @@ -246,9 +246,9 @@ test_si_standard_link_main (TestFixture * f, gconstpointer user_data) g_autoptr (WpLink) link = NULL; g_autoptr (WpObjectManager) om = wp_object_manager_new (); - wp_object_manager_add_interest_1 (om, WP_TYPE_NODE, NULL); - wp_object_manager_add_interest_1 (om, WP_TYPE_PORT, NULL); - wp_object_manager_add_interest_1 (om, WP_TYPE_LINK, NULL); + wp_object_manager_add_interest (om, WP_TYPE_NODE, NULL); + wp_object_manager_add_interest (om, WP_TYPE_PORT, NULL); + wp_object_manager_add_interest (om, WP_TYPE_LINK, NULL); wp_object_manager_request_proxy_features (om, WP_TYPE_PROXY, WP_PROXY_FEATURES_STANDARD); test_ensure_object_manager_is_installed (om, f->base.client_core, @@ -299,9 +299,9 @@ test_si_standard_link_main (TestFixture * f, gconstpointer user_data) g_autoptr (WpLink) link = NULL; g_autoptr (WpObjectManager) om = wp_object_manager_new (); - wp_object_manager_add_interest_1 (om, WP_TYPE_NODE, NULL); - wp_object_manager_add_interest_1 (om, WP_TYPE_PORT, NULL); - wp_object_manager_add_interest_1 (om, WP_TYPE_LINK, NULL); + wp_object_manager_add_interest (om, WP_TYPE_NODE, NULL); + wp_object_manager_add_interest (om, WP_TYPE_PORT, NULL); + wp_object_manager_add_interest (om, WP_TYPE_LINK, NULL); wp_object_manager_request_proxy_features (om, WP_TYPE_PROXY, WP_PROXY_FEATURES_STANDARD); test_ensure_object_manager_is_installed (om, f->base.client_core, @@ -341,7 +341,7 @@ test_si_standard_link_destroy (TestFixture * f, gconstpointer user_data) /* find the "audio" session from the client */ { g_autoptr (WpObjectManager) om = wp_object_manager_new (); - wp_object_manager_add_interest_1 (om, WP_TYPE_SESSION, NULL); + wp_object_manager_add_interest (om, WP_TYPE_SESSION, NULL); wp_object_manager_request_proxy_features (om, WP_TYPE_SESSION, WP_SESSION_FEATURES_STANDARD); test_ensure_object_manager_is_installed (om, f->base.client_core, @@ -415,7 +415,7 @@ test_si_standard_link_destroy (TestFixture * f, gconstpointer user_data) { g_autoptr (WpObjectManager) om = wp_object_manager_new (); - wp_object_manager_add_interest_1 (om, WP_TYPE_ENDPOINT_LINK, NULL); + wp_object_manager_add_interest (om, WP_TYPE_ENDPOINT_LINK, NULL); test_ensure_object_manager_is_installed (om, f->base.core, f->base.loop); g_assert_cmpuint (wp_object_manager_get_n_objects (om), ==, 0); diff --git a/tests/wp/core.c b/tests/wp/core.c index 3cee03b4..000390f7 100644 --- a/tests/wp/core.c +++ b/tests/wp/core.c @@ -54,7 +54,7 @@ test_core_server_disconnected (TestFixture *f, gconstpointer data) g_signal_connect (f->om, "object-added", G_CALLBACK (expect_object_added), f); - wp_object_manager_add_interest_1 (f->om, WP_TYPE_CLIENT, NULL); + wp_object_manager_add_interest (f->om, WP_TYPE_CLIENT, NULL); wp_core_install_object_manager (f->base.core, f->om); /* connect */ @@ -82,7 +82,7 @@ test_core_client_disconnected (TestFixture *f, gconstpointer data) g_signal_connect (f->om, "object-added", G_CALLBACK (expect_object_added), f); - wp_object_manager_add_interest_1 (f->om, WP_TYPE_CLIENT, NULL); + wp_object_manager_add_interest (f->om, WP_TYPE_CLIENT, NULL); wp_core_install_object_manager (f->base.core, f->om); /* connect */ diff --git a/tests/wp/endpoint.c b/tests/wp/endpoint.c index b2ebf836..2ee9b4bb 100644 --- a/tests/wp/endpoint.c +++ b/tests/wp/endpoint.c @@ -287,7 +287,7 @@ test_endpoint_basic (TestEndpointFixture *fixture, gconstpointer data) (GCallback) test_endpoint_basic_impl_object_added, fixture); g_signal_connect (fixture->export_om, "object-removed", (GCallback) test_endpoint_basic_impl_object_removed, fixture); - wp_object_manager_add_interest_1 (fixture->export_om, WP_TYPE_ENDPOINT, NULL); + wp_object_manager_add_interest (fixture->export_om, WP_TYPE_ENDPOINT, NULL); wp_object_manager_request_proxy_features (fixture->export_om, WP_TYPE_ENDPOINT, WP_PROXY_FEATURES_STANDARD | WP_PROXY_FEATURE_CONTROLS); wp_core_install_object_manager (fixture->base.core, fixture->export_om); @@ -297,7 +297,7 @@ test_endpoint_basic (TestEndpointFixture *fixture, gconstpointer data) (GCallback) test_endpoint_basic_proxy_object_added, fixture); g_signal_connect (fixture->proxy_om, "object-removed", (GCallback) test_endpoint_basic_proxy_object_removed, fixture); - wp_object_manager_add_interest_1 (fixture->proxy_om, WP_TYPE_ENDPOINT, NULL); + wp_object_manager_add_interest (fixture->proxy_om, WP_TYPE_ENDPOINT, NULL); wp_object_manager_request_proxy_features (fixture->proxy_om, WP_TYPE_ENDPOINT, WP_PROXY_FEATURES_STANDARD | WP_PROXY_FEATURE_CONTROLS); wp_core_install_object_manager (fixture->base.client_core, fixture->proxy_om); diff --git a/tests/wp/proxy.c b/tests/wp/proxy.c index 7dbdd567..a57e49c0 100644 --- a/tests/wp/proxy.c +++ b/tests/wp/proxy.c @@ -83,7 +83,7 @@ test_proxy_basic (TestProxyFixture *fixture, gconstpointer data) g_signal_connect (fixture->om, "object-added", (GCallback) test_proxy_basic_object_added, fixture); - wp_object_manager_add_interest_1 (fixture->om, WP_TYPE_CLIENT, NULL); + wp_object_manager_add_interest (fixture->om, WP_TYPE_CLIENT, NULL); wp_core_install_object_manager (fixture->base.core, fixture->om); g_main_loop_run (fixture->base.loop); @@ -184,7 +184,7 @@ test_node (TestProxyFixture *fixture, gconstpointer data) /* declare interest and set default features to be ready when the signal is fired */ - wp_object_manager_add_interest_1 (fixture->om, WP_TYPE_NODE, NULL); + wp_object_manager_add_interest (fixture->om, WP_TYPE_NODE, NULL); wp_object_manager_request_proxy_features (fixture->om, WP_TYPE_NODE, WP_PROXY_FEATURES_STANDARD); wp_core_install_object_manager (fixture->base.core, fixture->om); diff --git a/tests/wp/session.c b/tests/wp/session.c index 4aa0eccd..0e205ce1 100644 --- a/tests/wp/session.c +++ b/tests/wp/session.c @@ -150,7 +150,7 @@ test_session_basic (TestSessionFixture *fixture, gconstpointer data) (GCallback) test_session_basic_exported_object_added, fixture); g_signal_connect (fixture->export_om, "object-removed", (GCallback) test_session_basic_exported_object_removed, fixture); - wp_object_manager_add_interest_1 (fixture->export_om, + wp_object_manager_add_interest (fixture->export_om, WP_TYPE_IMPL_SESSION, NULL); wp_object_manager_request_proxy_features (fixture->export_om, WP_TYPE_IMPL_SESSION, WP_SESSION_FEATURES_STANDARD); @@ -161,7 +161,7 @@ test_session_basic (TestSessionFixture *fixture, gconstpointer data) (GCallback) test_session_basic_proxy_object_added, fixture); g_signal_connect (fixture->proxy_om, "object-removed", (GCallback) test_session_basic_proxy_object_removed, fixture); - wp_object_manager_add_interest_1 (fixture->proxy_om, WP_TYPE_SESSION, NULL); + wp_object_manager_add_interest (fixture->proxy_om, WP_TYPE_SESSION, NULL); wp_object_manager_request_proxy_features (fixture->proxy_om, WP_TYPE_SESSION, WP_SESSION_FEATURES_STANDARD); wp_core_install_object_manager (fixture->base.client_core, fixture->proxy_om); diff --git a/tools/wireplumber-cli.c b/tools/wireplumber-cli.c index 29e996e1..c9053cdc 100644 --- a/tools/wireplumber-cli.c +++ b/tools/wireplumber-cli.c @@ -277,7 +277,7 @@ main (gint argc, gchar **argv) /* ls-endpoints */ if (argc == 2 && !g_strcmp0 (argv[1], "ls-endpoints")) { - wp_object_manager_add_interest_1 (om, WP_TYPE_SESSION, NULL); + wp_object_manager_add_interest (om, WP_TYPE_SESSION, NULL); wp_object_manager_request_proxy_features (om, WP_TYPE_SESSION, WP_SESSION_FEATURES_STANDARD); func = (GCallback) list_endpoints; @@ -291,8 +291,8 @@ main (gint argc, gchar **argv) } data.params.set_default.id = id; - wp_object_manager_add_interest_1 (om, WP_TYPE_SESSION, NULL); - wp_object_manager_add_interest_1 (om, WP_TYPE_ENDPOINT, NULL); + wp_object_manager_add_interest (om, WP_TYPE_SESSION, NULL); + wp_object_manager_add_interest (om, WP_TYPE_ENDPOINT, NULL); wp_object_manager_request_proxy_features (om, WP_TYPE_PROXY, WP_PROXY_FEATURES_STANDARD | WP_PROXY_FEATURE_CONTROLS); func = (GCallback) set_default; @@ -308,14 +308,14 @@ main (gint argc, gchar **argv) data.params.set_volume.id = id; data.params.set_volume.volume = volume; - wp_object_manager_add_interest_1 (om, WP_TYPE_ENDPOINT, NULL); + wp_object_manager_add_interest (om, WP_TYPE_ENDPOINT, NULL); wp_object_manager_request_proxy_features (om, WP_TYPE_ENDPOINT, WP_PROXY_FEATURES_STANDARD | WP_PROXY_FEATURE_CONTROLS); func = (GCallback) set_volume; } /* device-node-props */ else if (argc == 2 && !g_strcmp0 (argv[1], "device-node-props")) { - wp_object_manager_add_interest_1 (om, WP_TYPE_NODE, NULL); + wp_object_manager_add_interest (om, WP_TYPE_NODE, NULL); wp_object_manager_request_proxy_features (om, WP_TYPE_NODE, WP_PROXY_FEATURES_STANDARD); func = (GCallback) device_node_props;