Skip to content
Snippets Groups Projects
Commit bccb160b authored by George Kiagiadakis's avatar George Kiagiadakis
Browse files

port some more deprecated object-manager calls

parent 735b44c2
No related branches found
No related tags found
No related merge requests found
...@@ -120,8 +120,8 @@ wp_policy_manager_get_instance (WpCore *core) ...@@ -120,8 +120,8 @@ wp_policy_manager_get_instance (WpCore *core)
mgr = g_object_new (WP_TYPE_POLICY_MANAGER, NULL); mgr = g_object_new (WP_TYPE_POLICY_MANAGER, NULL);
/* install the object manager to listen to added/removed endpoints */ /* install the object manager to listen to added/removed endpoints */
wp_object_manager_add_interest (mgr->endpoints_om, wp_object_manager_add_interest_1 (mgr->endpoints_om,
WP_TYPE_BASE_ENDPOINT, NULL, 0); WP_TYPE_BASE_ENDPOINT, NULL);
g_signal_connect_object (mgr->endpoints_om, "object-added", g_signal_connect_object (mgr->endpoints_om, "object-added",
(GCallback) policy_mgr_endpoint_added, mgr, 0); (GCallback) policy_mgr_endpoint_added, mgr, 0);
g_signal_connect_object (mgr->endpoints_om, "object-removed", g_signal_connect_object (mgr->endpoints_om, "object-removed",
...@@ -129,8 +129,10 @@ wp_policy_manager_get_instance (WpCore *core) ...@@ -129,8 +129,10 @@ wp_policy_manager_get_instance (WpCore *core)
wp_core_install_object_manager (core, mgr->endpoints_om); wp_core_install_object_manager (core, mgr->endpoints_om);
/* install the object manager to listen to changed sessions */ /* install the object manager to listen to changed sessions */
wp_object_manager_add_interest (mgr->sessions_om, wp_object_manager_add_interest_1 (mgr->sessions_om,
WP_TYPE_IMPL_SESSION, NULL, WP_TYPE_IMPL_SESSION, NULL);
wp_object_manager_request_proxy_features (mgr->sessions_om,
WP_TYPE_IMPL_SESSION,
WP_PROXY_FEATURES_STANDARD | WP_PROXY_FEATURE_CONTROLS); WP_PROXY_FEATURES_STANDARD | WP_PROXY_FEATURE_CONTROLS);
wp_core_install_object_manager (core, mgr->sessions_om); wp_core_install_object_manager (core, mgr->sessions_om);
......
...@@ -33,7 +33,8 @@ wireplumber__module_init (WpModule * module, WpCore * core, GVariant * args) ...@@ -33,7 +33,8 @@ wireplumber__module_init (WpModule * module, WpCore * core, GVariant * args)
WpObjectManager *om; WpObjectManager *om;
om = wp_object_manager_new (); om = wp_object_manager_new ();
wp_object_manager_add_interest (om, WP_TYPE_CLIENT, NULL, wp_object_manager_add_interest_1 (om, WP_TYPE_CLIENT, NULL);
wp_object_manager_request_proxy_features (om, WP_TYPE_CLIENT,
WP_PROXY_FEATURES_STANDARD); WP_PROXY_FEATURES_STANDARD);
g_signal_connect (om, "object-added", (GCallback) client_added, NULL); g_signal_connect (om, "object-added", (GCallback) client_added, NULL);
......
...@@ -260,7 +260,8 @@ wp_config_endpoint_context_init (WpConfigEndpointContext *self) ...@@ -260,7 +260,8 @@ wp_config_endpoint_context_init (WpConfigEndpointContext *self)
g_direct_equal, NULL, (GDestroyNotify) g_object_unref); g_direct_equal, NULL, (GDestroyNotify) g_object_unref);
/* Only handle augmented nodes with info set */ /* Only handle augmented nodes with info set */
wp_object_manager_add_interest (self->om, WP_TYPE_NODE, NULL, wp_object_manager_add_interest_1 (self->om, WP_TYPE_NODE, NULL);
wp_object_manager_request_proxy_features (self->om, WP_TYPE_NODE,
WP_PROXY_FEATURES_STANDARD); WP_PROXY_FEATURES_STANDARD);
/* Register the global added/removed callbacks */ /* Register the global added/removed callbacks */
......
...@@ -213,8 +213,9 @@ wp_config_static_nodes_context_init (WpConfigStaticNodesContext *self) ...@@ -213,8 +213,9 @@ wp_config_static_nodes_context_init (WpConfigStaticNodesContext *self)
self->devices_om = wp_object_manager_new (); self->devices_om = wp_object_manager_new ();
/* Only handle devices */ /* Only handle devices */
wp_object_manager_add_interest (self->devices_om, wp_object_manager_add_interest_1 (self->devices_om, WP_TYPE_DEVICE, NULL);
WP_TYPE_DEVICE, NULL, WP_PROXY_FEATURE_INFO); wp_object_manager_request_proxy_features (self->devices_om, WP_TYPE_DEVICE,
WP_PROXY_FEATURE_INFO);
g_signal_connect (self->devices_om, "object-added", g_signal_connect (self->devices_om, "object-added",
(GCallback) on_device_added, self); (GCallback) on_device_added, self);
} }
......
...@@ -287,9 +287,9 @@ test_endpoint_basic (TestEndpointFixture *fixture, gconstpointer data) ...@@ -287,9 +287,9 @@ test_endpoint_basic (TestEndpointFixture *fixture, gconstpointer data)
(GCallback) test_endpoint_basic_impl_object_added, fixture); (GCallback) test_endpoint_basic_impl_object_added, fixture);
g_signal_connect (fixture->export_om, "object-removed", g_signal_connect (fixture->export_om, "object-removed",
(GCallback) test_endpoint_basic_impl_object_removed, fixture); (GCallback) test_endpoint_basic_impl_object_removed, fixture);
wp_object_manager_add_interest (fixture->export_om, wp_object_manager_add_interest_1 (fixture->export_om, WP_TYPE_ENDPOINT, NULL);
WP_TYPE_ENDPOINT, NULL, wp_object_manager_request_proxy_features (fixture->export_om,
WP_PROXY_FEATURES_STANDARD | WP_PROXY_FEATURE_CONTROLS); WP_TYPE_ENDPOINT, WP_PROXY_FEATURES_STANDARD | WP_PROXY_FEATURE_CONTROLS);
wp_core_install_object_manager (fixture->base.core, fixture->export_om); wp_core_install_object_manager (fixture->base.core, fixture->export_om);
/* set up the proxy side */ /* set up the proxy side */
...@@ -297,8 +297,8 @@ test_endpoint_basic (TestEndpointFixture *fixture, gconstpointer data) ...@@ -297,8 +297,8 @@ test_endpoint_basic (TestEndpointFixture *fixture, gconstpointer data)
(GCallback) test_endpoint_basic_proxy_object_added, fixture); (GCallback) test_endpoint_basic_proxy_object_added, fixture);
g_signal_connect (fixture->proxy_om, "object-removed", g_signal_connect (fixture->proxy_om, "object-removed",
(GCallback) test_endpoint_basic_proxy_object_removed, fixture); (GCallback) test_endpoint_basic_proxy_object_removed, fixture);
wp_object_manager_add_interest (fixture->proxy_om, wp_object_manager_add_interest_1 (fixture->proxy_om, WP_TYPE_ENDPOINT, NULL);
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_PROXY_FEATURES_STANDARD | WP_PROXY_FEATURE_CONTROLS);
wp_core_install_object_manager (fixture->base.client_core, fixture->proxy_om); wp_core_install_object_manager (fixture->base.client_core, fixture->proxy_om);
......
...@@ -83,7 +83,7 @@ test_proxy_basic (TestProxyFixture *fixture, gconstpointer data) ...@@ -83,7 +83,7 @@ test_proxy_basic (TestProxyFixture *fixture, gconstpointer data)
g_signal_connect (fixture->om, "object-added", g_signal_connect (fixture->om, "object-added",
(GCallback) test_proxy_basic_object_added, fixture); (GCallback) test_proxy_basic_object_added, fixture);
wp_object_manager_add_interest (fixture->om, WP_TYPE_CLIENT, NULL, 0); wp_object_manager_add_interest_1 (fixture->om, WP_TYPE_CLIENT, NULL);
wp_core_install_object_manager (fixture->base.core, fixture->om); wp_core_install_object_manager (fixture->base.core, fixture->om);
g_main_loop_run (fixture->base.loop); g_main_loop_run (fixture->base.loop);
...@@ -184,8 +184,9 @@ test_node (TestProxyFixture *fixture, gconstpointer data) ...@@ -184,8 +184,9 @@ test_node (TestProxyFixture *fixture, gconstpointer data)
/* declare interest and set default features to be ready /* declare interest and set default features to be ready
when the signal is fired */ when the signal is fired */
wp_object_manager_add_interest (fixture->om, wp_object_manager_add_interest_1 (fixture->om, WP_TYPE_NODE, NULL);
WP_TYPE_NODE, NULL, WP_PROXY_FEATURES_STANDARD); 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); wp_core_install_object_manager (fixture->base.core, fixture->om);
g_main_loop_run (fixture->base.loop); g_main_loop_run (fixture->base.loop);
......
...@@ -150,9 +150,10 @@ test_session_basic (TestSessionFixture *fixture, gconstpointer data) ...@@ -150,9 +150,10 @@ test_session_basic (TestSessionFixture *fixture, gconstpointer data)
(GCallback) test_session_basic_exported_object_added, fixture); (GCallback) test_session_basic_exported_object_added, fixture);
g_signal_connect (fixture->export_om, "object-removed", g_signal_connect (fixture->export_om, "object-removed",
(GCallback) test_session_basic_exported_object_removed, fixture); (GCallback) test_session_basic_exported_object_removed, fixture);
wp_object_manager_add_interest (fixture->export_om, wp_object_manager_add_interest_1 (fixture->export_om,
WP_TYPE_IMPL_SESSION, NULL, WP_TYPE_IMPL_SESSION, NULL);
WP_SESSION_FEATURES_STANDARD); wp_object_manager_request_proxy_features (fixture->export_om,
WP_TYPE_IMPL_SESSION, WP_SESSION_FEATURES_STANDARD);
wp_core_install_object_manager (fixture->base.core, fixture->export_om); wp_core_install_object_manager (fixture->base.core, fixture->export_om);
/* set up the proxy side */ /* set up the proxy side */
...@@ -160,9 +161,9 @@ test_session_basic (TestSessionFixture *fixture, gconstpointer data) ...@@ -160,9 +161,9 @@ test_session_basic (TestSessionFixture *fixture, gconstpointer data)
(GCallback) test_session_basic_proxy_object_added, fixture); (GCallback) test_session_basic_proxy_object_added, fixture);
g_signal_connect (fixture->proxy_om, "object-removed", g_signal_connect (fixture->proxy_om, "object-removed",
(GCallback) test_session_basic_proxy_object_removed, fixture); (GCallback) test_session_basic_proxy_object_removed, fixture);
wp_object_manager_add_interest (fixture->proxy_om, wp_object_manager_add_interest_1 (fixture->proxy_om, WP_TYPE_SESSION, NULL);
WP_TYPE_SESSION, NULL, wp_object_manager_request_proxy_features (fixture->proxy_om,
WP_SESSION_FEATURES_STANDARD); WP_TYPE_SESSION, WP_SESSION_FEATURES_STANDARD);
wp_core_install_object_manager (fixture->base.client_core, fixture->proxy_om); wp_core_install_object_manager (fixture->base.client_core, fixture->proxy_om);
/* create session */ /* create session */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment