sink-input: adjust log level of empty-pop operations
[platform/upstream/pulseaudio.git] / src / pulsecore / message-handler.h
1 #ifndef foocoremessageshfoo
2 #define foocoremessageshfoo
3
4 /***
5   This file is part of PulseAudio.
6
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.
11
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.
16
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/>.
19 ***/
20
21 #include <pulsecore/core.h>
22 #include <pulsecore/json.h>
23
24 /* Message handler types and functions */
25
26 /* Prototype for message callback */
27 typedef int (*pa_message_handler_cb_t)(
28         const char *object_path,
29         const char *message,
30         const pa_json_object *parameters,
31         char **response,
32         void *userdata);
33
34 /* Message handler object */
35 struct pa_message_handler {
36     char *object_path;
37     char *description;
38     pa_message_handler_cb_t callback;
39     void *userdata;
40 };
41
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);
45
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);
48
49 /* Set handler description */
50 int pa_message_handler_set_description(pa_core *c, const char *object_path, const char *description);
51 #endif