Skip to content
Snippets Groups Projects
Commit 75dda354 authored by Alexandre Savard's avatar Alexandre Savard
Browse files

[#2006] Detach participant by ID

parent 4b6fb1d0
No related branches found
No related tags found
No related merge requests found
......@@ -837,12 +837,18 @@ sflphone_get_current_codec_name()
}
void
sflphone_detach_participant()
sflphone_detach_participant(const gchar* callID)
{
DEBUG("sflphone detach participant from conference");
if(callID == NULL) {
callable_obj_t * selectedCall = calltab_get_selected_call(current_calls);
dbus_detach_participant(selectedCall);
dbus_detach_participant(selectedCall->_callID);
}
else {
dbus_detach_participant(callID);
}
}
void
......
......@@ -186,4 +186,6 @@ void sflphone_join_participant(const gchar* sel_callID, const gchar* drag_callID
void sflphone_add_participant(const gchar* callID, const gchar* confID);
void sflphone_detach_participant(const gchar* callID);
#endif
......@@ -926,6 +926,7 @@ static void drag_end_cb(GtkWidget * widget, GdkDragContext * context, gpointer d
else if(selected_type == A_CONFERENCE && dragged_type == A_CALL)
{
// TODO: dragged a conference on a single call
sflphone_add_participant(dragged_call_id, selected_call_id);
}
else if(selected_type == A_CONFERENCE && dragged_type == A_CONFERENCE)
......
......@@ -1339,15 +1339,15 @@ dbus_add_participant(const gchar* callID, const gchar* confID)
void
dbus_detach_participant(const callable_obj_t * c)
dbus_detach_participant(const gchar* callID)
{
DEBUG("dbus_detach_participant %s\n", c->_callID);
DEBUG("dbus_detach_participant %s\n", callID);
GError* error = NULL;
org_sflphone_SFLphone_CallManager_detach_participant(
callManagerProxy,
c->_callID,
callID,
&error);
if(error)
{
......
......@@ -32,7 +32,7 @@ is_inserted( GtkWidget* button )
static void
detach_button( GtkWidget *widget UNUSED, gpointer data UNUSED)
{
sflphone_detach_participant();
sflphone_detach_participant(NULL);
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment