1 /*
2  * Copyright (C) 2014 Michal Ratajsky <michal.ratajsky@gmail.com>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the licence, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef PULSE_MONITOR_H
19 #define PULSE_MONITOR_H
20 
21 #include <glib.h>
22 #include <glib-object.h>
23 
24 #include <pulse/pulseaudio.h>
25 
26 #include "pulse-types.h"
27 
28 G_BEGIN_DECLS
29 
30 #define PULSE_TYPE_MONITOR                      \
31         (pulse_monitor_get_type ())
32 #define PULSE_MONITOR(o)                        \
33         (G_TYPE_CHECK_INSTANCE_CAST ((o), PULSE_TYPE_MONITOR, PulseMonitor))
34 #define PULSE_IS_MONITOR(o)                     \
35         (G_TYPE_CHECK_INSTANCE_TYPE ((o), PULSE_TYPE_MONITOR))
36 #define PULSE_MONITOR_CLASS(k)                  \
37         (G_TYPE_CHECK_CLASS_CAST ((k), PULSE_TYPE_MONITOR, PulseMonitorClass))
38 #define PULSE_IS_MONITOR_CLASS(k)               \
39         (G_TYPE_CHECK_CLASS_TYPE ((k), PULSE_TYPE_MONITOR))
40 #define PULSE_MONITOR_GET_CLASS(o)              \
41         (G_TYPE_INSTANCE_GET_CLASS ((o), PULSE_TYPE_MONITOR, PulseMonitorClass))
42 
43 typedef struct _PulseMonitorClass    PulseMonitorClass;
44 typedef struct _PulseMonitorPrivate  PulseMonitorPrivate;
45 
46 struct _PulseMonitor
47 {
48     GObject parent;
49 
50     /*< private >*/
51     PulseMonitorPrivate *priv;
52 };
53 
54 struct _PulseMonitorClass
55 {
56     GObjectClass parent_class;
57 
58     /*< private >*/
59     void (*value) (PulseMonitor *monitor,
60                    gdouble       value);
61 };
62 
63 GType         pulse_monitor_get_type     (void) G_GNUC_CONST;
64 
65 PulseMonitor *pulse_monitor_new          (pa_context   *context,
66                                           pa_proplist  *proplist,
67                                           guint32       index_source,
68                                           guint32       index_sink_input);
69 
70 gboolean      pulse_monitor_get_enabled  (PulseMonitor *monitor);
71 gboolean      pulse_monitor_set_enabled  (PulseMonitor *monitor,
72                                           gboolean      enabled);
73 
74 G_END_DECLS
75 
76 #endif /* PULSE_MONITOR_H */
77