simppl icon indicating copy to clipboard operation
simppl copied to clipboard

Dispatcher interface

Open sstiller opened this issue 8 years ago • 1 comments

Hello, your lib seems to be interesting for simple interfaces. What du you think about a virtual dispatcher class providing a (protected) access to the filedescriptor (for external polling of the dbus connection) and virtual methods for the timer handling? With this feature, the library can be integrated with frameworks like boost::asio::io_service, ecore, Qt, glib(mm), ... dbus-cplusplus provides such an interface.

sstiller avatar Sep 26 '16 12:09 sstiller

Hi Sandro,

you're right, we have started to use the API in our own commercial project and boost::asio support is what I want to have, too. For now, the generator side of the API was in my focus. I already have a much more simplified DSL in a separate branch which defines in and out parameters instead of Requests and Responses.

The dispatcher currently is a comglomeration of multiple tasks and should probably be redesigned, maybe also using correct DBus naming. But for now, you can retrieve the DBusConnection from the Dispatcher and set up your own asio integration by implementing the C DBus callouts. I did this for other eventloop integration. The project dbus-cpp on Launchpad which is driven by the Ubuntu tablet team has such an integration: see http://bazaar.launchpad.net/~phablet-team/dbus-cpp/trunk/view/head:/src/core/dbus/asio/executor.cpp .

Hope that helps.

Regards, Martin

2016-09-26 14:58 GMT+02:00 Sandro Stiller [email protected]:

Hello, your lib seems to be interesting for simple interfaces. What du you think about a virtual dispatcher class providing a (protected) access to the filedescriptor (for external polling of the dbus connection) and virtual methods for the timer handling? With this feature, the library can be integrated with frameworks like boost::asio::io_service, ecore, Qt, glib(mm), ... dbus-cplusplus provides such an interface.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/martinhaefner/simppl/issues/5, or mute the thread https://github.com/notifications/unsubscribe-auth/ABM5jHGfzbp_sh25tMMcK5BI5RDZLw3Sks5qt8GTgaJpZM4KGfho .

martinhaefner1 avatar Sep 26 '16 21:09 martinhaefner1