File: component-loader.h

package info (click to toggle)
wireplumber 0.5.12-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,244 kB
  • sloc: ansic: 41,043; python: 391; sh: 62; makefile: 57; xml: 23
file content (54 lines) | stat: -rw-r--r-- 1,404 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/* WirePlumber
 *
 * Copyright © 2021 Collabora Ltd.
 *    @author George Kiagiadakis <george.kiagiadakis@collabora.com>
 *
 * SPDX-License-Identifier: MIT
 */

#ifndef __WIREPLUMBER_COMPONENT_LOADER_H__
#define __WIREPLUMBER_COMPONENT_LOADER_H__

#include "plugin.h"
#include "spa-json.h"

G_BEGIN_DECLS

/*!
 * \brief The WpComponentLoader GType
 * \ingroup wpcomponentloader
 */
#define WP_TYPE_COMPONENT_LOADER (wp_component_loader_get_type ())
WP_API
G_DECLARE_INTERFACE (WpComponentLoader, wp_component_loader,
                     WP, COMPONENT_LOADER, GObject)

struct _WpComponentLoaderInterface
{
  GTypeInterface interface;

  gboolean (*supports_type) (WpComponentLoader * self, const gchar * type);

  void (*load) (WpComponentLoader * self, WpCore * core,
      const gchar * component, const gchar * type, WpSpaJson * args,
      GCancellable * cancellable, GAsyncReadyCallback callback, gpointer data);

  GObject * (*load_finish) (WpComponentLoader * self, GAsyncResult * res,
      GError ** error);

  /*< private >*/
  WP_PADDING(5)
};

WP_API
void wp_core_load_component (WpCore * self, const gchar * component,
    const gchar * type, WpSpaJson * args, const gchar * provides,
    GCancellable * cancellable, GAsyncReadyCallback callback, gpointer data);

WP_API
gboolean wp_core_load_component_finish (WpCore * self, GAsyncResult * res,
    GError ** error);

G_END_DECLS

#endif