| 1 |
/* WirePlumber |
| 2 |
* |
| 3 |
* Copyright © 2021 Collabora Ltd. |
| 4 |
* @author George Kiagiadakis <[email protected]> |
| 5 |
* |
| 6 |
* SPDX-License-Identifier: MIT |
| 7 |
*/ |
| 8 |
|
| 9 |
#ifndef __WIREPLUMBER_COMPONENT_LOADER_H__ |
| 10 |
#define __WIREPLUMBER_COMPONENT_LOADER_H__ |
| 11 |
|
| 12 |
#include "plugin.h" |
| 13 |
#include "spa-json.h" |
| 14 |
|
| 15 |
G_BEGIN_DECLS |
| 16 |
|
| 17 |
/*! |
| 18 |
* \brief The WpComponentLoader GType |
| 19 |
* \ingroup wpcomponentloader |
| 20 |
*/ |
| 21 |
#define WP_TYPE_COMPONENT_LOADER (wp_component_loader_get_type ()) |
| 22 |
WP_API |
| 23 |
G_DECLARE_INTERFACE (WpComponentLoader, wp_component_loader, |
| 24 |
WP, COMPONENT_LOADER, GObject) |
| 25 |
|
| 26 |
struct _WpComponentLoaderInterface |
| 27 |
{ |
| 28 |
GTypeInterface interface; |
| 29 |
|
| 30 |
gboolean (*supports_type) (WpComponentLoader * self, const gchar * type); |
| 31 |
|
| 32 |
void (*load) (WpComponentLoader * self, WpCore * core, |
| 33 |
const gchar * component, const gchar * type, WpSpaJson * args, |
| 34 |
GCancellable * cancellable, GAsyncReadyCallback callback, gpointer data); |
| 35 |
|
| 36 |
GObject * (*load_finish) (WpComponentLoader * self, GAsyncResult * res, |
| 37 |
GError ** error); |
| 38 |
|
| 39 |
/*< private >*/ |
| 40 |
WP_PADDING(5) |
| 41 |
}; |
| 42 |
|
| 43 |
WP_API |
| 44 |
void wp_core_load_component (WpCore * self, const gchar * component, |
| 45 |
const gchar * type, WpSpaJson * args, const gchar * provides, |
| 46 |
GCancellable * cancellable, GAsyncReadyCallback callback, gpointer data); |
| 47 |
|
| 48 |
WP_API |
| 49 |
gboolean wp_core_load_component_finish (WpCore * self, GAsyncResult * res, |
| 50 |
GError ** error); |
| 51 |
|
| 52 |
G_END_DECLS |
| 53 |
|
| 54 |
#endif |