2019-04-03 18:31:05 +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-04-12 12:53:54 +03:00
|
|
|
*/
|
2019-04-03 18:31:05 +03:00
|
|
|
|
2020-05-11 15:45:09 +03:00
|
|
|
#ifndef __WIREPLUMBER_WP_H__
|
|
|
|
|
#define __WIREPLUMBER_WP_H__
|
|
|
|
|
|
2020-01-22 18:54:45 +02:00
|
|
|
#include "client.h"
|
2021-01-31 23:29:55 +02:00
|
|
|
#include "component-loader.h"
|
2019-05-17 13:08:45 +03:00
|
|
|
#include "core.h"
|
2020-01-22 18:54:45 +02:00
|
|
|
#include "device.h"
|
2019-12-09 16:35:15 +02:00
|
|
|
#include "endpoint.h"
|
2019-05-17 13:08:45 +03:00
|
|
|
#include "error.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-04-02 14:15:49 -04:00
|
|
|
#include "iterator.h"
|
2020-01-22 18:54:45 +02:00
|
|
|
#include "link.h"
|
2021-05-06 15:45:13 +03:00
|
|
|
#include "log.h"
|
2020-07-29 19:27:40 +05:30
|
|
|
#include "metadata.h"
|
2020-01-22 18:54:45 +02:00
|
|
|
#include "node.h"
|
2020-05-01 17:51:12 +03:00
|
|
|
#include "object-interest.h"
|
2019-11-13 15:44:23 +02:00
|
|
|
#include "object-manager.h"
|
2020-10-22 14:37:54 +03:00
|
|
|
#include "object.h"
|
2020-05-12 17:36:06 +03:00
|
|
|
#include "plugin.h"
|
2020-01-22 18:54:45 +02:00
|
|
|
#include "port.h"
|
2019-08-21 15:16:13 +03:00
|
|
|
#include "properties.h"
|
2019-06-10 15:07:54 -04:00
|
|
|
#include "proxy.h"
|
2020-10-23 18:22:33 +03:00
|
|
|
#include "proxy-interfaces.h"
|
2020-03-12 18:00:01 +02:00
|
|
|
#include "session-item.h"
|
2020-03-18 17:13:52 +02:00
|
|
|
#include "si-factory.h"
|
2020-04-14 15:17:01 +03:00
|
|
|
#include "si-interfaces.h"
|
2020-04-02 14:19:59 -04:00
|
|
|
#include "spa-pod.h"
|
2020-04-14 15:17:01 +03:00
|
|
|
#include "spa-type.h"
|
2020-10-14 14:36:12 -04:00
|
|
|
#include "state.h"
|
2020-03-10 13:41:34 +02:00
|
|
|
#include "transition.h"
|
2019-09-12 16:56:35 +03:00
|
|
|
#include "wpenums.h"
|
2020-06-02 18:26:40 +03:00
|
|
|
#include "wpversion.h"
|
2020-05-11 15:45:09 +03:00
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
2021-05-13 17:54:58 +03:00
|
|
|
/*!
|
|
|
|
|
* @memberof Wp
|
|
|
|
|
*
|
|
|
|
|
* @brief
|
|
|
|
|
* @arg WP_INIT_PIPEWIRE
|
|
|
|
|
* @arg WP_INIT_SPA_TYPES
|
|
|
|
|
* @arg WP_INIT_SET_PW_LOG
|
|
|
|
|
* @arg WP_INIT_SET_GLIB_LOG
|
|
|
|
|
* @arg WP_INIT_ALL
|
|
|
|
|
*/
|
2020-05-11 15:45:09 +03:00
|
|
|
typedef enum {
|
|
|
|
|
WP_INIT_PIPEWIRE = (1<<0),
|
|
|
|
|
WP_INIT_SPA_TYPES = (1<<1),
|
|
|
|
|
WP_INIT_SET_PW_LOG = (1<<2),
|
|
|
|
|
WP_INIT_SET_GLIB_LOG = (1<<3),
|
|
|
|
|
WP_INIT_ALL = 0xf,
|
|
|
|
|
} WpInitFlags;
|
|
|
|
|
|
|
|
|
|
WP_API
|
|
|
|
|
void wp_init (WpInitFlags flags);
|
|
|
|
|
|
2021-02-01 12:07:39 +02:00
|
|
|
WP_API
|
|
|
|
|
const gchar * wp_get_module_dir (void);
|
|
|
|
|
|
|
|
|
|
WP_API
|
|
|
|
|
const gchar * wp_get_config_dir (void);
|
|
|
|
|
|
2021-02-02 17:56:04 +02:00
|
|
|
WP_API
|
|
|
|
|
const gchar * wp_get_data_dir (void);
|
|
|
|
|
|
2020-05-11 15:45:09 +03:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
|
|
#endif
|