registry: hide again the WpCore struct, separate registry and core better

This commit is contained in:
George Kiagiadakis
2020-02-17 18:31:03 +02:00
parent 0b55729e06
commit c46a48d13f
9 changed files with 75 additions and 69 deletions

View File

@@ -72,7 +72,7 @@ wp_factory_new (WpCore * core, const gchar * name, WpFactoryFunc func)
g_info ("WpFactory:%p new factory: %s", f, name);
wp_core_register_object (core, f);
wp_registry_register_object (wp_core_get_registry (core), f);
return f;
}
@@ -124,8 +124,8 @@ wp_factory_find (WpCore * core, const gchar * name)
{
GObject *f;
GQuark q = g_quark_from_string (name);
f = wp_core_find_object (core, (GEqualFunc) find_factory_func,
GUINT_TO_POINTER (q));
f = wp_registry_find_object (wp_core_get_registry (core),
(GEqualFunc) find_factory_func, GUINT_TO_POINTER (q));
return f ? WP_FACTORY (f) : NULL;
}