mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
[#2006] Add Detach participant method
This commit is contained in:
@ -833,12 +833,12 @@ sflphone_get_current_codec_name()
|
||||
}
|
||||
|
||||
void
|
||||
sflphone_add_participant()
|
||||
sflphone_detach_participant()
|
||||
{
|
||||
DEBUG("sflphone add participant to conference");
|
||||
DEBUG("sflphone detach participant from conference");
|
||||
|
||||
callable_obj_t * selectedCall = calltab_get_selected_call(current_calls);
|
||||
dbus_add_participant(selectedCall);
|
||||
dbus_detach_participant(selectedCall);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -61,6 +61,14 @@
|
||||
<arg type="s" name="drag_callID" direction="in"/>
|
||||
</method>
|
||||
|
||||
<method name="detachParticipant">
|
||||
<arg type="s" name="callID" direction="in"/>
|
||||
</method>
|
||||
|
||||
<signal name="displayCoference">
|
||||
<arg type="s" name="confID" direction="out"/>
|
||||
</signal>
|
||||
|
||||
<method name="setRecording">
|
||||
<arg type="s" name="callID" direction="in"/>
|
||||
</method>
|
||||
|
@ -1242,24 +1242,6 @@ dbus_set_volume_controls( )
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
dbus_add_participant(const callable_obj_t * c)
|
||||
{
|
||||
|
||||
DEBUG("dbus_add_participant %s\n", c->_callID);
|
||||
|
||||
GError* error = NULL;
|
||||
org_sflphone_SFLphone_CallManager_add_participant(
|
||||
callManagerProxy,
|
||||
c->_callID,
|
||||
&error);
|
||||
if(error)
|
||||
{
|
||||
g_error_free(error);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
dbus_join_participant(const callable_obj_t * c_sel, const callable_obj_t * c_drag)
|
||||
{
|
||||
@ -1278,6 +1260,24 @@ dbus_join_participant(const callable_obj_t * c_sel, const callable_obj_t * c_dra
|
||||
g_error_free(error);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
dbus_detach_participant(const callable_obj_t * c)
|
||||
{
|
||||
|
||||
DEBUG("dbus_detach_participant %s\n", c->_callID);
|
||||
|
||||
GError* error = NULL;
|
||||
org_sflphone_SFLphone_CallManager_detach_participant(
|
||||
callManagerProxy,
|
||||
c->_callID,
|
||||
&error);
|
||||
if(error)
|
||||
{
|
||||
g_error_free(error);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -30,9 +30,9 @@ is_inserted( GtkWidget* button )
|
||||
* Static create_conference
|
||||
*/
|
||||
static void
|
||||
conference_button( GtkWidget *widget UNUSED, gpointer data UNUSED)
|
||||
detach_button( GtkWidget *widget UNUSED, gpointer data UNUSED)
|
||||
{
|
||||
sflphone_add_participant();
|
||||
sflphone_detach_participant();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -165,6 +165,7 @@ GtkWidget *create_toolbar ()
|
||||
{
|
||||
GtkWidget *ret;
|
||||
GtkWidget *image;
|
||||
const gchar *label_detach;
|
||||
|
||||
ret = gtk_toolbar_new();
|
||||
toolbar = ret;
|
||||
@ -277,14 +278,16 @@ GtkWidget *create_toolbar ()
|
||||
gtk_toolbar_insert(GTK_TOOLBAR(ret), GTK_TOOL_ITEM(recButton), -1);
|
||||
|
||||
|
||||
conferenceButton = gtk_tool_button_new_from_stock (GTK_STOCK_MEDIA_RECORD);
|
||||
detachButton = gtk_tool_button_new_from_stock (GTK_STOCK_MEDIA_RECORD);
|
||||
label_detach = "Detach";
|
||||
gtk_button_set_label(GTK_BUTTON(detachButton), label_detach);
|
||||
#if GTK_CHECK_VERSION(2,12,0)
|
||||
gtk_widget_set_tooltip_text(GTK_WIDGET(conferenceButton), _("Conference"));
|
||||
gtk_widget_set_tooltip_text(GTK_WIDGET(detachButton), _("Detach"));
|
||||
#endif
|
||||
gtk_widget_set_state( GTK_WIDGET(conferenceButton), GTK_STATE_INSENSITIVE);
|
||||
g_signal_connect (G_OBJECT (conferenceButton), "clicked",
|
||||
G_CALLBACK (conference_button), NULL);
|
||||
gtk_toolbar_insert(GTK_TOOLBAR(ret), GTK_TOOL_ITEM(conferenceButton), -1);
|
||||
gtk_widget_set_state( GTK_WIDGET(detachButton), GTK_STATE_INSENSITIVE);
|
||||
g_signal_connect (G_OBJECT (detachButton), "clicked",
|
||||
G_CALLBACK (detach_button), NULL);
|
||||
gtk_toolbar_insert(GTK_TOOLBAR(ret), GTK_TOOL_ITEM(detachButton), -1);
|
||||
|
||||
|
||||
return ret;
|
||||
@ -334,7 +337,7 @@ toolbar_update_buttons ()
|
||||
case CALL_STATE_INCOMING:
|
||||
gtk_widget_set_sensitive( GTK_WIDGET(pickupButton), TRUE);
|
||||
gtk_widget_set_sensitive( GTK_WIDGET(hangupButton), TRUE);
|
||||
gtk_widget_set_sensitive( GTK_WIDGET(conferenceButton), TRUE);
|
||||
gtk_widget_set_sensitive( GTK_WIDGET(detachButton), TRUE);
|
||||
g_object_ref(callButton);
|
||||
gtk_container_remove(GTK_CONTAINER(toolbar), GTK_WIDGET(callButton));
|
||||
gtk_toolbar_insert(GTK_TOOLBAR(toolbar), pickupButton, 0);
|
||||
|
@ -34,7 +34,7 @@ GtkToolItem * holdButton;
|
||||
GtkToolItem * transfertButton;
|
||||
GtkToolItem * unholdButton;
|
||||
GtkToolItem * mailboxButton;
|
||||
GtkToolItem * conferenceButton;
|
||||
GtkToolItem * detachButton;
|
||||
GtkToolItem * recButton;
|
||||
GtkToolItem * historyButton;
|
||||
GtkToolItem * contactButton;
|
||||
|
@ -61,6 +61,14 @@
|
||||
<arg type="s" name="drag_callID" direction="in"/>
|
||||
</method>
|
||||
|
||||
<method name="detachParticipant">
|
||||
<arg type="s" name="callID" direction="in"/>
|
||||
</method>
|
||||
|
||||
<signal name="displayCoference">
|
||||
<arg type="s" name="confID" direction="out"/>
|
||||
</signal>
|
||||
|
||||
<method name="setRecording">
|
||||
<arg type="s" name="callID" direction="in"/>
|
||||
</method>
|
||||
|
@ -131,6 +131,16 @@ CallManager::joinParticipant (const std::string& sel_callID, const std::string&
|
||||
Manager::instance().joinParticipant(sel_callID, drag_callID);
|
||||
}
|
||||
|
||||
void
|
||||
CallManager::detachParticipant (const std::string& callID)
|
||||
{
|
||||
_debug ("CallManager::detachParticipant received %s\n", callID.c_str());
|
||||
// Manager::instance().detachParticipant(callID);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
CallManager::setRecording (const std::string& callID)
|
||||
{
|
||||
|
@ -50,6 +50,7 @@ public:
|
||||
double getVolume( const std::string& device );
|
||||
void addParticipant( const std::string& callID );
|
||||
void joinParticipant( const std::string& sel_callID, const std::string& drag_callID );
|
||||
void detachParticipant( const std::string& callID );
|
||||
void setRecording( const std::string& callID );
|
||||
bool getIsRecording(const std::string& callID);
|
||||
std::string getCurrentCodecName(const std::string& callID);
|
||||
|
@ -775,7 +775,7 @@ ManagerImpl::joinParticipant(const CallID& call_id1, const CallID& call_id2)
|
||||
}
|
||||
else if(iter->second == "INCOMING")
|
||||
{
|
||||
_debug(" INCOMING %s\n", call_id1.c_str());
|
||||
_debug(" ANSWER %s\n", call_id1.c_str());
|
||||
answerCall(call_id1);
|
||||
}
|
||||
|
||||
@ -789,7 +789,7 @@ ManagerImpl::joinParticipant(const CallID& call_id1, const CallID& call_id2)
|
||||
}
|
||||
else if(iter->second == "INCOMING")
|
||||
{
|
||||
_debug(" INCOMING %s\n", call_id2.c_str());
|
||||
_debug(" ANSWER %s\n", call_id2.c_str());
|
||||
answerCall(call_id2);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user