When both node and port are given, check that the port belongs to the
node. If it doesn't, it could be that we found a Port using the
object.id but we should have used the port.id of the node.
Make an option to allow link.passive properties and set it to false by
default.
This effectively ignores the link.passive properties from the session
manager, jack clients and pw-link when set. This is a good idea because
the logic for making passive links is better handled in the core.
Just like the real free() we should just ignore a NULL pointer, makes the
caller code easier for those instances where properties are optional.
Patch generated with concinelle with a few manual fixes.
Make it possible to use object.id, node.name, node.nick,
node.description and object.path to select nodes and object.id,
port.name, port.alias and object.path to select ports when linking.
This makes it possible to use pw-cli creat-link to make nodes
without having to deal with the ids.
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.
Send create_object error messages to the new resource id so that
the client can better know what proxy is failing.
Use resource_remove when create_object fails because the core will
already send a remove_id on failure.
Try to send other errors to the proxy that made the request if
possible.
Sending the errors to the proxy id allows the client to know something
is wrong with the proxy and deal with it better.
Use the port global id in the error message.
Log an error when we send an error to the client so that we don't need
to log and error anymore.
Improve the error messages when we can
Move some warnings and errors to debug
This is more in line with wayland and it allows us to create new
interfaces in modules without having to add anything to the type
enum. It also removes some lookups to map type_id to readable
name in debug.
The proxy API is the one that we would like to expose for applications
and the other API is used internally when implementing modules or
factories.
The current pw_core object is really a context for all objects so
name it that way. It also makes it possible to rename pw_core_proxy
to pw_proxy later.
Bind to the resource in create_object before we register the global.
This ensure a client gets to see the resource global id associated
with the resource before it appears in the registry, which makes it
easier to patch the local proxy to the global object.
Remove the parent_id from the global event. Remove the parent
and owner from the global object.
Use properties instead to mark parents and owners of objects.
Properties are easier to control for client exported objects and
usually a simple parent/child is not enough. For example, a client
exported node has the client as a parent but also the factory that
created the node.