1 /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
2 /* vim: set ts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "BluetoothInterface.h"
8 #ifdef MOZ_B2G_BT_BLUEDROID
9 #include "BluetoothHALInterface.h"
11 #ifdef MOZ_B2G_BT_DAEMON
12 #include "BluetoothDaemonInterface.h"
15 BEGIN_BLUETOOTH_NAMESPACE
21 BluetoothSocketInterface::~BluetoothSocketInterface()
25 // Handsfree Interface
28 // Notification handling
31 BluetoothHandsfreeNotificationHandler::
32 ~BluetoothHandsfreeNotificationHandler()
38 BluetoothHandsfreeInterface::BluetoothHandsfreeInterface()
41 BluetoothHandsfreeInterface::~BluetoothHandsfreeInterface()
45 // Bluetooth Advanced Audio Interface
48 // Notification handling
51 BluetoothA2dpNotificationHandler::~BluetoothA2dpNotificationHandler()
57 BluetoothA2dpInterface::BluetoothA2dpInterface()
60 BluetoothA2dpInterface::~BluetoothA2dpInterface()
64 // Bluetooth AVRCP Interface
67 // Notification handling
70 BluetoothAvrcpNotificationHandler::~BluetoothAvrcpNotificationHandler()
76 BluetoothAvrcpInterface::BluetoothAvrcpInterface()
79 BluetoothAvrcpInterface::~BluetoothAvrcpInterface()
83 // Bluetooth GATT Interface
86 // Notification handling
89 BluetoothGattClientNotificationHandler::~BluetoothGattClientNotificationHandler()
92 BluetoothGattServerNotificationHandler::~BluetoothGattServerNotificationHandler()
95 BluetoothGattNotificationHandler::~BluetoothGattNotificationHandler()
101 BluetoothGattClientInterface::BluetoothGattClientInterface()
104 BluetoothGattClientInterface::~BluetoothGattClientInterface()
107 BluetoothGattInterface::BluetoothGattInterface()
110 BluetoothGattInterface::~BluetoothGattInterface()
114 // Bluetooth Core Interface
117 // Notification handling
120 BluetoothNotificationHandler::~BluetoothNotificationHandler()
127 BluetoothInterface::GetInstance()
129 /* Here's where we decide which implementation to use. Currently
130 * there is only Bluedroid and the Bluetooth daemon, but others are
131 * possible. Having multiple interfaces built-in and selecting the
132 * correct one at runtime could also be an option.
134 #ifdef MOZ_B2G_BT_BLUEDROID
135 return BluetoothHALInterface::GetInstance();
137 #ifdef MOZ_B2G_BT_DAEMON
138 return BluetoothDaemonInterface::GetInstance();
145 BluetoothInterface::BluetoothInterface()
148 BluetoothInterface::~BluetoothInterface()
151 END_BLUETOOTH_NAMESPACE