summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2011-12-23 13:19:29 -0500
committerOlivier CrĂȘte <olivier.crete@collabora.com>2011-12-23 13:19:29 -0500
commit10fb8a72889052eabc919e0da8a358121da99a5a (patch)
treebbb72a2e55b137fc94c9fbf99bd06783218349af
parent37a3f51b1d436f8c04c98a6964d79aba5b515c2d (diff)
Update to the newest spec
-rw-r--r--telepathy-farstream/call-channel.c4
-rw-r--r--telepathy-farstream/call-content.c2
-rw-r--r--telepathy-farstream/call-stream.c40
-rw-r--r--telepathy-farstream/call-stream.h4
-rw-r--r--telepathy-farstream/content-priv.h10
-rw-r--r--telepathy-farstream/content.c34
6 files changed, 48 insertions, 46 deletions
diff --git a/telepathy-farstream/call-channel.c b/telepathy-farstream/call-channel.c
index 30990ff..4954430 100644
--- a/telepathy-farstream/call-channel.c
+++ b/telepathy-farstream/call-channel.c
@@ -95,7 +95,8 @@ static gboolean tf_call_channel_init_finish (GAsyncInitable *initable,
static void content_added (TpCallChannel *proxy,
TpCallContent *context_proxy, TfCallChannel *self);
static void content_removed (TpCallChannel *proxy,
- TpCallContent *content_proxy, TfCallChannel *self);
+ TpCallContent *content_proxy, TpCallStateReason *reason,
+ TfCallChannel *self);
static void channel_prepared (GObject *proxy, GAsyncResult *prepare_res,
gpointer user_data);
@@ -374,6 +375,7 @@ content_added (TpCallChannel *proxy,
static void
content_removed (TpCallChannel *proxy,
TpCallContent *content_proxy,
+ TpCallStateReason *reason,
TfCallChannel *self)
{
guint i;
diff --git a/telepathy-farstream/call-content.c b/telepathy-farstream/call-content.c
index a09770a..9161750 100644
--- a/telepathy-farstream/call-content.c
+++ b/telepathy-farstream/call-content.c
@@ -1716,7 +1716,7 @@ tf_call_content_try_sending_codecs (TfCallContent *self)
{
g_debug ("Updating local Media Description");
tp_cli_call_content_interface_media_call_update_local_media_description (
- self->proxy, -1, 0, media_description, NULL, NULL, NULL, NULL);
+ self->proxy, -1, media_description, NULL, NULL, NULL, NULL);
}
else
{
diff --git a/telepathy-farstream/call-stream.c b/telepathy-farstream/call-stream.c
index 110047b..70764e8 100644
--- a/telepathy-farstream/call-stream.c
+++ b/telepathy-farstream/call-stream.c
@@ -133,7 +133,7 @@ sending_state_changed (TpCallStream *proxy,
{
TfCallStream *self = TF_CALL_STREAM (weak_object);
FsStreamDirection dir;
- gboolean pause = FALSE;
+ gboolean mute = FALSE;
self->sending_state = arg_State;
@@ -147,10 +147,10 @@ sending_state_changed (TpCallStream *proxy,
case TP_STREAM_FLOW_STATE_PENDING_START:
if (self->has_send_resource ||
_tf_content_start_sending (TF_CONTENT (self->call_content),
- self->is_sending_paused))
+ self->is_sending_muted))
{
self->has_send_resource = TRUE;
- self->is_sending_paused = FALSE;
+ self->is_sending_muted = FALSE;
tp_cli_call_stream_interface_media_call_complete_sending_state_change (
proxy, -1, TP_STREAM_FLOW_STATE_STARTED,
NULL, NULL, NULL, NULL);
@@ -166,28 +166,28 @@ sending_state_changed (TpCallStream *proxy,
return;
}
break;
- case TP_STREAM_FLOW_STATE_PENDING_PAUSE:
- pause = TRUE;
+ case TP_STREAM_FLOW_STATE_PENDING_MUTE:
+ mute = TRUE;
/* fall through */
case TP_STREAM_FLOW_STATE_PENDING_STOP:
g_object_set (self->fsstream,
"direction", dir & ~FS_DIRECTION_SEND, NULL);
if (self->has_send_resource)
{
- _tf_content_stop_sending (TF_CONTENT (self->call_content), pause);
+ _tf_content_stop_sending (TF_CONTENT (self->call_content), mute);
self->has_send_resource = FALSE;
- self->is_sending_paused = pause;
+ self->is_sending_muted = mute;
}
- else if (!pause && self->is_sending_paused)
+ else if (!mute && self->is_sending_muted)
{
- _tf_content_pause_to_stop_sending (TF_CONTENT (self->call_content));
- self->is_sending_paused = FALSE;
+ _tf_content_mute_to_stop_sending (TF_CONTENT (self->call_content));
+ self->is_sending_muted = FALSE;
}
tp_cli_call_stream_interface_media_call_complete_sending_state_change (
proxy, -1, arg_State == TP_STREAM_FLOW_STATE_PENDING_STOP ?
- TP_STREAM_FLOW_STATE_STOPPED : TP_STREAM_FLOW_STATE_PAUSED,
+ TP_STREAM_FLOW_STATE_STOPPED : TP_STREAM_FLOW_STATE_MUTED,
NULL, NULL, NULL, NULL);
break;
default:
@@ -203,7 +203,7 @@ tf_call_stream_start_receiving (TfCallStream *self, FsStreamDirection dir)
&self->contact_handle, 1))
{
self->has_receive_resource = TRUE;
- self->is_receiving_paused = FALSE;
+ self->is_receiving_muted = FALSE;
if (self->fsstream)
g_object_set (self->fsstream,
"direction", dir | FS_DIRECTION_RECV, NULL);
@@ -227,7 +227,7 @@ receiving_state_changed (TpCallStream *proxy,
{
TfCallStream *self = TF_CALL_STREAM (weak_object);
FsStreamDirection dir;
- gboolean pause = FALSE;
+ gboolean mute = FALSE;
self->receiving_state = arg_State;
@@ -241,29 +241,29 @@ receiving_state_changed (TpCallStream *proxy,
case TP_STREAM_FLOW_STATE_PENDING_START:
tf_call_stream_start_receiving (self, dir);
break;
- case TP_STREAM_FLOW_STATE_PENDING_PAUSE:
- pause = TRUE;
+ case TP_STREAM_FLOW_STATE_PENDING_MUTE:
+ mute = TRUE;
/* fall through */
case TP_STREAM_FLOW_STATE_PENDING_STOP:
g_object_set (self->fsstream,
"direction", dir & ~FS_DIRECTION_RECV, NULL);
if (self->has_receive_resource)
{
- _tf_content_stop_receiving (TF_CONTENT (self->call_content), pause,
+ _tf_content_stop_receiving (TF_CONTENT (self->call_content), mute,
&self->contact_handle, 1);
self->has_receive_resource = FALSE;
- self->is_receiving_paused = pause;
+ self->is_receiving_muted = mute;
}
- else if (!pause && self->is_receiving_paused)
+ else if (!mute && self->is_receiving_muted)
{
- self->is_receiving_paused = FALSE;
+ self->is_receiving_muted = FALSE;
_tf_content_stop_receiving (TF_CONTENT (self->call_content), FALSE,
&self->contact_handle, 1);
}
tp_cli_call_stream_interface_media_call_complete_receiving_state_change (
proxy, -1, arg_State == TP_STREAM_FLOW_STATE_PENDING_STOP ?
- TP_STREAM_FLOW_STATE_STOPPED : TP_STREAM_FLOW_STATE_PAUSED,
+ TP_STREAM_FLOW_STATE_STOPPED : TP_STREAM_FLOW_STATE_MUTED,
NULL, NULL, NULL, NULL);
break;
default:
diff --git a/telepathy-farstream/call-stream.h b/telepathy-farstream/call-stream.h
index d0f3062..33bbf37 100644
--- a/telepathy-farstream/call-stream.h
+++ b/telepathy-farstream/call-stream.h
@@ -91,11 +91,11 @@ struct _TfCallStream {
TpStreamFlowState sending_state;
gboolean has_send_resource;
- gboolean is_sending_paused;
+ gboolean is_sending_muted;
TpStreamFlowState receiving_state;
gboolean has_receive_resource;
- gboolean is_receiving_paused;
+ gboolean is_receiving_muted;
gboolean has_contact;
guint contact_handle;
diff --git a/telepathy-farstream/content-priv.h b/telepathy-farstream/content-priv.h
index 2120340..93eadd2 100644
--- a/telepathy-farstream/content-priv.h
+++ b/telepathy-farstream/content-priv.h
@@ -13,7 +13,7 @@ struct _TfContent {
GObject parent;
guint sending_count;
- guint sending_paused_count;
+ guint sending_muted_count;
};
struct _TfContentClass{
@@ -32,16 +32,16 @@ struct _TfContentClass{
guint handle_count);
};
-gboolean _tf_content_start_sending (TfContent *self, gboolean was_paused);
-void _tf_content_stop_sending (TfContent *self, gboolean pause);
-void _tf_content_pause_to_stop_sending (TfContent *self);
+gboolean _tf_content_start_sending (TfContent *self, gboolean was_muted);
+void _tf_content_stop_sending (TfContent *self, gboolean mute);
+void _tf_content_mute_to_stop_sending (TfContent *self);
void _tf_content_emit_src_pad_added (TfContent *self, guint handle,
FsStream *stream, GstPad *pad, FsCodec *codec);
gboolean _tf_content_start_receiving (TfContent *self, guint *handles,
guint handle_count);
-void _tf_content_stop_receiving (TfContent *self, gboolean pause,
+void _tf_content_stop_receiving (TfContent *self, gboolean mute,
guint *handles, guint handle_count);
G_END_DECLS
diff --git a/telepathy-farstream/content.c b/telepathy-farstream/content.c
index 1e8f00a..6ae4ec9 100644
--- a/telepathy-farstream/content.c
+++ b/telepathy-farstream/content.c
@@ -142,7 +142,7 @@ tf_content_class_init (TfContentClass *klass)
/**
* TfContent::stop-sending
* @content: the #TfContent
- * @pause: If %TRUE, this is a temporary pause, if %FALSE it is permanent
+ * @mute: If %TRUE, this is a temporary mute, if %FALSE it is permanent
*
* This signal is emitted when the connection manager ask to stop
* sending media
@@ -210,7 +210,7 @@ tf_content_class_init (TfContentClass *klass)
/**
* TfContent::stop-receiving
* @content: the #TfContent
- * @pause: If %TRUE, this is a temporary pause, if %FALSE it is permanent
+ * @mute: If %TRUE, this is a temporary mute, if %FALSE it is permanent
* @handles: a 0-terminated array of #guint containing the handles
* @handle_count: The number of handles in the @handles array
*
@@ -251,7 +251,7 @@ tf_content_init (TfContent *self)
gboolean
-_tf_content_start_sending (TfContent *self, gboolean was_paused)
+_tf_content_start_sending (TfContent *self, gboolean was_muted)
{
GValue instance = {0};
GValue sending_success_val = {0,};
@@ -260,8 +260,8 @@ _tf_content_start_sending (TfContent *self, gboolean was_paused)
if (self->sending_count)
{
- if (was_paused)
- self->sending_paused_count --;
+ if (was_muted)
+ self->sending_muted_count --;
self->sending_count ++;
return TRUE;
}
@@ -285,34 +285,34 @@ _tf_content_start_sending (TfContent *self, gboolean was_paused)
self->sending_count = 1;
- if (was_paused)
- self->sending_paused_count --;
+ if (was_muted)
+ self->sending_muted_count --;
return sending_success;
}
void
-_tf_content_stop_sending (TfContent *self, gboolean pause)
+_tf_content_stop_sending (TfContent *self, gboolean mute)
{
self->sending_count --;
- if (pause)
- self->sending_paused_count ++;
+ if (mute)
+ self->sending_muted_count ++;
if (self->sending_count == 0)
{
g_signal_emit (self, signals[SIGNAL_STOP_SENDING], 0,
- self->sending_paused_count != 0);
+ self->sending_muted_count != 0);
}
}
void
-_tf_content_pause_to_stop_sending (TfContent *self)
+_tf_content_mute_to_stop_sending (TfContent *self)
{
- self->sending_paused_count --;
+ self->sending_muted_count --;
- if (self->sending_count == 0 && self->sending_paused_count == 0)
+ if (self->sending_count == 0 && self->sending_muted_count == 0)
g_signal_emit (self, signals[SIGNAL_STOP_SENDING], 0,
TRUE);
}
@@ -441,12 +441,12 @@ _tf_content_start_receiving (TfContent *self, guint *handles,
}
void
-_tf_content_stop_receiving (TfContent *self, gboolean pause, guint *handles,
+_tf_content_stop_receiving (TfContent *self, gboolean mute, guint *handles,
guint handle_count)
{
g_debug ("Requesting that the application %s receiving",
- pause ? "pause" : "stop");
- g_signal_emit (self, signals[SIGNAL_STOP_RECEIVING], 0, pause, handles,
+ mute ? "mute" : "stop");
+ g_signal_emit (self, signals[SIGNAL_STOP_RECEIVING], 0, mute, handles,
handle_count);
}