]> git.0d.be Git - empathy.git/blob - src/empathy-mic-monitor.h
Merge remote-tracking branch 'origin/gnome-3-8'
[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 <gio/gio.h>
23 #include <pulse/pulseaudio.h>
24
25 G_BEGIN_DECLS
26
27 #define EMPATHY_TYPE_MIC_MONITOR         (empathy_mic_monitor_get_type ())
28 #define EMPATHY_MIC_MONITOR(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_MIC_MONITOR, EmpathyMicMonitor))
29 #define EMPATHY_MIC_MONITOR_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), EMPATHY_TYPE_MIC_MONITOR, EmpathyMicMonitorClass))
30 #define EMPATHY_IS_MIC_MONITOR(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_MIC_MONITOR))
31 #define EMPATHY_IS_MIC_MONITOR_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_MIC_MONITOR))
32 #define EMPATHY_MIC_MONITOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_MIC_MONITOR, EmpathyMicMonitorClass))
33
34 typedef struct _EmpathyMicMonitor        EmpathyMicMonitor;
35 typedef struct _EmpathyMicMonitorPrivate EmpathyMicMonitorPrivate;
36 typedef struct _EmpathyMicMonitorClass   EmpathyMicMonitorClass;
37
38 struct _EmpathyMicMonitor
39 {
40   GObject parent;
41   EmpathyMicMonitorPrivate *priv;
42 };
43
44 struct _EmpathyMicMonitorClass
45 {
46   GObjectClass parent_class;
47 };
48
49 GType empathy_mic_monitor_get_type (void) G_GNUC_CONST;
50
51 EmpathyMicMonitor * empathy_mic_monitor_new (void);
52
53
54 typedef struct
55 {
56   guint index;
57   gchar *name;
58   gchar *description;
59   gboolean is_monitor;
60 } EmpathyMicrophone;
61
62 void empathy_mic_monitor_list_microphones_async (EmpathyMicMonitor *monitor,
63     GAsyncReadyCallback callback, gpointer user_data);
64 const GList * empathy_mic_monitor_list_microphones_finish (EmpathyMicMonitor *monitor,
65     GAsyncResult *result, GError **error);
66
67 void empathy_mic_monitor_change_microphone_async (EmpathyMicMonitor *monitor,
68     guint source_output_idx, guint source_idx, GAsyncReadyCallback callback, gpointer user_data);
69 gboolean empathy_mic_monitor_change_microphone_finish (EmpathyMicMonitor *monitor,
70     GAsyncResult *result, GError **error);
71
72 void empathy_mic_monitor_get_current_mic_async (EmpathyMicMonitor *self,
73     guint source_output_idx, GAsyncReadyCallback callback, gpointer user_data);
74 guint empathy_mic_monitor_get_current_mic_finish (EmpathyMicMonitor *self,
75     GAsyncResult *result, GError **error);
76
77 void empathy_mic_monitor_get_default_async (EmpathyMicMonitor *self,
78     GAsyncReadyCallback callback, gpointer user_data);
79 const gchar * empathy_mic_monitor_get_default_finish (EmpathyMicMonitor *self,
80     GAsyncResult *result, GError **error);
81
82 void empathy_mic_monitor_set_default_async (EmpathyMicMonitor *self,
83     const gchar *name, GAsyncReadyCallback callback, gpointer user_data);
84 gboolean empathy_mic_monitor_set_default_finish (EmpathyMicMonitor *self,
85     GAsyncResult *result, GError **error);
86
87 G_END_DECLS
88
89 #endif /* __EMPATHY_MIC_MONITOR_H__ */