gecko-dev/dom/bluetooth/BluetoothInterface.cpp
Thomas Zimmermann 30444a212d 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.

--HG--
rename : dom/bluetooth/bluedroid/BluetoothInterface.cpp => dom/bluetooth/bluedroid/BluetoothHALInterface.cpp
2014-09-11 12:23:01 +02:00

110 lines
2.0 KiB
C++

/* -*- 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