2020-01-22 18:54:45 +02:00
|
|
|
/* WirePlumber
|
|
|
|
|
*
|
|
|
|
|
* Copyright © 2019 Collabora Ltd.
|
|
|
|
|
* @author George Kiagiadakis <george.kiagiadakis@collabora.com>
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef __WIREPLUMBER_CLIENT_H__
|
|
|
|
|
#define __WIREPLUMBER_CLIENT_H__
|
|
|
|
|
|
lib: refactor WpProxy
This is an attempt to unclutter the API of WpProxy and
split functionality into smaller pieces, making it easier
to work with.
In this new class layout, we have the following classes:
- WpObject: base class for everything; handles activating
| and deactivating "features"
|- WpProxy: base class for anything that wraps a pw_proxy;
| handles events from pw_proxy and nothing more
|- WpGlobalProxy: handles integration with the registry
All the other classes derive from WpGlobalProxy. The reason
for separating WpGlobalProxy from WpProxy, though, is that
classes such as WpImplNode / WpSpaDevice can also derive from
WpProxy now, without interfacing with the registry.
All objects that come with an "info" structure and have properties
and/or params also implement the WpPipewireObject interface. This
provides the API to query properties and get/set params. Essentially,
this is implemented by all classes except WpMetadata (pw_metadata
does not have info)
This interface is implemented on each object separately, using
a private "mixin", which is a set of vfunc implementations and helper
functions (and macros) to facilitate the implementation of this interface.
A notable difference to the old WpProxy is that now features can be
deactivated, so it is possible to enable something and later disable
it again.
This commit disables modules, tests, tools, etc, to avoid growing the
patch more, while ensuring that the project compiles.
2020-11-10 19:17:02 +02:00
|
|
|
#include "global-proxy.h"
|
2020-01-22 18:54:45 +02:00
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
|
|
struct pw_permission;
|
|
|
|
|
|
2021-05-13 17:54:58 +03:00
|
|
|
/*!
|
2021-05-21 18:40:43 +03:00
|
|
|
* \brief The WpClient GType
|
|
|
|
|
* \ingroup wpclient
|
2020-02-17 15:39:19 +02:00
|
|
|
*/
|
2020-01-22 18:54:45 +02:00
|
|
|
#define WP_TYPE_CLIENT (wp_client_get_type ())
|
|
|
|
|
WP_API
|
lib: refactor WpProxy
This is an attempt to unclutter the API of WpProxy and
split functionality into smaller pieces, making it easier
to work with.
In this new class layout, we have the following classes:
- WpObject: base class for everything; handles activating
| and deactivating "features"
|- WpProxy: base class for anything that wraps a pw_proxy;
| handles events from pw_proxy and nothing more
|- WpGlobalProxy: handles integration with the registry
All the other classes derive from WpGlobalProxy. The reason
for separating WpGlobalProxy from WpProxy, though, is that
classes such as WpImplNode / WpSpaDevice can also derive from
WpProxy now, without interfacing with the registry.
All objects that come with an "info" structure and have properties
and/or params also implement the WpPipewireObject interface. This
provides the API to query properties and get/set params. Essentially,
this is implemented by all classes except WpMetadata (pw_metadata
does not have info)
This interface is implemented on each object separately, using
a private "mixin", which is a set of vfunc implementations and helper
functions (and macros) to facilitate the implementation of this interface.
A notable difference to the old WpProxy is that now features can be
deactivated, so it is possible to enable something and later disable
it again.
This commit disables modules, tests, tools, etc, to avoid growing the
patch more, while ensuring that the project compiles.
2020-11-10 19:17:02 +02:00
|
|
|
G_DECLARE_FINAL_TYPE (WpClient, wp_client, WP, CLIENT, WpGlobalProxy)
|
2020-01-22 18:54:45 +02:00
|
|
|
|
2021-10-13 11:09:11 +03:00
|
|
|
WP_API
|
|
|
|
|
void wp_client_send_error (WpClient * self, guint32 id, int res,
|
|
|
|
|
const gchar * message);
|
|
|
|
|
|
2020-01-22 18:54:45 +02:00
|
|
|
WP_API
|
|
|
|
|
void wp_client_update_permissions (WpClient * self, guint n_perm, ...);
|
|
|
|
|
|
|
|
|
|
WP_API
|
|
|
|
|
void wp_client_update_permissions_array (WpClient * self,
|
|
|
|
|
guint n_perm, const struct pw_permission *permissions);
|
|
|
|
|
|
2023-10-14 19:50:54 +03:00
|
|
|
WP_API
|
|
|
|
|
void wp_client_update_properties (WpClient * self, WpProperties * updates);
|
|
|
|
|
|
2020-01-22 18:54:45 +02:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
|
|
#endif
|