summaryrefslogtreecommitdiff
path: root/telepathy-glib/base-call-channel.c
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2011-12-15 19:15:09 -0500
committerXavier Claessens <xavier.claessens@collabora.co.uk>2012-01-10 09:52:46 +0100
commit24becc3d5895f280f666c9887da2c88a05e20045 (patch)
tree914643f0d6812cdb039aed61520e0187118bf9f3 /telepathy-glib/base-call-channel.c
parent43c27b7fb57113c634fd410ec53b939900801506 (diff)
downloadtelepathy-glib-24becc3d5895f280f666c9887da2c88a05e20045.tar.gz
Implement the locally muted flag
Diffstat (limited to 'telepathy-glib/base-call-channel.c')
-rw-r--r--telepathy-glib/base-call-channel.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/telepathy-glib/base-call-channel.c b/telepathy-glib/base-call-channel.c
index f22e1728f..ca6beae2c 100644
--- a/telepathy-glib/base-call-channel.c
+++ b/telepathy-glib/base-call-channel.c
@@ -1346,3 +1346,22 @@ _tp_base_call_channel_maybe_initizalised (TpBaseCallChannel *self)
TP_CALL_STATE_CHANGE_REASON_PROGRESS_MADE, "",
"All endpoints DATA component are CONNECTED");
}
+
+void
+_tp_base_call_channel_set_locally_muted (TpBaseCallChannel *self,
+ gboolean locally_muted)
+{
+ gboolean currently_muted = !!(self->priv->flags & TP_CALL_FLAG_LOCALLY_MUTED);
+
+ if (locally_muted == currently_muted)
+ return;
+
+ if (locally_muted)
+ self->priv->flags |= TP_CALL_FLAG_LOCALLY_MUTED;
+ else
+ self->priv->flags &= ~TP_CALL_FLAG_LOCALLY_MUTED;
+
+ if (tp_base_channel_is_registered (TP_BASE_CHANNEL (self)))
+ tp_svc_channel_type_call_emit_call_state_changed (self, self->priv->state,
+ self->priv->flags, self->priv->reason, self->priv->details);
+}