mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1091575: Add support for Bluetooth daemon backend (under bluetooth2/), r=btian
This commit is contained in:
parent
4a0e8a500e
commit
b59b33a1d8
@ -8,6 +8,9 @@
|
||||
#ifdef MOZ_B2G_BT_BLUEDROID
|
||||
#include "BluetoothHALInterface.h"
|
||||
#endif
|
||||
#ifdef MOZ_B2G_BT_DAEMON
|
||||
#include "BluetoothDaemonInterface.h"
|
||||
#endif
|
||||
|
||||
BEGIN_BLUETOOTH_NAMESPACE
|
||||
|
||||
@ -124,15 +127,19 @@ BluetoothInterface*
|
||||
BluetoothInterface::GetInstance()
|
||||
{
|
||||
/* Here's where we decide which implementation to use. Currently
|
||||
* there is only Bluedroid, but others are possible. Having multiple
|
||||
* interfaces built-in and selecting the correct one at runtime could
|
||||
* also be an option.
|
||||
* there is only Bluedroid and the Bluetooth daemon, but others are
|
||||
* possible. Having multiple interfaces built-in and selecting the
|
||||
* correct one at runtime could also be an option.
|
||||
*/
|
||||
#ifdef MOZ_B2G_BT_BLUEDROID
|
||||
return BluetoothHALInterface::GetInstance();
|
||||
#else
|
||||
#ifdef MOZ_B2G_BT_DAEMON
|
||||
return BluetoothDaemonInterface::GetInstance();
|
||||
#else
|
||||
return nullptr;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
BluetoothInterface::BluetoothInterface()
|
||||
|
@ -52,6 +52,13 @@
|
||||
/**
|
||||
* B2G bluedroid:
|
||||
* MOZ_B2G_BT and MOZ_B2G_BT_BLUEDROID are both defined;
|
||||
* MOZ_B2G_BLUEZ or MOZ_B2G_DAEMON are not defined.
|
||||
*/
|
||||
#include "BluetoothServiceBluedroid.h"
|
||||
#elif defined(MOZ_B2G_BT_DAEMON)
|
||||
/**
|
||||
* B2G Bluetooth daemon:
|
||||
* MOZ_B2G_BT, MOZ_B2G_BLUEDROID and MOZ_B2G_BT_DAEMON are defined;
|
||||
* MOZ_B2G_BLUEZ is not defined.
|
||||
*/
|
||||
#include "BluetoothServiceBluedroid.h"
|
||||
@ -228,6 +235,8 @@ BluetoothService::Create()
|
||||
return new BluetoothDBusService();
|
||||
#elif defined(MOZ_B2G_BT_BLUEDROID)
|
||||
return new BluetoothServiceBluedroid();
|
||||
#elif defined(MOZ_B2G_BT_DAEMON)
|
||||
return new BluetoothServiceBluedroid();
|
||||
#endif
|
||||
#elif defined(MOZ_BLUETOOTH_DBUS)
|
||||
return new BluetoothDBusService();
|
||||
|
Loading…
Reference in New Issue
Block a user