From 2ebc78ae948fc9fc8cc62369fc896137a33fa5fc Mon Sep 17 00:00:00 2001 From: Tristan Matthews <tristan.matthews@savoirfairelinux.com> Date: Thu, 23 May 2013 16:27:58 -0400 Subject: [PATCH] * #24789: dbus: hangupCall/Conference returns a boolean --- daemon/src/dbus/callmanager-introspec.xml | 10 ++++++++++ daemon/src/dbus/callmanager.cpp | 8 ++++---- daemon/src/dbus/callmanager.h | 4 ++-- gnome/src/dbus/callmanager-introspec.xml | 10 ++++++++++ gnome/src/dbus/dbus.c | 4 +++- 5 files changed, 29 insertions(+), 7 deletions(-) diff --git a/daemon/src/dbus/callmanager-introspec.xml b/daemon/src/dbus/callmanager-introspec.xml index bf819e5cb6..a7ce5f874e 100644 --- a/daemon/src/dbus/callmanager-introspec.xml +++ b/daemon/src/dbus/callmanager-introspec.xml @@ -81,6 +81,11 @@ The callID. </tp:docstring> </arg> + <arg type="b" name="isHungUp" direction="out"> + <tp:docstring> + Returns true is the call has been hungup. False otherwise. + </tp:docstring> + </arg> </method> <method name="hangUpConference" tp:name-for-bindings="hangUpConference"> @@ -93,6 +98,11 @@ The unique conference ID. </tp:docstring> </arg> + <arg type="b" name="isHungUp" direction="out"> + <tp:docstring> + Returns true is the conference has been hungup. False otherwise. + </tp:docstring> + </arg> </method> <method name="hold" tp:name-for-bindings="hold"> diff --git a/daemon/src/dbus/callmanager.cpp b/daemon/src/dbus/callmanager.cpp index 2f8464a7f5..31160fb586 100644 --- a/daemon/src/dbus/callmanager.cpp +++ b/daemon/src/dbus/callmanager.cpp @@ -96,16 +96,16 @@ CallManager::accept(const std::string& callID) Manager::instance().answerCall(callID); } -void +bool CallManager::hangUp(const std::string& callID) { - Manager::instance().hangupCall(callID); + return Manager::instance().hangupCall(callID); } -void +bool CallManager::hangUpConference(const std::string& confID) { - Manager::instance().hangupConference(confID); + return Manager::instance().hangupConference(confID); } void diff --git a/daemon/src/dbus/callmanager.h b/daemon/src/dbus/callmanager.h index 0c04eca075..143ae318b0 100644 --- a/daemon/src/dbus/callmanager.h +++ b/daemon/src/dbus/callmanager.h @@ -78,7 +78,7 @@ class CallManager void refuse(const std::string& callID); void accept(const std::string& callID); - void hangUp(const std::string& callID); + bool hangUp(const std::string& callID); void hold(const std::string& callID); void unhold(const std::string& callID); void transfer(const std::string& callID, const std::string& to); @@ -94,7 +94,7 @@ class CallManager void addMainParticipant(const std::string& confID); void detachParticipant(const std::string& callID); void joinConference(const std::string& sel_confID, const std::string& drag_confID); - void hangUpConference(const std::string& confID); + bool hangUpConference(const std::string& confID); void holdConference(const std::string& confID); void unholdConference(const std::string& confID); std::vector<std::string> getConferenceList(); diff --git a/gnome/src/dbus/callmanager-introspec.xml b/gnome/src/dbus/callmanager-introspec.xml index bf819e5cb6..a7ce5f874e 100644 --- a/gnome/src/dbus/callmanager-introspec.xml +++ b/gnome/src/dbus/callmanager-introspec.xml @@ -81,6 +81,11 @@ The callID. </tp:docstring> </arg> + <arg type="b" name="isHungUp" direction="out"> + <tp:docstring> + Returns true is the call has been hungup. False otherwise. + </tp:docstring> + </arg> </method> <method name="hangUpConference" tp:name-for-bindings="hangUpConference"> @@ -93,6 +98,11 @@ The unique conference ID. </tp:docstring> </arg> + <arg type="b" name="isHungUp" direction="out"> + <tp:docstring> + Returns true is the conference has been hungup. False otherwise. + </tp:docstring> + </arg> </method> <method name="hold" tp:name-for-bindings="hold"> diff --git a/gnome/src/dbus/dbus.c b/gnome/src/dbus/dbus.c index 167c1f2f61..41f002c9e4 100644 --- a/gnome/src/dbus/dbus.c +++ b/gnome/src/dbus/dbus.c @@ -972,8 +972,10 @@ dbus_stop_recorded_file_playback(const gchar *filepath) } static void -hang_up_reply_cb(G_GNUC_UNUSED DBusGProxy *proxy, GError *error, G_GNUC_UNUSED gpointer userdata) +hang_up_reply_cb(G_GNUC_UNUSED DBusGProxy *proxy, gboolean is_hung_up, GError *error, G_GNUC_UNUSED gpointer userdata) { + if (!is_hung_up) + g_warning("Did not hang up properly"); check_error(error); } -- GitLab