tizonia / tizonia-openmax-il

Command-line cloud music player for Linux with support for Spotify, Google Play Music, YouTube, SoundCloud, TuneIn, iHeartRadio, Plex servers and Chromecast devices.
https://tizonia.org
GNU Lesser General Public License v3.0
1.69k stars 87 forks source link

[Suggestion] Consider using a maintained dbus C++ wrapper #554

Open D4N opened 5 years ago

D4N commented 5 years ago

Description

Tizonia Bundles libdbus-c++ since the library became unmaintained. This is currently causing problems on openSUSE, where this line: https://github.com/tizonia/tizonia-openmax-il/blob/master/3rdparty/dbus-cplusplus/include/dbus-c%2B%2B/util.h#L245 gives us errors during standard builds.

While these issues can be individually fixed, I would personally suggest to use a maintained dbus bindings library, as this should be easier to maintain in the long run. A list of various libraries and bindings can be found here: https://www.freedesktop.org/wiki/Software/DBusBindings/.

I have quickly glanced over the 4 listed C++ bindings and dbus-cxx, sdbus-cpp and (Qt D-Bus)[https://doc.qt.io/qt-5/qtdbus-index.html] appear to be actively maintained.

Dbus-cxx is build on top of libdbus and requires at least C++11. In contrast to sdbus-cpp it is older and has seen more development activity. sdbus-cpp is built on top of systemd's libsdbus and requires C++17. Qt D-Bus is part of Qt and offers also C++ classes but requires Qt as a dependency.

I have not compared their APIs and can thus not asses whether they are even useful for Tizonia.

Please feel free to close this issue at your convenience, as this is merely a suggestion (and not a request or a demand).

P.S.: I have absolutely no idea about the internals of Tizonia, but in case you don't need a C++ library, there is also GDBus or sd-bus (this one is part of systemd), which are both C libraries.

tizonia commented 5 years ago

Hi!, thanks for taking the time.

Yes, I appreciate your suggestion. Unfortunately, this is not an easy problem to resolve and forking bus-cplusplus was not an easy decision to take.

On one hand, there is a considerable investment in replacing one binding with another because each of them has its own API, which means a rewrite of any areas that are involved with the old API. But that wasn't even the most important consideration. I visited at the time the projects that you mention, and I could not find any C++ binding that met all the minimum requirements, which are:

So the only really viable option at the time was forking. I tend to doubt that things have changed very much since them.

In any case, I'll keep this issue open. I'll have a closer look sometime.

tizonia commented 5 years ago

I've created another issue to patch the internal dbus-cplusplus as suggested.

555