aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-call-handler.c17
-rw-r--r--libempathy/empathy-call-handler.h2
-rw-r--r--libempathy/empathy-tp-call.c35
-rw-r--r--libempathy/empathy-tp-call.h2
4 files changed, 56 insertions, 0 deletions
diff --git a/libempathy/empathy-call-handler.c b/libempathy/empathy-call-handler.c
index 90df179bc..bbc1f9a88 100644
--- a/libempathy/empathy-call-handler.c
+++ b/libempathy/empathy-call-handler.c
@@ -595,4 +595,21 @@ empathy_call_handler_stop_call (EmpathyCallHandler *handler)
}
priv->call = NULL;
+}
+
+/**
+ * empathy_call_handler_has_initial_video:
+ * @handler: an #EmpathyCallHandler
+ *
+ * Return %TRUE if the call managed by this #EmpathyCallHandler was
+ * created with video enabled
+ *
+ * Return value: %TRUE if the call was created as a video conversation.
+ */
+gboolean
+empathy_call_handler_has_initial_video (EmpathyCallHandler *handler)
+{
+ EmpathyCallHandlerPriv *priv = GET_PRIV (handler);
+
+ return priv->initial_video;
} \ No newline at end of file
diff --git a/libempathy/empathy-call-handler.h b/libempathy/empathy-call-handler.h
index 112a3139a..1f67fe56b 100644
--- a/libempathy/empathy-call-handler.h
+++ b/libempathy/empathy-call-handler.h
@@ -73,6 +73,8 @@ EmpathyCallHandler * empathy_call_handler_new_for_channel (
void empathy_call_handler_start_call (EmpathyCallHandler *handler);
void empathy_call_handler_stop_call (EmpathyCallHandler *handler);
+gboolean empathy_call_handler_has_initial_video (EmpathyCallHandler *handler);
+
void empathy_call_handler_bus_message (EmpathyCallHandler *handler,
GstBus *bus, GstMessage *message);
diff --git a/libempathy/empathy-tp-call.c b/libempathy/empathy-tp-call.c
index 2971e0ffc..a672d8a84 100644
--- a/libempathy/empathy-tp-call.c
+++ b/libempathy/empathy-tp-call.c
@@ -672,3 +672,38 @@ empathy_tp_call_has_dtmf (EmpathyTpCall *call)
TP_IFACE_QUARK_CHANNEL_INTERFACE_DTMF);
}
+/**
+ * empathy_tp_call_is_receiving_video:
+ * @call: the call
+ *
+ * Indicates if the call is receiving video or not.
+ *
+ * Returns: %TRUE if the call is currently receiving video, %FALSE otherwise.
+ */
+gboolean
+empathy_tp_call_is_receiving_video (EmpathyTpCall *call)
+{
+ EmpathyTpCallPriv *priv = GET_PRIV (call);
+
+ g_return_val_if_fail (EMPATHY_IS_TP_CALL (call), FALSE);
+
+ return priv->video->direction & TP_MEDIA_STREAM_DIRECTION_RECEIVE;
+}
+
+/**
+ * empathy_tp_call_is_sending_video:
+ * @call: the call
+ *
+ * Indicates if the call is sending video or not.
+ *
+ * Returns: %TRUE if the call is currently sending video, %FALSE otherwise.
+ */
+gboolean
+empathy_tp_call_is_sending_video (EmpathyTpCall *call)
+{
+ EmpathyTpCallPriv *priv = GET_PRIV (call);
+
+ g_return_val_if_fail (EMPATHY_IS_TP_CALL (call), FALSE);
+
+ return priv->video->direction & TP_MEDIA_STREAM_DIRECTION_SEND;
+}
diff --git a/libempathy/empathy-tp-call.h b/libempathy/empathy-tp-call.h
index 406ed1c3f..a00fe3e40 100644
--- a/libempathy/empathy-tp-call.h
+++ b/libempathy/empathy-tp-call.h
@@ -85,6 +85,8 @@ void empathy_tp_call_request_video_stream_direction (EmpathyTpCall *call,
void empathy_tp_call_start_tone (EmpathyTpCall *call, TpDTMFEvent event);
void empathy_tp_call_stop_tone (EmpathyTpCall *call);
gboolean empathy_tp_call_has_dtmf (EmpathyTpCall *call);
+gboolean empathy_tp_call_is_receiving_video (EmpathyTpCall *call);
+gboolean empathy_tp_call_is_sending_video (EmpathyTpCall *call);
G_END_DECLS