diff --git a/bin/dbus/dbusclient.cpp b/bin/dbus/dbusclient.cpp index 4fd4a721e337eff8f98efe06b375c95785970f12..c12ef98c4667c2e5e08430ec834f39299f50df17 100644 --- a/bin/dbus/dbusclient.cpp +++ b/bin/dbus/dbusclient.cpp @@ -72,12 +72,6 @@ DBusClient::DBusClient(int flags, bool persistent) DBus::_init_threading(); DBus::default_dispatcher = dispatcher_.get(); - // timeout and expired are deleted internally by dispatcher_'s - // destructor, so we must NOT delete them ourselves. - timeout_.reset(new DBus::DefaultTimeout {10 /* ms */, true, dispatcher_.get()}); - // Poll for Deamon events - timeout_->expired = new EventCallback {DRing::pollEvents}; - DBus::Connection sessionConnection {DBus::Connection::SessionBus()}; sessionConnection.request_name("cx.ring.Ring"); @@ -116,7 +110,6 @@ DBusClient::~DBusClient() presenceManager_.reset(); configurationManager_.reset(); callManager_.reset(); - timeout_.reset(); } int @@ -264,7 +257,6 @@ DBusClient::exit() noexcept { try { dispatcher_->leave(); - timeout_->expired = new EventCallback([] {}); finiLibrary(); } catch (const DBus::Error& err) { std::cerr << "quitting: " << err.name() << ": " << err.what() << std::endl; diff --git a/bin/jni/managerimpl.i b/bin/jni/managerimpl.i index e7511337fa8e2caeb94ba55d80e0c36f37672ae9..cf3b0cae2abb834a776ead4cee3e212a53948105 100644 --- a/bin/jni/managerimpl.i +++ b/bin/jni/managerimpl.i @@ -27,13 +27,8 @@ namespace DRing { /** - * Finalizes libsflphone, freeing any resource allocated by the library. + * Finalizes the daemon, freeing any resource allocated by the library. */ void fini(void); -/** - * Poll for events - */ -void pollEvents(void); - } diff --git a/bin/osxmain.cpp b/bin/osxmain.cpp index fee2070ef03992a7623a45ebd59cf583b868da28..b79507e8fcf4cf0cc670786a461b909d42a4e365 100644 --- a/bin/osxmain.cpp +++ b/bin/osxmain.cpp @@ -157,8 +157,7 @@ osxTests() return -1; while (true) { - DRing::pollEvents(); - std::this_thread::sleep_for(std::chrono::milliseconds(10)); + std::this_thread::sleep_for(std::chrono::seconds(1)); } DRing::fini(); diff --git a/bin/winmain.cpp b/bin/winmain.cpp index 41ce46ef68be55ca1b4b8b4bfd6b1091d010eb69..d72db9e1fdadfe940354c49dd8d934a6396f7a88 100644 --- a/bin/winmain.cpp +++ b/bin/winmain.cpp @@ -178,7 +178,6 @@ run() return -1; while (loop) { - DRing::pollEvents(); Sleep(1000); // milliseconds } diff --git a/src/dring/dring.h b/src/dring/dring.h index dd7f2a89c59047a6d935f184ba6c2862dc746171..4c9d12a67bf8860298f4f73462198d6f760e3aae 100644 --- a/src/dring/dring.h +++ b/src/dring/dring.h @@ -61,14 +61,6 @@ bool start(const std::string& config_file={}) noexcept; */ void fini() noexcept; -/** - * Poll daemon events. - * This function has to be called by user at a fixed frequency - * to let daemon checks its internal ressources and io and - * manages events reported by them. - */ -void pollEvents() noexcept; - /* External Callback Dynamic Utilities * * The library provides to users a way to be acknowledged