Files
wireplumber/lib/wp/si-factory.h
George Kiagiadakis 8a8cd97ca8 core: make the object registration functions public
This allows registering arbitrary objects on the core's registry and
finding them later, without having to add API for each and every object.

I think this is useful enough to have it public, even though it's
probably not going to be used that much... The rationale here is to
allow registering custom component loaders without having to make them
subclass WpPlugin or to create custom API for registering component
loaders specifically.

Also, remove the wp_plugin_register() and wp_si_factory_register()
functions, since they are not going to be used much in the future.
The idea is to let the component loader do the registration under the
scenes, as the component is getting loaded.
2023-06-20 12:39:29 +03:00

54 lines
1.1 KiB
C

/* WirePlumber
*
* Copyright © 2020 Collabora Ltd.
* @author George Kiagiadakis <george.kiagiadakis@collabora.com>
*
* SPDX-License-Identifier: MIT
*/
#ifndef __WIREPLUMBER_SI_FACTORY_H__
#define __WIREPLUMBER_SI_FACTORY_H__
#include "core.h"
#include "session-item.h"
G_BEGIN_DECLS
/*!
* \brief The WpSiFactory GType
* \ingroup wpsifactory
*/
#define WP_TYPE_SI_FACTORY (wp_si_factory_get_type ())
WP_API
G_DECLARE_DERIVABLE_TYPE (WpSiFactory, wp_si_factory, WP, SI_FACTORY, GObject)
struct _WpSiFactoryClass
{
GObjectClass parent_class;
WpSessionItem * (*construct) (WpSiFactory * self, WpCore * core);
/*< private >*/
WP_PADDING(7)
};
WP_API
WpSiFactory * wp_si_factory_new_simple (const gchar * factory_name,
GType si_type);
WP_API
const gchar * wp_si_factory_get_name (WpSiFactory * self);
WP_API
WpSessionItem * wp_si_factory_construct (WpSiFactory * self, WpCore * core);
WP_API
WpSiFactory * wp_si_factory_find (WpCore * core, const gchar * factory_name);
WP_API
WpSessionItem * wp_session_item_make (WpCore * core, const gchar * factory_name);
G_END_DECLS
#endif