[Telepathy-commits] [telepathy-qt4/master] StreamedMediaChannel: Added a MediaStream * param to all MediaStreams signals.

Andre Moreira Magalhaes (andrunko) andre.magalhaes at collabora.co.uk
Wed Mar 11 06:32:27 PDT 2009


---
 TelepathyQt4/Client/streamed-media-channel.cpp |    9 +++++----
 TelepathyQt4/Client/streamed-media-channel.h   |   11 +++++++----
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/TelepathyQt4/Client/streamed-media-channel.cpp b/TelepathyQt4/Client/streamed-media-channel.cpp
index befd639..2490daa 100644
--- a/TelepathyQt4/Client/streamed-media-channel.cpp
+++ b/TelepathyQt4/Client/streamed-media-channel.cpp
@@ -212,13 +212,13 @@ void MediaStream::setDirection(Telepathy::MediaStreamDirection direction,
 {
     mPriv->direction = direction;
     mPriv->pendingSend = pendingSend;
-    emit directionChanged(direction, pendingSend);
+    emit directionChanged(this, direction, pendingSend);
 }
 
 void MediaStream::setState(Telepathy::MediaStreamState state)
 {
     mPriv->state = state;
-    emit stateChanged(state);
+    emit stateChanged(this, state);
 }
 
 
@@ -469,7 +469,7 @@ void StreamedMediaChannel::onStreamRemoved(uint streamId)
 
     if (mPriv->streams.contains(streamId)) {
         QSharedPointer<MediaStream> stream = mPriv->streams[streamId];
-        emit stream->removed();
+        emit stream->removed(stream.data());
         mPriv->streams.remove(streamId);
     }
 }
@@ -511,7 +511,8 @@ void StreamedMediaChannel::onStreamError(uint streamId,
 
     if (mPriv->streams.contains(streamId)) {
         QSharedPointer<MediaStream> stream = mPriv->streams[streamId];
-        emit stream->error((Telepathy::MediaStreamError) errorCode,
+        emit stream->error(stream.data(),
+                (Telepathy::MediaStreamError) errorCode,
                 errorMessage);
     }
 }
diff --git a/TelepathyQt4/Client/streamed-media-channel.h b/TelepathyQt4/Client/streamed-media-channel.h
index b6dd950..34af55e 100644
--- a/TelepathyQt4/Client/streamed-media-channel.h
+++ b/TelepathyQt4/Client/streamed-media-channel.h
@@ -62,11 +62,14 @@ public:
             Telepathy::MediaStreamDirection direction);
 
 Q_SIGNALS:
-    void removed();
-    void directionChanged(Telepathy::MediaStreamDirection direction,
+    void removed(Telepathy::Client::MediaStream *stream);
+    void directionChanged(Telepathy::Client::MediaStream *stream,
+            Telepathy::MediaStreamDirection direction,
             Telepathy::MediaStreamPendingSend pendingSend);
-    void stateChanged(Telepathy::MediaStreamState);
-    void error(Telepathy::MediaStreamError errorCode,
+    void stateChanged(Telepathy::Client::MediaStream *stream,
+            Telepathy::MediaStreamState);
+    void error(Telepathy::Client::MediaStream *stream,
+            Telepathy::MediaStreamError errorCode,
             const QString &errorMessage);
 
 private:
-- 
1.5.6.5




More information about the telepathy-commits mailing list