2019-06-10 15:07:54 -04:00
|
|
|
/* WirePlumber
|
|
|
|
|
*
|
|
|
|
|
* Copyright © 2019 Collabora Ltd.
|
|
|
|
|
* @author Julian Bouzas <julian.bouzas@collabora.com>
|
2019-08-22 20:04:39 +03:00
|
|
|
* @author George Kiagiadakis <george.kiagiadakis@collabora.com>
|
2019-06-10 15:07:54 -04:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef __WIREPLUMBER_PROXY_H__
|
|
|
|
|
#define __WIREPLUMBER_PROXY_H__
|
|
|
|
|
|
|
|
|
|
#include <gio/gio.h>
|
|
|
|
|
|
2019-08-22 20:04:39 +03:00
|
|
|
#include "properties.h"
|
2019-06-10 15:07:54 -04:00
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
2019-08-22 20:04:39 +03:00
|
|
|
struct pw_proxy;
|
2019-09-07 17:55:46 +03:00
|
|
|
typedef struct _WpCore WpCore;
|
2019-08-22 20:04:39 +03:00
|
|
|
|
|
|
|
|
typedef enum { /*< flags >*/
|
2019-08-27 17:33:25 +03:00
|
|
|
WP_PROXY_FEATURE_PW_PROXY = (1 << 0),
|
2019-08-22 20:04:39 +03:00
|
|
|
WP_PROXY_FEATURE_INFO = (1 << 1),
|
|
|
|
|
|
|
|
|
|
WP_PROXY_FEATURE_LAST = (1 << 5), /*< skip >*/
|
|
|
|
|
} WpProxyFeatures;
|
|
|
|
|
|
2019-06-10 15:07:54 -04:00
|
|
|
#define WP_TYPE_PROXY (wp_proxy_get_type ())
|
2020-01-16 18:50:07 +02:00
|
|
|
WP_API
|
2019-06-10 15:07:54 -04:00
|
|
|
G_DECLARE_DERIVABLE_TYPE (WpProxy, wp_proxy, WP, PROXY, GObject)
|
|
|
|
|
|
|
|
|
|
/* The proxy base class */
|
|
|
|
|
struct _WpProxyClass
|
|
|
|
|
{
|
|
|
|
|
GObjectClass parent_class;
|
2019-06-18 10:09:40 -04:00
|
|
|
|
2019-08-22 20:04:39 +03:00
|
|
|
void (*augment) (WpProxy *self, WpProxyFeatures features);
|
2019-07-11 12:06:04 -04:00
|
|
|
|
2019-08-22 20:04:39 +03:00
|
|
|
void (*pw_proxy_created) (WpProxy * self, struct pw_proxy * proxy);
|
|
|
|
|
void (*pw_proxy_destroyed) (WpProxy * self);
|
2019-06-10 15:07:54 -04:00
|
|
|
};
|
|
|
|
|
|
2020-01-16 18:50:07 +02:00
|
|
|
WP_API
|
2020-01-09 13:45:06 -05:00
|
|
|
WpProxy * wp_proxy_new_wrap (WpCore * core, struct pw_proxy * proxy,
|
2020-01-09 12:39:45 -05:00
|
|
|
const char *type, guint32 version, gpointer local_object);
|
2019-08-22 20:04:39 +03:00
|
|
|
|
2020-01-16 18:50:07 +02:00
|
|
|
WP_API
|
2019-08-22 20:04:39 +03:00
|
|
|
void wp_proxy_augment (WpProxy *self,
|
|
|
|
|
WpProxyFeatures wanted_features, GCancellable * cancellable,
|
|
|
|
|
GAsyncReadyCallback callback, gpointer user_data);
|
2020-01-16 18:50:07 +02:00
|
|
|
|
|
|
|
|
WP_API
|
2019-08-22 20:04:39 +03:00
|
|
|
gboolean wp_proxy_augment_finish (WpProxy * self, GAsyncResult * res,
|
|
|
|
|
GError ** error);
|
|
|
|
|
|
2020-01-16 18:50:07 +02:00
|
|
|
WP_API
|
2019-08-22 20:04:39 +03:00
|
|
|
WpProxyFeatures wp_proxy_get_features (WpProxy * self);
|
|
|
|
|
|
2020-01-16 18:50:07 +02:00
|
|
|
WP_API
|
2019-09-07 17:55:46 +03:00
|
|
|
WpCore * wp_proxy_get_core (WpProxy * self);
|
2019-08-22 20:04:39 +03:00
|
|
|
|
2020-01-16 18:50:07 +02:00
|
|
|
WP_API
|
2019-08-22 20:04:39 +03:00
|
|
|
gboolean wp_proxy_is_global (WpProxy * self);
|
2020-01-16 18:50:07 +02:00
|
|
|
|
|
|
|
|
WP_API
|
2019-08-22 20:04:39 +03:00
|
|
|
guint32 wp_proxy_get_global_id (WpProxy * self);
|
2020-01-16 18:50:07 +02:00
|
|
|
|
|
|
|
|
WP_API
|
2019-08-22 20:04:39 +03:00
|
|
|
guint32 wp_proxy_get_global_permissions (WpProxy * self);
|
2020-01-16 18:50:07 +02:00
|
|
|
|
|
|
|
|
WP_API
|
2019-08-22 20:04:39 +03:00
|
|
|
WpProperties * wp_proxy_get_global_properties (WpProxy * self);
|
|
|
|
|
|
2020-01-16 18:50:07 +02:00
|
|
|
WP_API
|
2020-01-09 12:39:45 -05:00
|
|
|
const char * wp_proxy_get_interface_type (WpProxy * self);
|
2020-01-16 18:50:07 +02:00
|
|
|
|
|
|
|
|
WP_API
|
2019-08-22 20:04:39 +03:00
|
|
|
guint32 wp_proxy_get_interface_version (WpProxy * self);
|
|
|
|
|
|
2020-01-16 18:50:07 +02:00
|
|
|
WP_API
|
2019-08-22 20:04:39 +03:00
|
|
|
struct pw_proxy * wp_proxy_get_pw_proxy (WpProxy * self);
|
|
|
|
|
|
2019-06-10 15:07:54 -04:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
|
|
#endif
|