hindi update
[empathy-mirror.git] / src / empathy-mic-monitor.h
blob4ad4a28faac831d0ab3bfd441befc16ed842b3a3
1 /*
2 * Copyright (C) 2011 Collabora Ltd.
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.
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.
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
19 #ifndef __EMPATHY_MIC_MONITOR_H__
20 #define __EMPATHY_MIC_MONITOR_H__
22 #include <glib-object.h>
24 #include <pulse/pulseaudio.h>
26 G_BEGIN_DECLS
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))
35 typedef struct _EmpathyMicMonitor EmpathyMicMonitor;
36 typedef struct _EmpathyMicMonitorPrivate EmpathyMicMonitorPrivate;
37 typedef struct _EmpathyMicMonitorClass EmpathyMicMonitorClass;
39 struct _EmpathyMicMonitor
41 GObject parent;
42 EmpathyMicMonitorPrivate *priv;
45 struct _EmpathyMicMonitorClass
47 GObjectClass parent_class;
50 GType empathy_mic_monitor_get_type (void) G_GNUC_CONST;
52 EmpathyMicMonitor * empathy_mic_monitor_new (void);
55 typedef struct
57 guint index;
58 gchar *name;
59 gchar *description;
60 gboolean is_monitor;
61 } EmpathyMicrophone;
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);
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);
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);
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);
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);
88 G_END_DECLS
90 #endif /* __EMPATHY_MIC_MONITOR_H__ */