diff --git a/sflphone-client-gnome/src/actions.c b/sflphone-client-gnome/src/actions.c index 8f39264d30d634c5e3cc120a94326c54e2592634..2a6dcc9457d86627d43e63eda5e8a782c6e18c7d 100644 --- a/sflphone-client-gnome/src/actions.c +++ b/sflphone-client-gnome/src/actions.c @@ -898,15 +898,17 @@ sflphone_add_conference() } void -sflphone_conference_on_hold() +sflphone_conference_on_hold(const conference_obj_t * c) { - + DEBUG("sflphone_conference_on_hold"); + dbus_hold_conference(c); } void -sflphone_conference_off_hold() +sflphone_conference_off_hold(const conference_obj_t * c) { - + DEBUG("sflphone_conference_off_hold"); + dbus_unhold_conference(c); } diff --git a/sflphone-client-gnome/src/contacts/calltree.c b/sflphone-client-gnome/src/contacts/calltree.c index 62f713952426cb2b2affa04c4cd057b11c80ae2e..e74fe3c6806c022c0aef3acdea65d09f92c40b43 100644 --- a/sflphone-client-gnome/src/contacts/calltree.c +++ b/sflphone-client-gnome/src/contacts/calltree.c @@ -981,14 +981,22 @@ static void drag_end_cb(GtkWidget * widget, GdkDragContext * context, gpointer d if(dragged_path_depth == 1) { - // TODO: dragged a conference call on a call - // TODO: dragged a conference call on a conference - - else if(selected_type == A_CONFERENCE && dragged_type == NULL) + + if(selected_type == A_CALL && dragged_type == A_CALL) + { + // TODO: dragged a conference call on a call + + } + else if(selected_type == A_CALL && dragged_type == A_CONFERENCE) + { + // TODO: dragged a conference call on a conference + } + else { // TODO: dragged a conference call on a NULL element - sflphone_detach_participant(selected_call_id); + // sflphone_detach_participant(selected_call_id); } + sflphone_detach_participant(selected_call_id); } else // dragged_path_depth == 2 { diff --git a/sflphone-client-gnome/src/menus.c b/sflphone-client-gnome/src/menus.c index ccfd6e0e1b588352fec6d691be86d7e7ffb43b4d..f3afbd6c28a5b9bac166ddb9ee87720df04d4745 100644 --- a/sflphone-client-gnome/src/menus.c +++ b/sflphone-client-gnome/src/menus.c @@ -240,12 +240,14 @@ conference_hold (void* foo UNUSED) if(selectedConf->_state == CONFERENCE_STATE_HOLD) { gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( holdMenu ), gtk_image_new_from_file( ICONS_DIR "/icon_unhold.svg")); - sflphone_conference_off_hold(); + selectedConf->_state = CONFERENCE_STATE_ACTIVE; + sflphone_conference_off_hold(selectedConf); } else { gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM ( holdMenu ), gtk_image_new_from_file( ICONS_DIR "/icon_hold.svg")); - sflphone_conference_on_hold(); + selectedConf->_state = CONFERENCE_STATE_HOLD; + sflphone_conference_on_hold(selectedConf); } } } diff --git a/sflphone-common/src/managerimpl.cpp b/sflphone-common/src/managerimpl.cpp index c7f2761bf3f6852531b3766de9fe0f991d3e41c9..d5cebdd6f4c5dc25f15551e6c085c56407adf5e4 100644 --- a/sflphone-common/src/managerimpl.cpp +++ b/sflphone-common/src/managerimpl.cpp @@ -754,6 +754,36 @@ ManagerImpl::removeConference(const ConfID& conference_id) void ManagerImpl::holdConference(const CallID& id) { + _debug ("ManagerImpl::holdConference()\n"); + + Conference *conf; + ConferenceMap::iterator iter_conf = _conferencemap.find(id); + + AccountID currentAccountId; + + Call* call = NULL; + + if(iter_conf != _conferencemap.end()) + { + conf = iter_conf->second; + + ConferenceCallMap::iterator iter_participant = _conferencecall.begin(); + + while(iter_participant != _conferencecall.end()) + { + _debug("ManagerImpl::hangupConference participant %s\n", iter_participant->first.c_str()); + currentAccountId = getAccountFromCall (iter_participant->first); + call = getAccountLink (currentAccountId)->getCall (iter_participant->first); + + if(call->getConfId() == id) + onHoldCall (iter_participant->first); + + iter_participant++; + + } + + } + } @@ -762,6 +792,36 @@ void ManagerImpl::unHoldConference(const CallID& id) { + _debug ("ManagerImpl::unHoldConference()\n"); + + Conference *conf; + ConferenceMap::iterator iter_conf = _conferencemap.find(id); + + AccountID currentAccountId; + + Call* call = NULL; + + if(iter_conf != _conferencemap.end()) + { + conf = iter_conf->second; + + ConferenceCallMap::iterator iter_participant = _conferencecall.begin(); + + while(iter_participant != _conferencecall.end()) + { + _debug("ManagerImpl::hangupConference participant %s\n", iter_participant->first.c_str()); + currentAccountId = getAccountFromCall (iter_participant->first); + call = getAccountLink (currentAccountId)->getCall (iter_participant->first); + + if(call->getConfId() == id) + offHoldCall (iter_participant->first); + + iter_participant++; + + } + + } + } bool