|
|
Line 253: |
Line 253: |
| "uuids" | | "uuids" |
| }; | | }; |
|
| |
| === Implementation Specifics ===
| |
|
| |
| For communicating with the bluetooth adapter and devices on Firefox OS, we will be using the DBus message system. This allows us to easily access all parts of the bluetooth system on Firefox OS based platforms, without having to worry about GPL licensing issues.
| |
|
| |
| ==== DBus Usage and Licensing ====
| |
|
| |
| Bluetooth on Linux and B2G is accessed via the Bluez bluetooth stack. This stack is GPL, and the libraries that come with it to access bluetooth sockets are also GPL. To remove the licensing issues involved with this, the DBus communications layer is used to provide an IPC route for bluetooth related code. The WebBluetooth API (on Linux and Firefox OS) will use DBus to keep the code compatible with the MPL.
| |
|
| |
| ==== DBus on Linux and Android ====
| |
|
| |
| There are many ways to access DBus from code. On linux, gecko already uses the glib bindings for battery information on linux ([https://github.com/doublec/mozilla-central/blob/master/hal/linux/UPowerClient.cpp UPowerClient.cpp]).
| |
| Android uses the low level DBus bindings, mainly made for writing language binding systems. This tends to create very complicated code, which even the DBus maintainers warn developers off of (See [http://dbus.freedesktop.org/doc/api/html/ DBus API Documentation]). Even so, due to the [http://gitorious.org/dbus-cplusplus dbus-c++] library depending on exceptions (though the Chromium project is working on fixing that) and not wanting to fold in glib to Firefox OS, we'll be using the low-level DBus API for Firefox OS's WebBluetooth layer.
| |
|
| |
|
| === Links === | | === Links === |