]> git.0d.be Git - empathy.git/blob - libempathy-gtk/empathy-sound-manager.h
Change Finnish translation team web page to l10n.gnome.org
[empathy.git] / libempathy-gtk / empathy-sound-manager.h
1 /*
2  * empathy-sound-manager.h - Various sound related utility functions.
3  * Copyright (C) 2009 Collabora Ltd.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18  */
19
20
21 #ifndef __EMPATHY_SOUND_MANAGER_H__
22 #define __EMPATHY_SOUND_MANAGER_H__
23
24 #include <canberra-gtk.h>
25
26 G_BEGIN_DECLS
27
28 /* NOTE: Keep this sync with sound_entries in empathy-sound-manager.c */
29 typedef enum {
30   EMPATHY_SOUND_MESSAGE_INCOMING = 0,
31   EMPATHY_SOUND_MESSAGE_OUTGOING,
32   EMPATHY_SOUND_CONVERSATION_NEW,
33   EMPATHY_SOUND_CONTACT_CONNECTED,
34   EMPATHY_SOUND_CONTACT_DISCONNECTED,
35   EMPATHY_SOUND_ACCOUNT_CONNECTED,
36   EMPATHY_SOUND_ACCOUNT_DISCONNECTED,
37   EMPATHY_SOUND_PHONE_INCOMING,
38   EMPATHY_SOUND_PHONE_OUTGOING,
39   EMPATHY_SOUND_PHONE_HANGUP,
40   LAST_EMPATHY_SOUND,
41 } EmpathySound;
42
43 #define EMPATHY_TYPE_SOUND_MANAGER         (empathy_sound_manager_get_type ())
44 #define EMPATHY_SOUND_MANAGER(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_SOUND_MANAGER, EmpathySoundManager))
45 #define EMPATHY_SOUND_MANAGER_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), EMPATHY_TYPE_SOUND_MANAGER, EmpathySoundManagerClass))
46 #define EMPATHY_IS_SOUND_MANAGER(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_SOUND_MANAGER))
47 #define EMPATHY_IS_SOUND_MANAGER_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_SOUND_MANAGER))
48 #define EMPATHY_SOUND_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_SOUND_MANAGER, EmpathySoundManagerClass))
49
50 typedef struct _EmpathySoundManager EmpathySoundManager;
51 typedef struct _EmpathySoundManagerClass EmpathySoundManagerClass;
52 typedef struct _EmpathySoundManagerPrivate EmpathySoundManagerPrivate;
53
54 struct _EmpathySoundManager
55 {
56   GObject parent;
57   EmpathySoundManagerPrivate *priv;
58 };
59
60 struct _EmpathySoundManagerClass
61 {
62   GObjectClass parent_class;
63 };
64
65 GType empathy_sound_manager_get_type (void) G_GNUC_CONST;
66
67 EmpathySoundManager * empathy_sound_manager_dup_singleton (void);
68
69 gboolean empathy_sound_manager_play (EmpathySoundManager *self,
70     GtkWidget *widget,
71     EmpathySound sound_id);
72
73 void empathy_sound_manager_stop (EmpathySoundManager *self,
74     EmpathySound sound_id);
75
76 gboolean empathy_sound_manager_start_playing (EmpathySoundManager *self,
77     GtkWidget *widget,
78     EmpathySound sound_id,
79     guint timeout_before_replay);
80
81 gboolean empathy_sound_manager_play_full (EmpathySoundManager *self,
82     GtkWidget *widget,
83     EmpathySound sound_id,
84     ca_finish_callback_t callback,
85     gpointer user_data);
86
87 G_END_DECLS
88
89 #endif /* #ifndef __EMPATHY_SOUND_MANAGER_H__ */