1 #ifndef foocoremessageshfoo
2 #define foocoremessageshfoo
5 This file is part of PulseAudio.
7 PulseAudio is free software; you can redistribute it and/or modify
8 it under the terms of the GNU Lesser General Public License as published
9 by the Free Software Foundation; either version 2.1 of the License,
10 or (at your option) any later version.
12 PulseAudio is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 General Public License for more details.
17 You should have received a copy of the GNU Lesser General Public License
18 along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
21 #include <pulsecore/core.h>
22 #include <pulsecore/json.h>
24 /* Message handler types and functions */
26 /* Prototype for message callback */
27 typedef int (*pa_message_handler_cb_t)(
28 const char *object_path,
30 const pa_json_object *parameters,
34 /* Message handler object */
35 struct pa_message_handler {
38 pa_message_handler_cb_t callback;
42 /* Handler registration */
43 void pa_message_handler_register(pa_core *c, const char *object_path, const char *description, pa_message_handler_cb_t cb, void *userdata);
44 void pa_message_handler_unregister(pa_core *c, const char *object_path);
46 /* Send message to the specified object path */
47 int pa_message_handler_send_message(pa_core *c, const char *object_path, const char *message, const char *message_parameters, char **response);
49 /* Set handler description */
50 int pa_message_handler_set_description(pa_core *c, const char *object_path, const char *description);