core: add message handler
authorGeorg Chini <georg@chini.tk>
Tue, 14 Jan 2020 10:00:20 +0000 (11:00 +0100)
committerTanu Kaskinen <tanuk@iki.fi>
Thu, 3 Dec 2020 14:41:39 +0000 (14:41 +0000)
commit5c0ab5214574ce4d5e0d4c1751bf580e464cb0e2
tree5a56ae5f22187ac9a3770820508b18b1743c9fa7
parent68f2f1395d635576dae2a8aff34d38f06511d153
core: add message handler

This patch adds a small message handler to the core which enables
clients to list available handlers via the list-handlers message.
Command: pacmd send-message /core list-handlers
pactl can be used with the same parameters.

The patch also introduces a convention for the return string.
It consists of a list of elements where curly braces are used
to separate elements. Each element can itself contain further
elements. For example consider a message that returns multiple
elements which each contain an integer and an array of float.
A response string would look like that:
{{Integer} {{1st float} {2nd float} ...}}{...}

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/51>
doc/messaging_api.txt
src/pulsecore/core.c
src/pulsecore/message-handler.c