2012-07-18 03:41:54 +00:00
|
|
|
/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
|
2012-08-17 02:53:45 +00:00
|
|
|
/* vim: set ts=2 et sw=2 tw=80: */
|
2012-07-18 03:41:54 +00:00
|
|
|
/* 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/. */
|
|
|
|
|
|
|
|
#ifndef mozilla_dom_bluetooth_bluetootheventservice_h__
|
|
|
|
#define mozilla_dom_bluetooth_bluetootheventservice_h__
|
|
|
|
|
2012-09-06 14:15:36 +00:00
|
|
|
#include "BluetoothCommon.h"
|
2013-05-10 06:39:12 +00:00
|
|
|
#include "BluetoothProfileManagerBase.h"
|
2012-09-28 10:59:12 +00:00
|
|
|
#include "mozilla/dom/ipc/Blob.h"
|
2012-09-06 14:15:36 +00:00
|
|
|
#include "nsAutoPtr.h"
|
2012-07-18 03:41:54 +00:00
|
|
|
#include "nsClassHashtable.h"
|
2014-02-11 02:07:23 +00:00
|
|
|
#include "nsIDOMFile.h"
|
2012-07-18 03:41:54 +00:00
|
|
|
#include "nsIObserver.h"
|
2012-09-06 14:15:36 +00:00
|
|
|
#include "nsIThread.h"
|
|
|
|
#include "nsTObserverArray.h"
|
2012-07-18 03:41:54 +00:00
|
|
|
|
2012-09-25 20:13:15 +00:00
|
|
|
namespace mozilla {
|
|
|
|
namespace ipc {
|
|
|
|
class UnixSocketConsumer;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-07-18 03:41:54 +00:00
|
|
|
BEGIN_BLUETOOTH_NAMESPACE
|
|
|
|
|
2012-09-06 14:15:36 +00:00
|
|
|
class BluetoothManager;
|
2012-09-06 08:11:11 +00:00
|
|
|
class BluetoothNamedValue;
|
2012-09-06 14:15:36 +00:00
|
|
|
class BluetoothReplyRunnable;
|
|
|
|
class BluetoothSignal;
|
2012-07-18 03:41:54 +00:00
|
|
|
|
2012-09-13 16:37:14 +00:00
|
|
|
typedef mozilla::ObserverList<BluetoothSignal> BluetoothSignalObserverList;
|
|
|
|
|
2012-07-18 03:41:54 +00:00
|
|
|
class BluetoothService : public nsIObserver
|
2012-09-12 14:03:42 +00:00
|
|
|
, public BluetoothSignalObserver
|
2012-07-18 03:41:54 +00:00
|
|
|
{
|
2012-09-06 14:15:36 +00:00
|
|
|
class ToggleBtAck;
|
|
|
|
friend class ToggleBtAck;
|
|
|
|
|
|
|
|
class ToggleBtTask;
|
|
|
|
friend class ToggleBtTask;
|
|
|
|
|
|
|
|
class StartupTask;
|
|
|
|
friend class StartupTask;
|
|
|
|
|
2012-07-18 03:41:54 +00:00
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIOBSERVER
|
|
|
|
|
2013-08-28 23:21:52 +00:00
|
|
|
/**
|
2012-07-18 03:41:54 +00:00
|
|
|
* Add a message handler object from message distribution observer.
|
|
|
|
* Must be called from the main thread.
|
|
|
|
*
|
|
|
|
* @param aNodeName Node name of the object
|
|
|
|
* @param aMsgHandler Weak pointer to the object
|
|
|
|
*/
|
2012-09-13 16:37:14 +00:00
|
|
|
virtual void
|
|
|
|
RegisterBluetoothSignalHandler(const nsAString& aNodeName,
|
|
|
|
BluetoothSignalObserver* aMsgHandler);
|
2012-07-18 03:41:54 +00:00
|
|
|
|
2013-08-28 23:21:52 +00:00
|
|
|
/**
|
2012-07-18 03:41:54 +00:00
|
|
|
* Remove a message handler object from message distribution observer.
|
|
|
|
* Must be called from the main thread.
|
|
|
|
*
|
|
|
|
* @param aNodeName Node name of the object
|
|
|
|
* @param aMsgHandler Weak pointer to the object
|
2012-09-13 16:37:14 +00:00
|
|
|
*/
|
|
|
|
virtual void
|
|
|
|
UnregisterBluetoothSignalHandler(const nsAString& aNodeName,
|
|
|
|
BluetoothSignalObserver* aMsgHandler);
|
|
|
|
|
2013-08-28 23:21:52 +00:00
|
|
|
/**
|
2012-09-13 16:37:14 +00:00
|
|
|
* Remove a message handlers for the given observer.
|
|
|
|
* Must be called from the main thread.
|
2012-07-18 03:41:54 +00:00
|
|
|
*
|
2012-09-13 16:37:14 +00:00
|
|
|
* @param aMsgHandler Weak pointer to the object
|
2012-07-18 03:41:54 +00:00
|
|
|
*/
|
2012-09-13 16:37:14 +00:00
|
|
|
void
|
|
|
|
UnregisterAllSignalHandlers(BluetoothSignalObserver* aMsgHandler);
|
2012-07-18 03:41:54 +00:00
|
|
|
|
2013-08-28 23:21:52 +00:00
|
|
|
/**
|
2012-07-18 03:41:54 +00:00
|
|
|
* Distribute a signal to the observer list
|
|
|
|
*
|
|
|
|
* @param aSignal Signal object to distribute
|
|
|
|
*
|
|
|
|
* @return NS_OK if signal distributed, NS_ERROR_FAILURE on error
|
|
|
|
*/
|
2012-09-13 16:37:14 +00:00
|
|
|
void
|
|
|
|
DistributeSignal(const BluetoothSignal& aEvent);
|
2012-09-06 14:15:36 +00:00
|
|
|
|
2012-09-12 14:03:42 +00:00
|
|
|
/**
|
|
|
|
* Called when get a Bluetooth Signal from BluetoothDBusService
|
|
|
|
*
|
|
|
|
*/
|
2012-09-13 16:37:14 +00:00
|
|
|
void
|
|
|
|
Notify(const BluetoothSignal& aParam);
|
2012-09-12 14:03:42 +00:00
|
|
|
|
|
|
|
/**
|
2012-07-18 03:41:54 +00:00
|
|
|
* Returns the BluetoothService singleton. Only to be called from main thread.
|
|
|
|
*
|
2012-09-12 14:03:42 +00:00
|
|
|
* @param aService Pointer to return singleton into.
|
2012-07-18 03:41:54 +00:00
|
|
|
*
|
|
|
|
* @return NS_OK on proper assignment, NS_ERROR_FAILURE otherwise (if service
|
|
|
|
* has not yet been started, for instance)
|
|
|
|
*/
|
2012-09-13 16:37:14 +00:00
|
|
|
static BluetoothService*
|
|
|
|
Get();
|
2012-09-06 14:15:36 +00:00
|
|
|
|
2012-09-13 16:37:14 +00:00
|
|
|
static already_AddRefed<BluetoothService>
|
|
|
|
FactoryCreate()
|
2012-09-06 14:15:36 +00:00
|
|
|
{
|
|
|
|
nsRefPtr<BluetoothService> service = Get();
|
|
|
|
return service.forget();
|
|
|
|
}
|
|
|
|
|
2012-07-18 03:41:54 +00:00
|
|
|
/**
|
|
|
|
* Returns the path of the default adapter, implemented via a platform
|
|
|
|
* specific method.
|
|
|
|
*
|
2013-10-28 14:04:12 +00:00
|
|
|
* @return NS_OK on success, NS_ERROR_FAILURE otherwise
|
2012-07-18 03:41:54 +00:00
|
|
|
*/
|
2012-09-13 16:37:14 +00:00
|
|
|
virtual nsresult
|
|
|
|
GetDefaultAdapterPathInternal(BluetoothReplyRunnable* aRunnable) = 0;
|
2012-07-18 03:41:54 +00:00
|
|
|
|
2012-08-17 02:53:45 +00:00
|
|
|
/**
|
|
|
|
* Returns the properties of paired devices, implemented via a platform
|
|
|
|
* specific method.
|
|
|
|
*
|
|
|
|
* @return NS_OK on success, NS_ERROR_FAILURE otherwise
|
|
|
|
*/
|
2012-09-13 16:37:14 +00:00
|
|
|
virtual nsresult
|
|
|
|
GetPairedDevicePropertiesInternal(const nsTArray<nsString>& aDeviceAddresses,
|
|
|
|
BluetoothReplyRunnable* aRunnable) = 0;
|
2012-08-17 02:53:45 +00:00
|
|
|
|
2013-04-26 10:48:21 +00:00
|
|
|
/**
|
|
|
|
* Returns the properties of connected devices regarding to specific profile,
|
|
|
|
* implemented via a platform specific methood.
|
|
|
|
*
|
|
|
|
* @return NS_OK on success, NS_ERROR_FAILURE otherwise
|
|
|
|
*/
|
|
|
|
virtual nsresult
|
2013-09-06 11:19:46 +00:00
|
|
|
GetConnectedDevicePropertiesInternal(uint16_t aServiceUuid,
|
2013-04-26 10:48:21 +00:00
|
|
|
BluetoothReplyRunnable* aRunnable) = 0;
|
|
|
|
|
|
|
|
/**
|
2012-07-18 03:41:54 +00:00
|
|
|
* Stop device discovery (platform specific implementation)
|
|
|
|
*
|
|
|
|
* @return NS_OK if discovery stopped correctly, false otherwise
|
|
|
|
*/
|
2012-09-13 16:37:14 +00:00
|
|
|
virtual nsresult
|
2013-03-15 07:15:47 +00:00
|
|
|
StopDiscoveryInternal(BluetoothReplyRunnable* aRunnable) = 0;
|
2012-07-18 03:41:54 +00:00
|
|
|
|
2013-08-28 23:21:52 +00:00
|
|
|
/**
|
2012-07-18 03:41:54 +00:00
|
|
|
* Start device discovery (platform specific implementation)
|
|
|
|
*
|
|
|
|
* @return NS_OK if discovery stopped correctly, false otherwise
|
|
|
|
*/
|
2012-09-13 16:37:14 +00:00
|
|
|
virtual nsresult
|
2013-03-15 07:15:47 +00:00
|
|
|
StartDiscoveryInternal(BluetoothReplyRunnable* aRunnable) = 0;
|
2012-07-18 03:41:54 +00:00
|
|
|
|
2012-09-17 06:39:47 +00:00
|
|
|
/**
|
2012-08-01 04:49:59 +00:00
|
|
|
* Set a property for the specified object
|
|
|
|
*
|
|
|
|
* @param aPropName Name of the property
|
|
|
|
* @param aValue Boolean value
|
|
|
|
* @param aRunnable Runnable to run on async reply
|
|
|
|
*
|
|
|
|
* @return NS_OK if property is set correctly, NS_ERROR_FAILURE otherwise
|
|
|
|
*/
|
|
|
|
virtual nsresult
|
|
|
|
SetProperty(BluetoothObjectType aType,
|
|
|
|
const BluetoothNamedValue& aValue,
|
|
|
|
BluetoothReplyRunnable* aRunnable) = 0;
|
|
|
|
|
2012-08-17 10:35:59 +00:00
|
|
|
virtual nsresult
|
2013-03-15 07:15:47 +00:00
|
|
|
CreatePairedDeviceInternal(const nsAString& aAddress,
|
2012-08-17 10:35:59 +00:00
|
|
|
int aTimeout,
|
|
|
|
BluetoothReplyRunnable* aRunnable) = 0;
|
|
|
|
|
|
|
|
virtual nsresult
|
2013-03-15 07:15:47 +00:00
|
|
|
RemoveDeviceInternal(const nsAString& aObjectPath,
|
2012-08-17 10:35:59 +00:00
|
|
|
BluetoothReplyRunnable* aRunnable) = 0;
|
|
|
|
|
2013-05-10 06:39:12 +00:00
|
|
|
/**
|
|
|
|
* Get corresponding service channel of specific service on remote device.
|
|
|
|
* It's usually the very first step of establishing an outbound connection.
|
|
|
|
*
|
|
|
|
* @param aObjectPath Object path of remote device
|
|
|
|
* @param aServiceUuid UUID of the target service
|
|
|
|
* @param aManager Instance which has callback function OnGetServiceChannel()
|
|
|
|
*
|
|
|
|
* @return NS_OK if the task begins, NS_ERROR_FAILURE otherwise
|
|
|
|
*/
|
2012-09-06 03:06:20 +00:00
|
|
|
virtual nsresult
|
2013-05-22 11:08:17 +00:00
|
|
|
GetServiceChannel(const nsAString& aDeviceAddress,
|
2013-05-10 06:39:12 +00:00
|
|
|
const nsAString& aServiceUuid,
|
|
|
|
BluetoothProfileManagerBase* aManager) = 0;
|
2012-09-06 03:06:20 +00:00
|
|
|
|
2013-05-22 11:08:17 +00:00
|
|
|
virtual bool
|
|
|
|
UpdateSdpRecords(const nsAString& aDeviceAddress,
|
|
|
|
BluetoothProfileManagerBase* aManager) = 0;
|
|
|
|
|
2012-09-13 16:37:14 +00:00
|
|
|
virtual bool
|
2012-09-19 23:37:42 +00:00
|
|
|
SetPinCodeInternal(const nsAString& aDeviceAddress, const nsAString& aPinCode,
|
|
|
|
BluetoothReplyRunnable* aRunnable) = 0;
|
2012-09-13 16:37:14 +00:00
|
|
|
|
|
|
|
virtual bool
|
2012-09-19 23:37:42 +00:00
|
|
|
SetPasskeyInternal(const nsAString& aDeviceAddress, uint32_t aPasskey,
|
|
|
|
BluetoothReplyRunnable* aRunnable) = 0;
|
2012-09-06 14:15:36 +00:00
|
|
|
|
2012-09-13 16:37:14 +00:00
|
|
|
virtual bool
|
2012-09-19 23:37:42 +00:00
|
|
|
SetPairingConfirmationInternal(const nsAString& aDeviceAddress, bool aConfirm,
|
|
|
|
BluetoothReplyRunnable* aRunnable) = 0;
|
2012-09-13 16:37:14 +00:00
|
|
|
|
2012-11-16 10:46:08 +00:00
|
|
|
virtual void
|
2013-09-06 11:19:46 +00:00
|
|
|
Connect(const nsAString& aDeviceAddress, uint32_t aCod, uint16_t aServiceUuid,
|
2012-10-05 10:48:05 +00:00
|
|
|
BluetoothReplyRunnable* aRunnable) = 0;
|
2012-09-29 10:26:46 +00:00
|
|
|
|
|
|
|
virtual void
|
2013-09-06 11:19:46 +00:00
|
|
|
Disconnect(const nsAString& aDeviceAddress, uint16_t aServiceUuid,
|
|
|
|
BluetoothReplyRunnable* aRunnable) = 0;
|
2012-09-29 10:26:46 +00:00
|
|
|
|
2012-11-07 18:12:41 +00:00
|
|
|
virtual bool
|
2013-09-06 11:19:46 +00:00
|
|
|
IsConnected(uint16_t aServiceUuid) = 0;
|
2012-11-07 18:12:41 +00:00
|
|
|
|
2012-11-03 01:36:43 +00:00
|
|
|
virtual void
|
2012-09-28 10:59:12 +00:00
|
|
|
SendFile(const nsAString& aDeviceAddress,
|
|
|
|
BlobParent* aBlobParent,
|
|
|
|
BlobChild* aBlobChild,
|
|
|
|
BluetoothReplyRunnable* aRunnable) = 0;
|
|
|
|
|
2014-02-11 02:07:23 +00:00
|
|
|
virtual void
|
|
|
|
SendFile(const nsAString& aDeviceAddress,
|
|
|
|
nsIDOMBlob* aBlob,
|
|
|
|
BluetoothReplyRunnable* aRunnable) = 0;
|
|
|
|
|
2012-11-03 01:36:43 +00:00
|
|
|
virtual void
|
2012-10-03 07:09:27 +00:00
|
|
|
StopSendingFile(const nsAString& aDeviceAddress,
|
|
|
|
BluetoothReplyRunnable* aRunnable) = 0;
|
|
|
|
|
2012-10-19 06:16:13 +00:00
|
|
|
virtual void
|
|
|
|
ConfirmReceivingFile(const nsAString& aDeviceAddress, bool aConfirm,
|
|
|
|
BluetoothReplyRunnable* aRunnable) = 0;
|
|
|
|
|
2013-05-10 10:58:59 +00:00
|
|
|
virtual void
|
|
|
|
ConnectSco(BluetoothReplyRunnable* aRunnable) = 0;
|
|
|
|
|
|
|
|
virtual void
|
|
|
|
DisconnectSco(BluetoothReplyRunnable* aRunnable) = 0;
|
|
|
|
|
|
|
|
virtual void
|
|
|
|
IsScoConnected(BluetoothReplyRunnable* aRunnable) = 0;
|
|
|
|
|
2013-10-29 08:12:46 +00:00
|
|
|
#ifdef MOZ_B2G_RIL
|
2013-10-16 02:38:13 +00:00
|
|
|
virtual void
|
|
|
|
AnswerWaitingCall(BluetoothReplyRunnable* aRunnable) = 0;
|
|
|
|
|
|
|
|
virtual void
|
|
|
|
IgnoreWaitingCall(BluetoothReplyRunnable* aRunnable) = 0;
|
|
|
|
|
|
|
|
virtual void
|
|
|
|
ToggleCalls(BluetoothReplyRunnable* aRunnable) = 0;
|
2013-10-29 08:12:46 +00:00
|
|
|
#endif
|
2013-10-16 02:38:13 +00:00
|
|
|
|
2013-07-29 09:32:34 +00:00
|
|
|
virtual void
|
|
|
|
SendMetaData(const nsAString& aTitle,
|
|
|
|
const nsAString& aArtist,
|
|
|
|
const nsAString& aAlbum,
|
2013-07-29 09:32:35 +00:00
|
|
|
int64_t aMediaNumber,
|
|
|
|
int64_t aTotalMediaCount,
|
|
|
|
int64_t aDuration,
|
2013-07-29 09:32:34 +00:00
|
|
|
BluetoothReplyRunnable* aRunnable) = 0;
|
|
|
|
|
|
|
|
virtual void
|
2013-07-29 09:32:35 +00:00
|
|
|
SendPlayStatus(int64_t aDuration,
|
|
|
|
int64_t aPosition,
|
2013-07-29 09:32:34 +00:00
|
|
|
const nsAString& aPlayStatus,
|
|
|
|
BluetoothReplyRunnable* aRunnable) = 0;
|
|
|
|
|
2013-07-29 09:32:34 +00:00
|
|
|
virtual void
|
|
|
|
UpdatePlayStatus(uint32_t aDuration,
|
|
|
|
uint32_t aPosition,
|
|
|
|
ControlPlayStatus aPlayStatus) = 0;
|
|
|
|
|
2013-06-08 15:25:18 +00:00
|
|
|
virtual nsresult
|
|
|
|
SendSinkMessage(const nsAString& aDeviceAddresses,
|
|
|
|
const nsAString& aMessage) = 0;
|
|
|
|
|
2013-08-12 09:32:25 +00:00
|
|
|
virtual nsresult
|
|
|
|
SendInputMessage(const nsAString& aDeviceAddresses,
|
2013-09-06 11:20:27 +00:00
|
|
|
const nsAString& aMessage) = 0;
|
2013-08-12 09:32:25 +00:00
|
|
|
|
2012-09-13 16:37:14 +00:00
|
|
|
bool
|
|
|
|
IsEnabled() const
|
2012-09-06 14:15:36 +00:00
|
|
|
{
|
|
|
|
return mEnabled;
|
|
|
|
}
|
|
|
|
|
2012-11-30 09:46:55 +00:00
|
|
|
bool
|
|
|
|
IsToggling() const;
|
|
|
|
|
2013-01-09 15:51:53 +00:00
|
|
|
void
|
|
|
|
RemoveObserverFromTable(const nsAString& key);
|
|
|
|
|
2013-11-27 08:24:51 +00:00
|
|
|
/**
|
|
|
|
* Below 2 function/variable are used for ensuring event 'AdapterAdded' will
|
|
|
|
* be fired after event 'Enabled'.
|
|
|
|
*/
|
|
|
|
void TryFiringAdapterAdded();
|
|
|
|
void AdapterAddedReceived();
|
|
|
|
|
2012-09-06 14:15:36 +00:00
|
|
|
protected:
|
2013-11-27 08:24:51 +00:00
|
|
|
BluetoothService() : mEnabled(false)
|
|
|
|
, mAdapterAddedReceived(false)
|
2012-09-06 14:15:36 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2012-09-13 16:37:14 +00:00
|
|
|
virtual ~BluetoothService();
|
|
|
|
|
|
|
|
bool
|
|
|
|
Init();
|
|
|
|
|
|
|
|
void
|
|
|
|
Cleanup();
|
2012-09-06 14:15:36 +00:00
|
|
|
|
2012-09-13 16:37:14 +00:00
|
|
|
nsresult
|
2013-08-02 03:58:01 +00:00
|
|
|
StartStopBluetooth(bool aStart, bool aIsStartup);
|
2012-09-13 16:37:14 +00:00
|
|
|
|
2013-08-28 23:21:52 +00:00
|
|
|
/**
|
2012-09-13 16:37:14 +00:00
|
|
|
* Platform specific startup functions go here. Usually deals with member
|
|
|
|
* variables, so not static. Guaranteed to be called outside of main thread.
|
|
|
|
*
|
|
|
|
* @return NS_OK on correct startup, NS_ERROR_FAILURE otherwise
|
|
|
|
*/
|
|
|
|
virtual nsresult
|
|
|
|
StartInternal() = 0;
|
|
|
|
|
2013-04-16 03:02:23 +00:00
|
|
|
/**
|
2012-09-13 16:37:14 +00:00
|
|
|
* Platform specific startup functions go here. Usually deals with member
|
|
|
|
* variables, so not static. Guaranteed to be called outside of main thread.
|
|
|
|
*
|
|
|
|
* @return NS_OK on correct startup, NS_ERROR_FAILURE otherwise
|
|
|
|
*/
|
|
|
|
virtual nsresult
|
|
|
|
StopInternal() = 0;
|
|
|
|
|
2013-04-16 03:02:23 +00:00
|
|
|
/**
|
|
|
|
* Platform specific startup functions go here. Usually deals with member
|
|
|
|
* variables, so not static. Guaranteed to be called outside of main thread.
|
|
|
|
*
|
|
|
|
* @return true if Bluetooth is enabled, false otherwise
|
|
|
|
*/
|
|
|
|
virtual bool
|
|
|
|
IsEnabledInternal() = 0;
|
|
|
|
|
2012-09-13 16:37:14 +00:00
|
|
|
/**
|
|
|
|
* Called when XPCOM first creates this service.
|
|
|
|
*/
|
|
|
|
virtual nsresult
|
|
|
|
HandleStartup();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Called when the startup settings check has completed.
|
|
|
|
*/
|
|
|
|
nsresult
|
|
|
|
HandleStartupSettingsCheck(bool aEnable);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Called when "mozsettings-changed" observer topic fires.
|
|
|
|
*/
|
|
|
|
nsresult
|
|
|
|
HandleSettingsChanged(const nsAString& aData);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Called when XPCOM is shutting down.
|
|
|
|
*/
|
|
|
|
virtual nsresult
|
|
|
|
HandleShutdown();
|
2012-09-06 14:15:36 +00:00
|
|
|
|
|
|
|
// Called by ToggleBtAck.
|
2012-09-13 16:37:14 +00:00
|
|
|
void
|
|
|
|
SetEnabled(bool aEnabled);
|
2012-09-06 14:15:36 +00:00
|
|
|
|
2012-09-13 16:37:14 +00:00
|
|
|
// Called by Get().
|
|
|
|
static BluetoothService*
|
|
|
|
Create();
|
2012-08-17 10:35:59 +00:00
|
|
|
|
2012-07-18 03:41:54 +00:00
|
|
|
typedef nsClassHashtable<nsStringHashKey, BluetoothSignalObserverList >
|
|
|
|
BluetoothSignalObserverTable;
|
|
|
|
|
|
|
|
BluetoothSignalObserverTable mBluetoothSignalObserverTable;
|
2012-09-06 14:15:36 +00:00
|
|
|
|
|
|
|
bool mEnabled;
|
2013-08-30 18:18:43 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
/**
|
|
|
|
* Due to the fact that the startup and shutdown of the Bluetooth system
|
|
|
|
* can take an indefinite amount of time, a command thread is created
|
|
|
|
* that can run blocking calls. The thread is not intended for regular
|
|
|
|
* Bluetooth operations though.
|
|
|
|
*/
|
|
|
|
nsCOMPtr<nsIThread> mBluetoothThread;
|
2013-11-27 08:24:51 +00:00
|
|
|
|
|
|
|
bool mAdapterAddedReceived;
|
2012-07-18 03:41:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
END_BLUETOOTH_NAMESPACE
|
|
|
|
|
|
|
|
#endif
|