Commit Graph

8 Commits

Author SHA1 Message Date
George Kiagiadakis
d4973363ac lib: add extensive API documentation 2020-02-19 10:43:07 +02:00
George Kiagiadakis
efb33ddd1b lib: introduce export macros and hide all private symbols 2020-01-16 18:50:07 +02:00
Julian Bouzas
5348239ccb policy: add _get_session API for the policy manager 2019-12-16 13:37:05 -05:00
George Kiagiadakis
c0455c981d lib: rename WpEndpoint* to WpBaseEndpoint*
to avoid name clashing with the upcoming WpEndpoint interface
that is going to be the common interface of Wp{Proxy,Exported}Endpoint
2019-12-11 19:05:05 +02:00
Julian Bouzas
b2c4162c2f policy: remove unneeded handle_endpoint callback 2019-12-04 16:38:35 -05:00
George Kiagiadakis
e7e5c66853 lib: introduce WpObjectManager
* rework how global objects are stored in the core
* rework how users get notified about global objects
  and proxies of remote global objects

The purpose of this change is to have a class that can manage
objects that are registered in the core or signalled through the
registry. This object can declare interest on certain types
of global objects and only keep & signal those objects that it is
interested in. Additionally, it can prepare proxy features and
asynchronously deliver an 'objects-changed' signal, which is
basically telling us that the list of objects has changed.

This is useful to simplify port proxies management in WpAudioStream.
Now the stream object can declare that it is interested in ports
that have "node.id" == X and the object manager will only maintain
a list of those. Additionally, it will emit the 'objects-changed'
signal when the list of ports is complete, so there is no reason to
do complex operations and core syncs in the WpAudioStream class
in order to figure out when the list of ports is ready.

As a side effect, this also reduces resource management. Now we
don't construct a WpProxy for every global that pipewire reports;
we only construct proxies when there is interest in them!

Another interesting side effect is that we can now register an
object manager at any point in time and get immediately notified
about remote globals that already exist. i.e. when you register
an object manager that is interested in nodes, it will be immediately
notified about all the existing nodes in the graph. This is useful
to avoid race conditions between connecting the signal and objects
beting created in pipewire
2019-11-13 15:49:39 +02:00
George Kiagiadakis
5a863fe50c WpPolicy: add a way of signaling policy changes
This can be used by code that depends on policy to re-evaluate
choices they have made in the past that could now change based
on the new policy.
2019-06-14 15:29:57 +03:00
George Kiagiadakis
25d70c5446 lib: add new WpPolicy class and basic policy management functionality 2019-06-13 14:51:20 +03:00