[telepathy-gabble/master] Implement GetCallStates()
Will Thompson
will.thompson at collabora.co.uk
Wed Apr 1 11:14:18 PDT 2009
---
src/media-channel.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/media-channel.c b/src/media-channel.c
index 492abcb..203ab5d 100644
--- a/src/media-channel.c
+++ b/src/media-channel.c
@@ -2843,12 +2843,18 @@ static void
gabble_media_channel_get_call_states (TpSvcChannelInterfaceCallState *iface,
DBusGMethodInvocation *context)
{
- GHashTable *states;
+ GabbleMediaChannel *self = (GabbleMediaChannel *) iface;
+ GabbleMediaChannelPrivate *priv = self->priv;
+ JingleRtpRemoteState state = priv->remote_state;
+ GHashTable *states = g_hash_table_new (g_direct_hash, g_direct_equal);
+
+ if (state != JINGLE_RTP_REMOTE_STATE_ACTIVE)
+ g_hash_table_insert (states, GUINT_TO_POINTER (priv->session->peer),
+ GUINT_TO_POINTER (jingle_remote_state_to_csf (state)));
- /* stub implementation: nobody has any call-state flags */
- states = g_hash_table_new (g_direct_hash, g_direct_equal);
tp_svc_channel_interface_call_state_return_from_get_call_states (context,
states);
+
g_hash_table_destroy (states);
}
--
1.5.6.5
More information about the telepathy-commits
mailing list