[Telepathy-commits] [telepathy-glib/master] callable example: use the configured simulation delay

Simon McVittie simon.mcvittie at collabora.co.uk
Tue Mar 17 06:41:16 PDT 2009


---
 examples/cm/callable/media-channel.c |    4 ++--
 examples/cm/callable/media-stream.c  |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/examples/cm/callable/media-channel.c b/examples/cm/callable/media-channel.c
index fb1ba5c..44579b9 100644
--- a/examples/cm/callable/media-channel.c
+++ b/examples/cm/callable/media-channel.c
@@ -955,10 +955,10 @@ media_request_streams (TpSvcChannelTypeStreamedMedia *iface,
           tp_intset_destroy (peer_set);
 
           /* In this example there is no real contact, so just simulate them
-           * answering after 1000ms */
+           * answering after a short time */
           /* FIXME: define a special contact who never answers, and if it's
            * that contact, don't add this timeout */
-          g_timeout_add_full (G_PRIORITY_DEFAULT, 1000,
+          g_timeout_add_full (G_PRIORITY_DEFAULT, self->priv->simulation_delay,
               simulate_contact_answered_cb, g_object_ref (self),
               g_object_unref);
         }
diff --git a/examples/cm/callable/media-stream.c b/examples/cm/callable/media-stream.c
index 03ca5a8..73853e1 100644
--- a/examples/cm/callable/media-stream.c
+++ b/examples/cm/callable/media-stream.c
@@ -457,7 +457,7 @@ example_callable_media_stream_change_direction (
               self->priv->id);
           changed = TRUE;
           self->priv->pending_send |= TP_MEDIA_STREAM_PENDING_REMOTE_SEND;
-          g_timeout_add_full (G_PRIORITY_DEFAULT, 1000,
+          g_timeout_add_full (G_PRIORITY_DEFAULT, self->priv->simulation_delay,
               simulate_contact_agreed_to_send_cb, g_object_ref (self),
               g_object_unref);
         }
@@ -501,6 +501,6 @@ example_callable_media_stream_connect (ExampleCallableMediaStream *self)
     return;
 
   /* simulate it taking a short time to connect */
-  self->priv->connected_event_id = g_timeout_add (1000,
+  self->priv->connected_event_id = g_timeout_add (self->priv->simulation_delay,
       simulate_stream_connected_cb, self);
 }
-- 
1.5.6.5




More information about the telepathy-commits mailing list