Commit 7d128fac authored by Adrien Béraud's avatar Adrien Béraud Committed by Philippe Gorley

dring: remove pollEvents API

Change-Id: I37ef6f70abdfa39ae0fc8c89e271565cf3cea4e5
parent 08d0c727
......@@ -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;
......
......@@ -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);
}
......@@ -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();
......
......@@ -178,7 +178,6 @@ run()
return -1;
while (loop) {
DRing::pollEvents();
Sleep(1000); // milliseconds
}
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment