[pulseaudio-discuss] [PATCH 3/5] pactl, pacmd, cli-command: Add send-message command

Tanu Kaskinen tanuk at iki.fi
Thu Jan 18 20:26:37 UTC 2018


On Thu, 2018-01-18 at 13:22 +0100, Georg Chini wrote:
> On 09.01.2018 20:30, Tanu Kaskinen wrote:
> > On Sun, 2017-10-29 at 20:51 +0100, Georg Chini wrote:
> > > ---
> > >   doc/messaging_api.txt            | 16 ++++++++++++++
> > >   man/pactl.1.xml.in               |  7 ++++++
> > >   man/pulse-cli-syntax.5.xml.in    |  7 ++++++
> > >   shell-completion/bash/pulseaudio |  5 +++--
> > >   shell-completion/zsh/_pulseaudio |  2 ++
> > >   src/pulsecore/cli-command.c      | 44 ++++++++++++++++++++++++++++++++++++++
> > >   src/utils/pacmd.c                |  1 +
> > >   src/utils/pactl.c                | 46 +++++++++++++++++++++++++++++++++++++++-
> > >   8 files changed, 125 insertions(+), 3 deletions(-)
> > >   create mode 100644 doc/messaging_api.txt
> > > 
> > > diff --git a/doc/messaging_api.txt b/doc/messaging_api.txt
> > > new file mode 100644
> > > index 00000000..11835cda
> > > --- /dev/null
> > > +++ b/doc/messaging_api.txt
> > > @@ -0,0 +1,16 @@
> > > +Message API reference
> > > +
> > > +The message API allows any object within pulseaudio to register a message
> > > +handler. A message handler is a function that can be called by clients using
> > > +PA_COMMAND_SEND_OBJECT_MESSAGE. A message consists at least of a recipient
> > > +and a message command, both specified as strings. Additional parameters can
> > > +be specified using a single string, but are not mandatory. The message handler
> > > +returns an error number as defined in def.h and may also return a string in
> > > +the "response" variable. If "response" is NULL, this should be treated like
> > > +an empty string. The following reference lists available messages, their
> > > +parameters and return values.
> > > +
> > > +Recipient:
> > > +Message:
> > > +Parameters:
> > > +Return value:
> > > diff --git a/man/pactl.1.xml.in b/man/pactl.1.xml.in
> > > index 39569b6b..9669aca9 100644
> > > --- a/man/pactl.1.xml.in
> > > +++ b/man/pactl.1.xml.in
> > > @@ -245,6 +245,13 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
> > >         'ac3-iec61937, format.rate = "[ 32000, 44100, 48000 ]"').
> > >         </p></optdesc> </option>
> > >   
> > > +    <option>
> > > +      <p><opt>send-message</opt> <arg>RECIPIENT</arg> <arg>MESSAGE</arg> <arg>MESSAGE_PARAMETERS</arg></p>
> > > +      <optdesc><p>Send a message string to the specified recipient object. If applicable an additional string containing
> > > +      message parameters can be specified. A string is returned as a response to the message. For available message
> > > +      commands see doc/messaging_api.txt.</p></optdesc>
> > 
> > Instead of just "doc/messaging_api.txt", the man page should provide a
> > link to the file.
> > 
> 
> Where should the link point to? 
> https://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/doc/messaging_api.txt?

Yes.

-- 
Tanu

https://liberapay.com/tanuk
https://www.patreon.com/tanuk


More information about the pulseaudio-discuss mailing list