diff options
author | Olivier Crête <olivier.crete@collabora.com> | 2012-03-16 14:18:25 -0400 |
---|---|---|
committer | Olivier Crête <olivier.crete@collabora.com> | 2012-03-20 18:12:01 -0400 |
commit | 21ec409017f58d1ff863cc8c26d42108931ecabb (patch) | |
tree | 06faad5b68be7f4718a90552bd7b688260a505c5 | |
parent | 78db4e43dcbc8e8fabe87e05a9231b3b6555116a (diff) |
CallStream: Replace want_send with the local sending state of the Stream
Also require the newest telepathy-glib
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/call-stream.c | 19 |
2 files changed, 8 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac index 4690d117b..ccb2ebcf2 100644 --- a/configure.ac +++ b/configure.ac @@ -282,7 +282,7 @@ PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.1.0, dbus-glib-1 >= 0.82]) AC_SUBST(DBUS_CFLAGS) AC_SUBST(DBUS_LIBS) -PKG_CHECK_MODULES(TP_GLIB, [telepathy-glib >= 0.17.5]) +PKG_CHECK_MODULES(TP_GLIB, [telepathy-glib >= 0.17.6.1]) AC_SUBST(TP_GLIB_CFLAGS) AC_SUBST(TP_GLIB_LIBS) diff --git a/src/call-stream.c b/src/call-stream.c index 8d63d512d..a25365db9 100644 --- a/src/call-stream.c +++ b/src/call-stream.c @@ -84,8 +84,6 @@ struct _GabbleCallStreamPrivate { gboolean dispose_has_run; - gboolean want_send; - GabbleJingleContent *content; }; @@ -96,8 +94,6 @@ gabble_call_stream_init (GabbleCallStream *self) GABBLE_TYPE_CALL_STREAM, GabbleCallStreamPrivate); self->priv = priv; - - self->priv->want_send = TRUE; } static void gabble_call_stream_dispose (GObject *object); @@ -390,6 +386,7 @@ void gabble_call_stream_update_member_states (GabbleCallStream *self) { TpBaseCallStream *base = TP_BASE_CALL_STREAM (self); + TpBaseMediaCallStream *bmcs = TP_BASE_MEDIA_CALL_STREAM (self); GabbleCallStreamPrivate *priv = self->priv; JingleContentState state; TpSendingState local_state; @@ -409,17 +406,17 @@ gabble_call_stream_update_member_states (GabbleCallStream *self) if (gabble_jingle_content_sending (priv->content)) { - if (self->priv->want_send) + if (tp_base_media_call_stream_get_local_sending (bmcs)) local_state = TP_SENDING_STATE_SENDING; else local_state = TP_SENDING_STATE_PENDING_SEND; } else { - if (!self->priv->want_send) - local_state = TP_SENDING_STATE_NONE; - else + if (tp_base_media_call_stream_get_local_sending (bmcs)) local_state = TP_SENDING_STATE_PENDING_STOP_SENDING; + else + local_state = TP_SENDING_STATE_NONE; } if (gabble_jingle_content_receiving (priv->content)) @@ -602,13 +599,11 @@ gabble_call_stream_set_sending (TpBaseMediaCallStream *stream, { GabbleCallStream *self = GABBLE_CALL_STREAM (stream); - self->priv->want_send = sending; - - gabble_jingle_content_set_sending (self->priv->content, sending); - if (sending) tp_base_media_call_stream_set_local_sending (stream, TRUE); + gabble_jingle_content_set_sending (self->priv->content, sending); + return TRUE; } |