aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-sound-manager.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-11-30 17:29:00 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-11-30 17:29:00 +0800
commit8172bca03c6f85d7dcc0ff39f1a81ccfd719b08b (patch)
treed6387df87b988b83dedc16ffb5ef73e5d0d30de9 /libempathy-gtk/empathy-sound-manager.c
parent0dca19234c147a94609c6659660e83135e765b9c (diff)
downloadgsoc2013-empathy-8172bca03c6f85d7dcc0ff39f1a81ccfd719b08b.tar
gsoc2013-empathy-8172bca03c6f85d7dcc0ff39f1a81ccfd719b08b.tar.gz
gsoc2013-empathy-8172bca03c6f85d7dcc0ff39f1a81ccfd719b08b.tar.bz2
gsoc2013-empathy-8172bca03c6f85d7dcc0ff39f1a81ccfd719b08b.tar.lz
gsoc2013-empathy-8172bca03c6f85d7dcc0ff39f1a81ccfd719b08b.tar.xz
gsoc2013-empathy-8172bca03c6f85d7dcc0ff39f1a81ccfd719b08b.tar.zst
gsoc2013-empathy-8172bca03c6f85d7dcc0ff39f1a81ccfd719b08b.zip
add EmpathySoundManager stub object (#636067)
Diffstat (limited to 'libempathy-gtk/empathy-sound-manager.c')
-rw-r--r--libempathy-gtk/empathy-sound-manager.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-sound-manager.c b/libempathy-gtk/empathy-sound-manager.c
index 459016db1..8d51f7391 100644
--- a/libempathy-gtk/empathy-sound-manager.c
+++ b/libempathy-gtk/empathy-sound-manager.c
@@ -68,6 +68,40 @@ static EmpathySoundEntry sound_entries[LAST_EMPATHY_SOUND] = {
N_("Voice call ended"), NULL },
};
+G_DEFINE_TYPE (EmpathySoundManager, empathy_sound_manager, G_TYPE_OBJECT)
+
+struct _EmpathySoundManagerPrivate
+{
+ gpointer unused;
+};
+
+static void
+empathy_sound_manager_class_init (EmpathySoundManagerClass *cls)
+{
+ g_type_class_add_private (cls, sizeof (EmpathySoundManagerPrivate));
+}
+
+static void
+empathy_sound_manager_init (EmpathySoundManager *self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
+ EMPATHY_TYPE_SOUND_MANAGER, EmpathySoundManagerPrivate);
+}
+
+EmpathySoundManager *
+empathy_sound_manager_dup_singleton (void)
+{
+ static EmpathySoundManager *manager = NULL;
+
+ if (manager != NULL)
+ return g_object_ref (manager);
+
+ manager = g_object_new (EMPATHY_TYPE_SOUND_MANAGER, NULL);
+
+ g_object_add_weak_pointer (G_OBJECT (manager), (gpointer *) &manager);
+ return manager;
+}
+
/* An hash table containing currently repeating sounds. The format is the
* following:
* Key: An EmpathySound