Bug 1156716: Build GATT backend as part of Bluetooth v1, r=joliu

This patch enables building the GATT backend code in Bluetooth v1. V1 still
doesn't support GATT, only some of the code gets build.
This commit is contained in:
Thomas Zimmermann 2015-04-23 10:43:51 +02:00
parent 9869595612
commit 8190fe227a
2 changed files with 1 additions and 18 deletions

View File

@ -8,11 +8,7 @@
#include "BluetoothHALHelpers.h"
#include "BluetoothA2dpHALInterface.h"
#include "BluetoothAvrcpHALInterface.h"
#ifdef MOZ_B2G_BT_API_V2
#include "BluetoothGattHALInterface.h"
#else
// TODO: Support GATT
#endif
#include "BluetoothHandsfreeHALInterface.h"
#include "BluetoothSocketHALInterface.h"
@ -68,7 +64,6 @@ struct interface_traits<BluetoothAvrcpHALInterface>
};
#endif
#ifdef MOZ_B2G_BT_API_V2
#if ANDROID_VERSION >= 19
template<>
struct interface_traits<BluetoothGattHALInterface>
@ -81,9 +76,6 @@ struct interface_traits<BluetoothGattHALInterface>
}
};
#endif
#else
// TODO: Support GATT
#endif
typedef
BluetoothHALInterfaceRunnable0<BluetoothResultHandler, void>
@ -1020,7 +1012,6 @@ BluetoothHALInterface::CreateProfileInterface<BluetoothAvrcpHALInterface>()
}
#endif
#ifdef MOZ_B2G_BT_API_V2
#if ANDROID_VERSION < 19
/*
* Versions that we don't support GATT will call this function
@ -1036,9 +1027,6 @@ BluetoothHALInterface::CreateProfileInterface<BluetoothGattHALInterface>()
return new BluetoothGattHALInterface();
}
#endif
#else
// TODO: Support GATT
#endif
template <class T>
T*
@ -1082,12 +1070,7 @@ BluetoothHALInterface::GetBluetoothAvrcpInterface()
BluetoothGattInterface*
BluetoothHALInterface::GetBluetoothGattInterface()
{
#ifdef MOZ_B2G_BT_API_V2
return GetProfileInterface<BluetoothGattHALInterface>();
#else
// TODO: Support GATT
return nullptr;
#endif
}
END_BLUETOOTH_NAMESPACE

View File

@ -98,6 +98,7 @@ if CONFIG['MOZ_B2G_BT']:
'bluedroid/BluetoothDaemonInterface.cpp',
'bluedroid/BluetoothDaemonSetupInterface.cpp',
'bluedroid/BluetoothDaemonSocketInterface.cpp',
'bluedroid/BluetoothGattHALInterface.cpp',
'bluedroid/BluetoothHALHelpers.cpp',
'bluedroid/BluetoothHALInterface.cpp',
'bluedroid/BluetoothHandsfreeHALInterface.cpp',
@ -127,7 +128,6 @@ if CONFIG['MOZ_B2G_BT']:
]
if CONFIG['MOZ_B2G_BT_API_V2']:
SOURCES += [
'bluedroid/BluetoothGattHALInterface.cpp',
'bluedroid/BluetoothGattManager.cpp',
]