Commit graph

7 commits

Author SHA1 Message Date
Julian Bouzas
dc2ad1f25d rename all foo_iterate APIs to foo_new_iterator
Avoids confusion with LUA iterate API
2021-02-05 11:33:23 -05:00
Julian Bouzas
f01dd10aaf metadata: refactor API to quickly find a specific value 2021-01-11 13:11:37 -05:00
George Kiagiadakis
2f3f5f8e66 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-13 19:54:48 +02:00
George Kiagiadakis
fb8d4b1b1f metadata: remove WP_METADATA_FEATURES_STANDARD and fix copyright years 2020-08-31 16:22:11 +03:00
George Kiagiadakis
3f160b552c metadata: improve implementation
* Implement the proxy properly with info caching, methods, etc
* Get rid of useless variables and includes
2020-08-31 16:14:47 +03:00
George Kiagiadakis
3e65325519 metadata: fix more coding style issues 2020-07-31 17:46:09 +03:00
raghu447
65b4562fa0 Implement PW_TYPE_INTERFACE_Metadata 2020-07-30 21:30:14 +05:30