From 616e2df75b1e82aeb5b8d47b5d0490c9e9cbc18d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20B=C3=A9raud?= Date: Mon, 11 Nov 2019 14:52:23 -0500 Subject: [PATCH] callmanager: remove unused signals Change-Id: Ia5659f670e4f1164afc1ac1016c9dd7fc187d0f3 --- bin/dbus/cx.ring.Ring.CallManager.xml | 24 ------------------------ bin/dbus/dbusclient.cpp | 1 - bin/jni/callmanager.i | 2 -- bin/jni/jni_interface.i | 1 - bin/nodejs/callback.h | 16 ---------------- bin/nodejs/callmanager.i | 2 -- bin/nodejs/nodejs_interface.i | 1 - src/client/ring_signal.cpp | 2 -- src/dring/callmanager_interface.h | 8 -------- src/manager.cpp | 2 -- 10 files changed, 59 deletions(-) diff --git a/bin/dbus/cx.ring.Ring.CallManager.xml b/bin/dbus/cx.ring.Ring.CallManager.xml index 93c9eaab0..f86788d03 100644 --- a/bin/dbus/cx.ring.Ring.CallManager.xml +++ b/bin/dbus/cx.ring.Ring.CallManager.xml @@ -490,30 +490,6 @@ - - -

Notify that a call has been created.

-

The callID generated by the daemon must be stored by the clients in order to address other actions for - this call. This signal is emitted when call haves been created by the daemon itself.

- The client must subscribe to this signal to handle calls created by other clients -
- - - The account ID of the call. Clients must notify the right account when receiving this signal. - - - - - A new call ID. - - - - - The SIP URI this call is trying to reach. - - -
-

Notify an incoming call.

diff --git a/bin/dbus/dbusclient.cpp b/bin/dbus/dbusclient.cpp index d8bc7935e..d40f2b097 100644 --- a/bin/dbus/dbusclient.cpp +++ b/bin/dbus/dbusclient.cpp @@ -156,7 +156,6 @@ DBusClient::initLibrary(int flags) exportable_callback(bind(&DBusCallManager::conferenceChanged, callM, _1, _2)), exportable_callback(bind(&DBusCallManager::updatePlaybackScale, callM, _1, _2, _3)), exportable_callback(bind(&DBusCallManager::conferenceRemoved, callM, _1)), - exportable_callback(bind(&DBusCallManager::newCallCreated, callM, _1, _2, _3)), exportable_callback(bind(&DBusCallManager::recordingStateChanged, callM, _1, _2)), exportable_callback(bind(&DBusCallManager::secureSdesOn, callM, _1)), exportable_callback(bind(&DBusCallManager::secureSdesOff, callM, _1)), diff --git a/bin/jni/callmanager.i b/bin/jni/callmanager.i index 41202f014..0a38464a2 100644 --- a/bin/jni/callmanager.i +++ b/bin/jni/callmanager.i @@ -39,7 +39,6 @@ public: virtual void conferenceCreated(const std::string& conf_id){} virtual void conferenceChanged(const std::string& conf_id, const std::string& state){} virtual void conferenceRemoved(const std::string& conf_id){} - virtual void newCallCreated(const std::string& call_id, const std::string&, const std::string&){} virtual void updatePlaybackScale(const std::string& filepath, int position, int scale){} virtual void conferenceRemove(const std::string& conf_id){} virtual void newCall(const std::string& account_id, const std::string& call_id, const std::string& to){} @@ -125,7 +124,6 @@ public: virtual void conferenceCreated(const std::string& conf_id){} virtual void conferenceChanged(const std::string& conf_id, const std::string& state){} virtual void conferenceRemoved(const std::string& conf_id){} - virtual void newCallCreated(const std::string& call_id, const std::string&, const std::string&){} virtual void updatePlaybackScale(const std::string& filepath, int position, int scale){} virtual void conferenceRemove(const std::string& conf_id){} virtual void newCall(const std::string& account_id, const std::string& call_id, const std::string& to){} diff --git a/bin/jni/jni_interface.i b/bin/jni/jni_interface.i index c0e8c0e72..463a8b4bd 100644 --- a/bin/jni/jni_interface.i +++ b/bin/jni/jni_interface.i @@ -235,7 +235,6 @@ void init(ConfigurationCallback* confM, Callback* callM, PresenceCallback* presM exportable_callback(bind(&Callback::conferenceChanged, callM, _1, _2)), exportable_callback(bind(&Callback::updatePlaybackScale, callM, _1, _2, _3)), exportable_callback(bind(&Callback::conferenceRemoved, callM, _1)), - exportable_callback(bind(&Callback::newCallCreated, callM, _1, _2, _3)), exportable_callback(bind(&Callback::recordingStateChanged, callM, _1, _2)), exportable_callback(bind(&Callback::onRtcpReportReceived, callM, _1, _2)), exportable_callback(bind(&Callback::peerHold, callM, _1, _2)) diff --git a/bin/nodejs/callback.h b/bin/nodejs/callback.h index 823f908ab..1cfb23850 100755 --- a/bin/nodejs/callback.h +++ b/bin/nodejs/callback.h @@ -24,7 +24,6 @@ Persistent registeredNameFoundCb; Persistent callStateChangedCb; Persistent incomingMessageCb; Persistent incomingCallCb; -Persistent newCallCreatedCb; std::queue> pendingSignals; std::mutex pendingSignalsLock; @@ -62,8 +61,6 @@ Persistent* getPresistentCb(const std::string &signal) { return &incomingMessageCb; else if (signal == "IncomingCall") return &incomingCallCb; - else if (signal == "NewCallCreated") - return &newCallCreatedCb; else return nullptr; } @@ -329,16 +326,3 @@ void incomingCall(const std::string& account_id, const std::string& call_id, con uv_async_send(&signalAsync); } -void newCallCreated(const std::string& account_id, const std::string& call_id, const std::string& to_uri) { - - std::lock_guard lock(pendingSignalsLock); - pendingSignals.emplace([account_id, call_id, to_uri]() { - Local func = Local::New(Isolate::GetCurrent(), newCallCreatedCb); - if (!func.IsEmpty()) { - Local callback_args[] = {V8_STRING_NEW(account_id), V8_STRING_NEW(call_id), V8_STRING_NEW(to_uri)}; - func->Call(SWIGV8_CURRENT_CONTEXT()->Global(), 3, callback_args); - } - }); - - uv_async_send(&signalAsync); -} \ No newline at end of file diff --git a/bin/nodejs/callmanager.i b/bin/nodejs/callmanager.i index 3e6aeb297..b06f78499 100644 --- a/bin/nodejs/callmanager.i +++ b/bin/nodejs/callmanager.i @@ -39,7 +39,6 @@ public: virtual void conferenceCreated(const std::string& conf_id){} virtual void conferenceChanged(const std::string& conf_id, const std::string& state){} virtual void conferenceRemoved(const std::string& conf_id){} - virtual void newCallCreated(const std::string& call_id, const std::string&, const std::string&){} virtual void updatePlaybackScale(const std::string& filepath, int position, int scale){} virtual void conferenceRemove(const std::string& conf_id){} virtual void newCall(const std::string& account_id, const std::string& call_id, const std::string& to){} @@ -125,7 +124,6 @@ public: virtual void conferenceCreated(const std::string& conf_id){} virtual void conferenceChanged(const std::string& conf_id, const std::string& state){} virtual void conferenceRemoved(const std::string& conf_id){} - virtual void newCallCreated(const std::string& call_id, const std::string&, const std::string&){} virtual void updatePlaybackScale(const std::string& filepath, int position, int scale){} virtual void conferenceRemove(const std::string& conf_id){} virtual void newCall(const std::string& account_id, const std::string& call_id, const std::string& to){} diff --git a/bin/nodejs/nodejs_interface.i b/bin/nodejs/nodejs_interface.i index 2b46a2c43..246d77032 100644 --- a/bin/nodejs/nodejs_interface.i +++ b/bin/nodejs/nodejs_interface.i @@ -136,7 +136,6 @@ void init(const v8::Handle &funcMap){ exportable_callback(bind(&incomingMessage, _1, _2, _3)), exportable_callback(bind(&voiceMailNotify, _1, _2, _3, _4)), exportable_callback(bind(&incomingCall, _1, _2, _3)), - exportable_callback(bind(&newCallCreated, _1, _2, _3)) }; const std::map configEvHandlers = { diff --git a/src/client/ring_signal.cpp b/src/client/ring_signal.cpp index 90a75c532..8e11d6c67 100644 --- a/src/client/ring_signal.cpp +++ b/src/client/ring_signal.cpp @@ -39,8 +39,6 @@ getSignalHandlers() exported_callback(), exported_callback(), exported_callback(), - exported_callback(), - exported_callback(), exported_callback(), exported_callback(), exported_callback(), diff --git a/src/dring/callmanager_interface.h b/src/dring/callmanager_interface.h index 4a50f2b5c..19c1b5a54 100644 --- a/src/dring/callmanager_interface.h +++ b/src/dring/callmanager_interface.h @@ -153,14 +153,6 @@ struct DRING_PUBLIC CallSignal { constexpr static const char* name = "ConferenceRemoved"; using cb_type = void(const std::string&); }; - struct DRING_PUBLIC NewCallCreated { - constexpr static const char* name = "NewCallCreated"; - using cb_type = void(const std::string&, const std::string&, const std::string&); - }; - struct DRING_PUBLIC SipCallStateChanged { - constexpr static const char* name = "SipCallStateChanged"; - using cb_type = void(const std::string&, const std::string&, int); - }; struct DRING_PUBLIC RecordingStateChanged { constexpr static const char* name = "RecordingStateChanged"; using cb_type = void(const std::string&, int); diff --git a/src/manager.cpp b/src/manager.cpp index 2ed1d8b6d..208deb617 100644 --- a/src/manager.cpp +++ b/src/manager.cpp @@ -1435,8 +1435,6 @@ Manager::createConfFromParticipantList(const std::vector< std::string > &partici // Manager methods may behave differently if the call id participates in a conference conf->add(call_id); - - emitSignal(account, call_id, tostr); successCounter++; }