mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
[#2006] Add joinConference capabilities
This commit is contained in:
@ -901,7 +901,7 @@ sflphone_add_conference()
|
||||
sflphone_join_conference(const gchar* sel_confID, const gchar* drag_confID)
|
||||
{
|
||||
DEBUG("sflphone join two conference");
|
||||
dbus_join_conference(sel_confID, sel_confID);
|
||||
dbus_join_conference(sel_confID, drag_confID);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1136,6 +1136,7 @@ void drag_data_received_cb(GtkWidget *widget, GdkDragContext *context, gint x, g
|
||||
else
|
||||
{
|
||||
dragged_call_id = ((conference_obj_t*)g_value_get_pointer(&val))->_confID;
|
||||
dragged_conf = (conference_obj_t*)g_value_get_pointer(&val);
|
||||
}
|
||||
g_print(" INTO_OR_AFTER dragged_path %s, dragged_call_id %s, dragged_path_depth %i\n", dragged_path, dragged_call_id, dragged_path_depth);
|
||||
break;
|
||||
@ -1159,6 +1160,7 @@ void drag_data_received_cb(GtkWidget *widget, GdkDragContext *context, gint x, g
|
||||
else
|
||||
{
|
||||
dragged_call_id = ((conference_obj_t*)g_value_get_pointer(&val))->_confID;
|
||||
dragged_conf = (conference_obj_t*)g_value_get_pointer(&val);
|
||||
}
|
||||
g_print(" INTO_OR_BEFORE dragged_path %s, dragged_call_id %s, dragged_path_depth %i\n", dragged_path, dragged_call_id, dragged_path_depth);
|
||||
break;
|
||||
|
@ -157,7 +157,7 @@ CallManager::detachParticipant (const std::string& callID)
|
||||
void
|
||||
CallManager::joinConference (const std::string& sel_confID, const std::string& drag_confID)
|
||||
{
|
||||
_debug ("CallManager::joinParticipant received %s, %s\n", sel_confID.c_str(), drag_confID.c_str());
|
||||
_debug ("CallManager::joinConference received %s, %s\n", sel_confID.c_str(), drag_confID.c_str());
|
||||
Manager::instance().joinConference(sel_confID, drag_confID);
|
||||
}
|
||||
|
||||
|
@ -979,6 +979,7 @@ ManagerImpl::addParticipant(const CallID& call_id, const CallID& conference_id)
|
||||
// store the current call id (it will change in offHoldCall or in answerCall)
|
||||
CallID current_call_id = getCurrentCallId();
|
||||
|
||||
_debug(" addParticipant: enter main process\n");
|
||||
if(iter != _conferencemap.end()) {
|
||||
|
||||
Conference* conf = iter->second;
|
||||
@ -1022,6 +1023,9 @@ ManagerImpl::addParticipant(const CallID& call_id, const CallID& conference_id)
|
||||
|
||||
_dbus->getCallManager()->conferenceChanged(conference_id, conf->getStateStr());
|
||||
}
|
||||
{
|
||||
_debug(" addParticipant: Error, conference %s conference_id not found!\n", conference_id.c_str());
|
||||
}
|
||||
|
||||
|
||||
// bind main participant to conference after adding new participant
|
||||
@ -1362,10 +1366,12 @@ ManagerImpl::processRemainingParticipant(CallID current_call_id, Conference *con
|
||||
void
|
||||
ManagerImpl::joinConference(const CallID& conf_id1, const CallID& conf_id2)
|
||||
{
|
||||
_debug("ManagerImpl::joinConference(%s, %s)\n", conf_id1.c_str(), conf_id2.c_str());
|
||||
|
||||
ConferenceMap::iterator iter;
|
||||
|
||||
Conference *conf1;
|
||||
Conference *conf2;
|
||||
Conference *conf1 = NULL;
|
||||
Conference *conf2 = NULL;
|
||||
|
||||
iter = _conferencemap.find(conf_id1);
|
||||
|
||||
@ -1377,6 +1383,19 @@ ManagerImpl::joinConference(const CallID& conf_id1, const CallID& conf_id2)
|
||||
if(iter != _conferencemap.end())
|
||||
conf2 = iter->second;
|
||||
|
||||
ParticipantSet participants = conf1->getParticipantList();
|
||||
|
||||
ParticipantSet::iterator iter_participant = participants.begin();
|
||||
|
||||
while(iter_participant != participants.end())
|
||||
{
|
||||
detachParticipant(*iter_participant, "");
|
||||
addParticipant(*iter_participant, conf_id2);
|
||||
|
||||
iter_participant++;
|
||||
}
|
||||
|
||||
// detachParticipant(default_id, "");
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user