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_PORT_H
19 #define PULSE_PORT_H
20 
21 #include <glib.h>
22 #include <glib-object.h>
23 #include <libmatemixer/matemixer.h>
24 
25 #include "pulse-types.h"
26 
27 G_BEGIN_DECLS
28 
29 #define PULSE_TYPE_PORT                         \
30         (pulse_port_get_type ())
31 #define PULSE_PORT(o)                           \
32         (G_TYPE_CHECK_INSTANCE_CAST ((o), PULSE_TYPE_PORT, PulsePort))
33 #define PULSE_IS_PORT(o)                        \
34         (G_TYPE_CHECK_INSTANCE_TYPE ((o), PULSE_TYPE_PORT))
35 #define PULSE_PORT_CLASS(k)                     \
36         (G_TYPE_CHECK_CLASS_CAST ((k), PULSE_TYPE_PORT, PulsePortClass))
37 #define PULSE_IS_PORT_CLASS(k)                  \
38         (G_TYPE_CHECK_CLASS_TYPE ((k), PULSE_TYPE_PORT))
39 #define PULSE_PORT_GET_CLASS(o)                 \
40         (G_TYPE_INSTANCE_GET_CLASS ((o), PULSE_IS_PORT, PulsePortClass))
41 
42 typedef struct _PulsePortClass    PulsePortClass;
43 typedef struct _PulsePortPrivate  PulsePortPrivate;
44 
45 struct _PulsePort
46 {
47     MateMixerSwitchOption parent;
48 
49     /*< private >*/
50     PulsePortPrivate *priv;
51 };
52 
53 struct _PulsePortClass
54 {
55     MateMixerSwitchOptionClass parent;
56 };
57 
58 GType        pulse_port_get_type     (void) G_GNUC_CONST;
59 
60 PulsePort *  pulse_port_new          (const gchar *name,
61                                       const gchar *label,
62                                       const gchar *icon,
63                                       guint        priority);
64 
65 const gchar *pulse_port_get_name     (PulsePort   *port);
66 guint        pulse_port_get_priority (PulsePort   *port);
67 
68 G_END_DECLS
69 
70 #endif /* PULSE_PORT_H */
71