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
|
|
|
|
|
|
2019-09-07 17:55:46 +03:00
|
|
|
struct pw_core;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* WpRemoteState:
|
|
|
|
|
* @WP_REMOTE_STATE_ERROR: remote is in error
|
|
|
|
|
* @WP_REMOTE_STATE_UNCONNECTED: not connected
|
|
|
|
|
* @WP_REMOTE_STATE_CONNECTING: connecting to remote service
|
|
|
|
|
* @WP_REMOTE_STATE_CONNECTED: remote is connected and ready
|
|
|
|
|
*
|
|
|
|
|
* The different states the remote can be
|
|
|
|
|
*/
|
|
|
|
|
typedef enum {
|
|
|
|
|
WP_REMOTE_STATE_ERROR = -1,
|
|
|
|
|
WP_REMOTE_STATE_UNCONNECTED = 0,
|
|
|
|
|
WP_REMOTE_STATE_CONNECTING = 1,
|
|
|
|
|
WP_REMOTE_STATE_CONNECTED = 2,
|
|
|
|
|
} WpRemoteState;
|
|
|
|
|
|
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)
|
|
|
|
|
|
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);
|
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
|
|
|
struct pw_core * wp_core_get_pw_core (WpCore * self);
|
|
|
|
|
|
|
|
|
|
gboolean wp_core_connect (WpCore * self);
|
|
|
|
|
WpRemoteState wp_core_get_remote_state (WpCore * self, const gchar ** error);
|
|
|
|
|
|
2020-01-09 09:20:50 -05:00
|
|
|
WpProxy * wp_core_export_object (WpCore * self, guint32 interface_type,
|
|
|
|
|
gpointer local_object, WpProperties * properties);
|
2020-01-08 09:48:35 -05:00
|
|
|
WpProxy * wp_core_create_local_object (WpCore * self,
|
|
|
|
|
const gchar *factory_name, guint32 interface_type,
|
|
|
|
|
guint32 interface_version, WpProperties * properties);
|
2019-09-07 17:55:46 +03:00
|
|
|
WpProxy * wp_core_create_remote_object (WpCore * self,
|
|
|
|
|
const gchar * factory_name, guint32 interface_type,
|
|
|
|
|
guint32 interface_version, WpProperties * properties);
|
|
|
|
|
|
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
|