Debian Codegraph @

lib/wp/plugin.h

raw
1 /* WirePlumber
2 *
3 * Copyright © 2020 Collabora Ltd.
4 * @author George Kiagiadakis <[email protected]>
5 *
6 * SPDX-License-Identifier: MIT
7 */
8
9 #ifndef __WIREPLUMBER_PLUGIN_H__
10 #define __WIREPLUMBER_PLUGIN_H__
11
12 #include "object.h"
13
14 G_BEGIN_DECLS
15
16 /*!
17 * \brief Flags to be used as WpObjectFeatures on WpPlugin subclasses.
18 * \ingroup wpplugin
19 */
20 typedef enum { /*< flags >*/
21 /*! enables the plugin */
22 WP_PLUGIN_FEATURE_ENABLED = (1 << 0),
23 } WpPluginFeatures;
24
25 /*!
26 * \brief The WpPlugin GType
27 * \ingroup wpplugin
28 */
29 #define WP_TYPE_PLUGIN (wp_plugin_get_type ())
30 WP_API
31 G_DECLARE_DERIVABLE_TYPE (WpPlugin, wp_plugin, WP, PLUGIN, WpObject)
32
33 struct _WpPluginClass
34 {
35 WpObjectClass parent_class;
36
37 void (*enable) (WpPlugin * self, WpTransition * transition);
38 void (*disable) (WpPlugin * self);
39
40 /*< private >*/
41 WP_PADDING(6)
42 };
43
44 WP_API
45 WpPlugin * wp_plugin_find (WpCore * core, const gchar * plugin_name);
46
47 WP_API
48 const gchar * wp_plugin_get_name (WpPlugin * self);
49
50 G_END_DECLS
51
52 #endif