diff --git a/daemon/src/dbus/callmanager-introspec.xml b/daemon/src/dbus/callmanager-introspec.xml index ea9e3c76da4fccf8b2ae1e05f557fd13620a4f3f..946fce25e52180cfd57b41c2100eea46791f0fd9 100644 --- a/daemon/src/dbus/callmanager-introspec.xml +++ b/daemon/src/dbus/callmanager-introspec.xml @@ -242,6 +242,7 @@ </tp:docstring> <arg type="s" name="sel_callID" direction="in"/> <arg type="s" name="drag_callID" direction="in"/> + <arg type="b" name="joinSucceeded" direction="out"/> </method> <method name="createConfFromParticipantList" tp:name-for-bindings="createConfFromParticipantList"> diff --git a/daemon/src/dbus/callmanager.cpp b/daemon/src/dbus/callmanager.cpp index cd264827697c41664f7318696eeada328fbba3a4..b92fddeb365290f66fd6a0ee1af5940b17c46183 100644 --- a/daemon/src/dbus/callmanager.cpp +++ b/daemon/src/dbus/callmanager.cpp @@ -170,10 +170,11 @@ CallManager::getVolume(const std::string& device) return 0; } -void -CallManager::joinParticipant(const std::string& sel_callID, const std::string& drag_callID) +bool +CallManager::joinParticipant(const std::string& sel_callID, + const std::string& drag_callID) { - Manager::instance().joinParticipant(sel_callID, drag_callID); + return Manager::instance().joinParticipant(sel_callID, drag_callID); } void diff --git a/daemon/src/dbus/callmanager.h b/daemon/src/dbus/callmanager.h index 445cc235126192fe37874d4699b516049fbda339..d8a70c3476acc8e2da46d8ff0ebef35000ceb1a6 100644 --- a/daemon/src/dbus/callmanager.h +++ b/daemon/src/dbus/callmanager.h @@ -88,7 +88,7 @@ class CallManager bool isValidCall(const std::string &callID); /* Conference related methods */ - void joinParticipant(const std::string& sel_callID, const std::string& drag_callID); + bool joinParticipant(const std::string& sel_callID, const std::string& drag_callID); void createConfFromParticipantList(const std::vector< std::string >& participants); bool addParticipant(const std::string& callID, const std::string& confID); bool addMainParticipant(const std::string& confID); diff --git a/daemon/src/managerimpl.cpp b/daemon/src/managerimpl.cpp index ff7e95ee8dbe9e5c865dc4bcca473eadba6e8616..dae591118b77c0284df6458f44703b6f5e2bbd49 100644 --- a/daemon/src/managerimpl.cpp +++ b/daemon/src/managerimpl.cpp @@ -953,12 +953,12 @@ ManagerImpl::getCallFromCallID(const std::string &callID) return call; } -void ManagerImpl::joinParticipant(const std::string& callId1, const std::string& callId2) +bool +ManagerImpl::joinParticipant(const std::string& callId1, const std::string& callId2) { - DEBUG("Join participants %s, %s", callId1.c_str(), callId2.c_str()); if (callId1 == callId2) { ERROR("Cannot join participant %s to itself", callId1.c_str()); - return; + return false; } // Set corresponding conference ids for call 1 @@ -966,7 +966,7 @@ void ManagerImpl::joinParticipant(const std::string& callId1, const std::string& if (call1 == NULL) { ERROR("Could not find call %s", callId1.c_str()); - return; + return false; } // Set corresponding conderence details @@ -974,7 +974,7 @@ void ManagerImpl::joinParticipant(const std::string& callId1, const std::string& if (call2 == NULL) { ERROR("Could not find call %s", callId2.c_str()); - return; + return false; } std::map<std::string, std::string> call1Details(getCallDetails(callId1)); @@ -1049,6 +1049,7 @@ void ManagerImpl::joinParticipant(const std::string& callId1, const std::string& } getMainBuffer().dumpInfo(); + return true; } void ManagerImpl::createConfFromParticipantList(const std::vector< std::string > &participantList) diff --git a/daemon/src/managerimpl.h b/daemon/src/managerimpl.h index 83cf10c1950ac81e0469dbdb187226df858a3097..0c9c8f9b93d4cf91a4a068054542ec469722ef19 100644 --- a/daemon/src/managerimpl.h +++ b/daemon/src/managerimpl.h @@ -295,7 +295,8 @@ class ManagerImpl { * @param the fist call id * @param the second call id */ - void joinParticipant(const std::string& call_id1, const std::string& call_id2); + bool joinParticipant(const std::string& call_id1, + const std::string& call_id2); /** * Create a conference from a list of participant diff --git a/gnome/src/dbus/callmanager-introspec.xml b/gnome/src/dbus/callmanager-introspec.xml index ea9e3c76da4fccf8b2ae1e05f557fd13620a4f3f..946fce25e52180cfd57b41c2100eea46791f0fd9 100644 --- a/gnome/src/dbus/callmanager-introspec.xml +++ b/gnome/src/dbus/callmanager-introspec.xml @@ -242,6 +242,7 @@ </tp:docstring> <arg type="s" name="sel_callID" direction="in"/> <arg type="s" name="drag_callID" direction="in"/> + <arg type="b" name="joinSucceeded" direction="out"/> </method> <method name="createConfFromParticipantList" tp:name-for-bindings="createConfFromParticipantList"> diff --git a/gnome/src/dbus/dbus.c b/gnome/src/dbus/dbus.c index 7b69b5723413b708e3cfa1d31aba5d646208801f..7c02f495e0a6ff1330201df94814933c7cab3e0b 100644 --- a/gnome/src/dbus/dbus.c +++ b/gnome/src/dbus/dbus.c @@ -1480,7 +1480,9 @@ dbus_join_participant(const gchar *sel_callID, const gchar *drag_callID) { g_debug("Join participant %s and %s\n", sel_callID, drag_callID); GError *error = NULL; - org_sflphone_SFLphone_CallManager_join_participant(call_proxy, sel_callID, drag_callID, &error); + gboolean result; + org_sflphone_SFLphone_CallManager_join_participant(call_proxy, sel_callID, + drag_callID, &result, &error); check_error(error); }