Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
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 #ifndef mozilla_dom_bluetooth_bluetoothhfpmanager_h__
8 #define mozilla_dom_bluetooth_bluetoothhfpmanager_h__
10 #include "BluetoothHfpManagerBase.h"
12 /**
13 * Fallback BluetoothHfpManager is built for non-phone devices (e.g., tablets).
14 * These devices has no radio interface and the build flag MOZ_B2G_RIL is
15 * disabled. To prevent build breaks of accessing radio interface, we implement
16 * fallback BluetoothHfpManager with empty functions to keep original
17 * BluetoothHfpManager away from numerous #ifdef/#endif statements.
18 */
20 BEGIN_BLUETOOTH_NAMESPACE
22 class BluetoothHfpManager : public BluetoothHfpManagerBase
23 {
24 public:
25 BT_DECL_HFP_MGR_BASE
26 virtual void GetName(nsACString& aName)
27 {
28 aName.AssignLiteral("Fallback HFP/HSP");
29 }
31 static BluetoothHfpManager* Get();
32 virtual ~BluetoothHfpManager() { }
34 bool ConnectSco();
35 bool DisconnectSco();
37 private:
38 BluetoothHfpManager() { }
39 bool Init();
40 void HandleShutdown();
41 };
43 END_BLUETOOTH_NAMESPACE
45 #endif