dom/bluetooth/bluedroid/hfp-fallback/BluetoothHfpManager.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
michael@0 2 /* vim: set ts=2 et sw=2 tw=80: */
michael@0 3 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 4 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
michael@0 5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 6
michael@0 7 #ifndef mozilla_dom_bluetooth_bluetoothhfpmanager_h__
michael@0 8 #define mozilla_dom_bluetooth_bluetoothhfpmanager_h__
michael@0 9
michael@0 10 #include "BluetoothHfpManagerBase.h"
michael@0 11
michael@0 12 /**
michael@0 13 * Fallback BluetoothHfpManager is built for non-phone devices (e.g., tablets).
michael@0 14 * These devices has no radio interface and the build flag MOZ_B2G_RIL is
michael@0 15 * disabled. To prevent build breaks of accessing radio interface, we implement
michael@0 16 * fallback BluetoothHfpManager with empty functions to keep original
michael@0 17 * BluetoothHfpManager away from numerous #ifdef/#endif statements.
michael@0 18 */
michael@0 19
michael@0 20 BEGIN_BLUETOOTH_NAMESPACE
michael@0 21
michael@0 22 class BluetoothHfpManager : public BluetoothHfpManagerBase
michael@0 23 {
michael@0 24 public:
michael@0 25 BT_DECL_HFP_MGR_BASE
michael@0 26 virtual void GetName(nsACString& aName)
michael@0 27 {
michael@0 28 aName.AssignLiteral("Fallback HFP/HSP");
michael@0 29 }
michael@0 30
michael@0 31 static BluetoothHfpManager* Get();
michael@0 32 virtual ~BluetoothHfpManager() { }
michael@0 33
michael@0 34 bool ConnectSco();
michael@0 35 bool DisconnectSco();
michael@0 36
michael@0 37 private:
michael@0 38 BluetoothHfpManager() { }
michael@0 39 bool Init();
michael@0 40 void HandleShutdown();
michael@0 41 };
michael@0 42
michael@0 43 END_BLUETOOTH_NAMESPACE
michael@0 44
michael@0 45 #endif

mercurial