Newer
Older
/* WirePlumber
*
* Copyright © 2019 Collabora Ltd.
* @author George Kiagiadakis <george.kiagiadakis@collabora.com>
*
*/
#ifndef __WIREPLUMBER_CORE_H__
#define __WIREPLUMBER_CORE_H__
#include <gio/gio.h>
#include "defs.h"
#include "properties.h"
typedef struct _WpObjectManager WpObjectManager;
G_DECLARE_FINAL_TYPE (WpCore, wp_core, WP, CORE, GObject)

George Kiagiadakis
committed
WpCore * wp_core_new (GMainContext *context, WpProperties * properties);
WP_API
WpCore * wp_core_clone (WpCore * self);
GMainContext * wp_core_get_g_main_context (WpCore * self);
struct pw_context * wp_core_get_pw_context (WpCore * self);
WP_API
struct pw_core * wp_core_get_pw_core (WpCore * self);
gboolean wp_core_connect (WpCore *self);
void wp_core_disconnect (WpCore *self);
gboolean wp_core_is_connected (WpCore * self);

George Kiagiadakis
committed
/* Properties */
WP_API
guint32 wp_core_get_remote_cookie (WpCore * self);
WP_API
const gchar * wp_core_get_remote_name (WpCore * self);
WP_API
const gchar * wp_core_get_remote_user_name (WpCore * self);
WP_API
const gchar * wp_core_get_remote_host_name (WpCore * self);
WP_API
const gchar * wp_core_get_remote_version (WpCore * self);
WP_API
WpProperties * wp_core_get_remote_properties (WpCore * self);
WP_API
WpProperties * wp_core_get_properties (WpCore * self);
WP_API
void wp_core_update_properties (WpCore * self, WpProperties * updates);
void wp_core_idle_add (WpCore * self, GSource **source, GSourceFunc function,
gpointer data, GDestroyNotify destroy);
void wp_core_idle_add_closure (WpCore * self, GSource **source,
GClosure * closure);
WP_API
void wp_core_timeout_add (WpCore * self, GSource **source, guint timeout_ms,
GSourceFunc function, gpointer data, GDestroyNotify destroy);
WP_API
void wp_core_timeout_add_closure (WpCore * self, GSource **source,
guint timeout_ms, GClosure * closure);
gboolean wp_core_sync (WpCore * self, GCancellable * cancellable,
WP_API
gboolean wp_core_sync_finish (WpCore * self, GAsyncResult * res,
GError ** error);
WP_API
void wp_core_install_object_manager (WpCore * self, WpObjectManager * om);