wireplumber/lib/wp/factory.h

47 lines
1.5 KiB
C
Raw Normal View History

/* WirePlumber
*
* Copyright © 2019 Collabora Ltd.
* @author George Kiagiadakis <george.kiagiadakis@collabora.com>
*
2019-05-31 12:13:01 +03:00
* SPDX-License-Identifier: MIT
*/
#ifndef __WIREPLUMBER_FACTORY_H__
#define __WIREPLUMBER_FACTORY_H__
2019-06-20 14:39:20 -04:00
#include <gio/gio.h>
#include "core.h"
G_BEGIN_DECLS
#define WP_TYPE_FACTORY (wp_factory_get_type ())
G_DECLARE_FINAL_TYPE (WpFactory, wp_factory, WP, FACTORY, GObject)
typedef gpointer (*WpFactoryFunc) (WpFactory * self, GType type,
GVariant * properties);
2019-06-20 14:39:20 -04:00
typedef void (*WpFactoryAsyncFunc) (WpFactory * self, GType type,
GVariant * properties, GAsyncReadyCallback ready, gpointer user_data);
WpFactory * wp_factory_new (WpCore * core, const gchar * name,
WpFactoryFunc func);
2019-06-20 14:39:20 -04:00
WpFactory * wp_factory_new_async (WpCore * core, const gchar * name,
WpFactoryAsyncFunc func);
const gchar * wp_factory_get_name (WpFactory * self);
WpCore * wp_factory_get_core (WpFactory * self);
gpointer wp_factory_create_object (WpFactory * self, GType type,
GVariant * properties);
2019-06-20 14:39:20 -04:00
void wp_factory_create_object_async (WpFactory * self, GType type,
GVariant * properties, GAsyncReadyCallback ready, gpointer user_data);
WpFactory * wp_factory_find (WpCore * core, const gchar * name);
gpointer wp_factory_make (WpCore * core, const gchar * name, GType type,
GVariant * properties);
2019-06-20 14:39:20 -04:00
void wp_factory_make_async (WpCore * core, const gchar * name, GType type,
GVariant * properties, GAsyncReadyCallback ready, gpointer user_data);
G_END_DECLS
#endif