]> git.0d.be Git - empathy.git/blob - src/empathy-mic-monitor.h
Reorder header inclusions accordingly to the Telepathy coding style
[empathy.git] / src / empathy-mic-monitor.h
1 /*
2  * Copyright (C) 2011 Collabora Ltd.
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.1 of the License, 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, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17  */
18
19 #ifndef __EMPATHY_MIC_MONITOR_H__
20 #define __EMPATHY_MIC_MONITOR_H__
21
22 #include <glib-object.h>
23 #include <gio/gio.h>
24 #include <pulse/pulseaudio.h>
25
26 G_BEGIN_DECLS
27
28 #define EMPATHY_TYPE_MIC_MONITOR         (empathy_mic_monitor_get_type ())
29 #define EMPATHY_MIC_MONITOR(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_MIC_MONITOR, EmpathyMicMonitor))
30 #define EMPATHY_MIC_MONITOR_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), EMPATHY_TYPE_MIC_MONITOR, EmpathyMicMonitorClass))
31 #define EMPATHY_IS_MIC_MONITOR(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_MIC_MONITOR))
32 #define EMPATHY_IS_MIC_MONITOR_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_MIC_MONITOR))
33 #define EMPATHY_MIC_MONITOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_MIC_MONITOR, EmpathyMicMonitorClass))
34
35 typedef struct _EmpathyMicMonitor        EmpathyMicMonitor;
36 typedef struct _EmpathyMicMonitorPrivate EmpathyMicMonitorPrivate;
37 typedef struct _EmpathyMicMonitorClass   EmpathyMicMonitorClass;
38
39 struct _EmpathyMicMonitor
40 {
41   GObject parent;
42   EmpathyMicMonitorPrivate *priv;
43 };
44
45 struct _EmpathyMicMonitorClass
46 {
47   GObjectClass parent_class;
48 };
49
50 GType empathy_mic_monitor_get_type (void) G_GNUC_CONST;
51
52 EmpathyMicMonitor * empathy_mic_monitor_new (void);
53
54
55 typedef struct
56 {
57   guint index;
58   gchar *name;
59   gchar *description;
60   gboolean is_monitor;
61 } EmpathyMicrophone;
62
63 void empathy_mic_monitor_list_microphones_async (EmpathyMicMonitor *monitor,
64     GAsyncReadyCallback callback, gpointer user_data);
65 const GList * empathy_mic_monitor_list_microphones_finish (EmpathyMicMonitor *monitor,
66     GAsyncResult *result, GError **error);
67
68 void empathy_mic_monitor_change_microphone_async (EmpathyMicMonitor *monitor,
69     guint source_output_idx, guint source_idx, GAsyncReadyCallback callback, gpointer user_data);
70 gboolean empathy_mic_monitor_change_microphone_finish (EmpathyMicMonitor *monitor,
71     GAsyncResult *result, GError **error);
72
73 void empathy_mic_monitor_get_current_mic_async (EmpathyMicMonitor *self,
74     guint source_output_idx, GAsyncReadyCallback callback, gpointer user_data);
75 guint empathy_mic_monitor_get_current_mic_finish (EmpathyMicMonitor *self,
76     GAsyncResult *result, GError **error);
77
78 void empathy_mic_monitor_get_default_async (EmpathyMicMonitor *self,
79     GAsyncReadyCallback callback, gpointer user_data);
80 const gchar * empathy_mic_monitor_get_default_finish (EmpathyMicMonitor *self,
81     GAsyncResult *result, GError **error);
82
83 void empathy_mic_monitor_set_default_async (EmpathyMicMonitor *self,
84     const gchar *name, GAsyncReadyCallback callback, gpointer user_data);
85 gboolean empathy_mic_monitor_set_default_finish (EmpathyMicMonitor *self,
86     GAsyncResult *result, GError **error);
87
88 G_END_DECLS
89
90 #endif /* __EMPATHY_MIC_MONITOR_H__ */