Send server change events to subscribers, when default nodes change due
to some nodes being added/removed/changed, also if there is no metadata
change. Make sure the event is consistent with the result from
find_device at the time.
Previously, these were not necessarily sent, or information from
find_device immediately after the event might not reflect the change
yet.
Pulseaudio unsets the preferred sink/source when stream is moved to a
default target. Emulate this behavior by setting + unsetting
target.node, which informs policy-node to move it accordingly.
Collect all object updates in a separate list. When we collected
all updates in sync, apply them and then signal notifications.
This ensure we have a consistent object model.
Don't wait for sync but immediately emit the added event for metadata.
This way the server can get the name and handle the metadata events
immediately.
When the Route param changes on the card, find the associated
device and mark it as modified. Fixes volume changes in gnome-shell
and pavucontrol.
See #377
See #298
Remove the hooks we installed on objects in the destroy/free event
or before calling _destroy. This is not really needed but it is
a nice thing to do because it calls the hook removed callbacks.
We don't need to bind to the core object again, we can just use the
events on the manager core.
We don't actually have info when the Core is added so don't try to
use it to get defaults for the client.
Use the manager core info in server info.