forked from Floorp-Projects/Floorp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1061489: Move Bluedroid code out of BluetoothInterface.{cpp,h}, r…
…=shuang This patch moves BluetoothInterface.{cpp,h} to the generic section of Gecko's Bluetooth code, and the Bluedroid implementation into the new files BluetoothHalImplementation.{cpp,h}. BluetoothHalImplementation.{cpp,h} contains all Bluedroid-specific code. The classes in BluetoothInterface.{cpp,h} are now interfaces for Gecko.
- Loading branch information
Showing
5 changed files
with
963 additions
and
582 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */ | ||
/* vim: set ts=2 et sw=2 tw=80: */ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
#include "BluetoothInterface.h" | ||
#ifdef MOZ_B2G_BT_BLUEDROID | ||
#include "BluetoothHALInterface.h" | ||
#endif | ||
|
||
BEGIN_BLUETOOTH_NAMESPACE | ||
|
||
// | ||
// Socket Interface | ||
// | ||
|
||
BluetoothSocketInterface::~BluetoothSocketInterface() | ||
{ } | ||
|
||
// | ||
// Handsfree Interface | ||
// | ||
|
||
// Notification handling | ||
// | ||
|
||
BluetoothHandsfreeNotificationHandler:: | ||
~BluetoothHandsfreeNotificationHandler() | ||
{ } | ||
|
||
// Interface | ||
// | ||
|
||
BluetoothHandsfreeInterface::BluetoothHandsfreeInterface() | ||
{ } | ||
|
||
BluetoothHandsfreeInterface::~BluetoothHandsfreeInterface() | ||
{ } | ||
|
||
// | ||
// Bluetooth Advanced Audio Interface | ||
// | ||
|
||
// Notification handling | ||
// | ||
|
||
BluetoothA2dpNotificationHandler::~BluetoothA2dpNotificationHandler() | ||
{ } | ||
|
||
// Interface | ||
// | ||
|
||
BluetoothA2dpInterface::BluetoothA2dpInterface() | ||
{ } | ||
|
||
BluetoothA2dpInterface::~BluetoothA2dpInterface() | ||
{ } | ||
|
||
// | ||
// Bluetooth AVRCP Interface | ||
// | ||
|
||
// Notification handling | ||
// | ||
|
||
BluetoothAvrcpNotificationHandler::~BluetoothAvrcpNotificationHandler() | ||
{ } | ||
|
||
// Interface | ||
// | ||
|
||
BluetoothAvrcpInterface::BluetoothAvrcpInterface() | ||
{ } | ||
|
||
BluetoothAvrcpInterface::~BluetoothAvrcpInterface() | ||
{ } | ||
|
||
// Notification handling | ||
// | ||
|
||
BluetoothNotificationHandler::~BluetoothNotificationHandler() | ||
{ } | ||
|
||
// Interface | ||
// | ||
|
||
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. | ||
*/ | ||
#ifdef MOZ_B2G_BT_BLUEDROID | ||
return BluetoothHALInterface::GetInstance(); | ||
#else | ||
return nullptr; | ||
#endif | ||
} | ||
|
||
BluetoothInterface::BluetoothInterface() | ||
{ } | ||
|
||
BluetoothInterface::~BluetoothInterface() | ||
{ } | ||
|
||
END_BLUETOOTH_NAMESPACE |
Oops, something went wrong.