2019-05-17 13:08:45 +03:00
|
|
|
/* WirePlumber
|
|
|
|
|
*
|
|
|
|
|
* Copyright © 2019 Collabora Ltd.
|
|
|
|
|
* @author George Kiagiadakis <george.kiagiadakis@collabora.com>
|
|
|
|
|
*
|
2019-05-31 12:13:01 +03:00
|
|
|
* SPDX-License-Identifier: MIT
|
2019-05-17 13:08:45 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef __WIREPLUMBER_CORE_H__
|
|
|
|
|
#define __WIREPLUMBER_CORE_H__
|
|
|
|
|
|
|
|
|
|
#include <glib-object.h>
|
2019-11-13 15:44:23 +02:00
|
|
|
#include "object-manager.h"
|
2019-09-07 17:55:46 +03:00
|
|
|
#include "proxy.h"
|
2019-05-17 13:08:45 +03:00
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
2020-01-09 12:39:45 -05:00
|
|
|
struct pw_context;
|
2019-09-07 17:55:46 +03:00
|
|
|
|
2019-05-17 13:08:45 +03:00
|
|
|
#define WP_TYPE_CORE (wp_core_get_type ())
|
|
|
|
|
G_DECLARE_FINAL_TYPE (WpCore, wp_core, WP, CORE, GObject)
|
|
|
|
|
|
2020-01-09 12:39:45 -05:00
|
|
|
/* Basic */
|
2019-09-07 18:21:17 +03:00
|
|
|
WpCore * wp_core_new (GMainContext *context, WpProperties * properties);
|
2019-09-07 17:55:46 +03:00
|
|
|
GMainContext * wp_core_get_context (WpCore * self);
|
2020-01-09 12:39:45 -05:00
|
|
|
struct pw_context * wp_core_get_pw_context (WpCore * self);
|
|
|
|
|
|
|
|
|
|
/* Connection */
|
|
|
|
|
gboolean wp_core_connect (WpCore *self);
|
|
|
|
|
void wp_core_disconnect (WpCore *self);
|
|
|
|
|
gboolean wp_core_is_connected (WpCore * self);
|
|
|
|
|
|
|
|
|
|
/* Callback */
|
2019-12-12 20:07:46 +02:00
|
|
|
guint wp_core_idle_add (WpCore * self, GSourceFunc function, gpointer data,
|
|
|
|
|
GDestroyNotify destroy);
|
2019-12-06 08:43:40 -05:00
|
|
|
gboolean wp_core_sync (WpCore * self, GCancellable * cancellable,
|
2019-12-04 15:20:42 -05:00
|
|
|
GAsyncReadyCallback callback, gpointer user_data);
|
2019-09-07 17:55:46 +03:00
|
|
|
|
2020-01-09 12:39:45 -05:00
|
|
|
/* Object */
|
|
|
|
|
WpProxy * wp_core_export_object (WpCore * self, const gchar * interface_type,
|
2020-01-09 09:20:50 -05:00
|
|
|
gpointer local_object, WpProperties * properties);
|
2020-01-08 09:48:35 -05:00
|
|
|
WpProxy * wp_core_create_local_object (WpCore * self,
|
2020-01-09 12:39:45 -05:00
|
|
|
const gchar *factory_name, const gchar * interface_type,
|
2020-01-08 09:48:35 -05:00
|
|
|
guint32 interface_version, WpProperties * properties);
|
2019-09-07 17:55:46 +03:00
|
|
|
WpProxy * wp_core_create_remote_object (WpCore * self,
|
2020-01-09 12:39:45 -05:00
|
|
|
const gchar * factory_name, const gchar * interface_type,
|
2019-09-07 17:55:46 +03:00
|
|
|
guint32 interface_version, WpProperties * properties);
|
|
|
|
|
|
2020-01-09 12:39:45 -05:00
|
|
|
/* Object Manager */
|
2019-11-13 15:44:23 +02:00
|
|
|
void wp_core_install_object_manager (WpCore * self, WpObjectManager * om);
|
|
|
|
|
|
2019-05-17 13:08:45 +03:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
|
|
#endif
|