2012-02-20 07:15:19 -08:00
|
|
|
/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
|
|
|
|
/* vim: set ts=2 et sw=2 tw=40: */
|
|
|
|
/* 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_bluetoothadapter_h__
|
|
|
|
#define mozilla_dom_bluetooth_bluetoothadapter_h__
|
|
|
|
|
|
|
|
#include "BluetoothCommon.h"
|
2012-02-23 07:55:48 -08:00
|
|
|
#include "nsDOMEventTargetHelper.h"
|
2012-02-20 07:15:19 -08:00
|
|
|
#include "nsIDOMBluetoothAdapter.h"
|
2012-03-27 16:17:35 -07:00
|
|
|
#include "nsIDOMDOMRequest.h"
|
2012-02-20 07:15:19 -08:00
|
|
|
|
2012-03-04 19:54:01 -08:00
|
|
|
class nsIEventTarget;
|
|
|
|
|
2012-02-20 07:15:19 -08:00
|
|
|
BEGIN_BLUETOOTH_NAMESPACE
|
|
|
|
|
2012-03-28 10:29:14 -07:00
|
|
|
class BluetoothAdapter : public nsDOMEventTargetHelper
|
|
|
|
, public nsIDOMBluetoothAdapter
|
2012-02-20 07:15:19 -08:00
|
|
|
{
|
|
|
|
public:
|
2012-05-23 18:27:53 -07:00
|
|
|
NS_DECL_ISUPPORTS
|
2012-02-20 07:15:19 -08:00
|
|
|
NS_DECL_NSIDOMBLUETOOTHADAPTER
|
|
|
|
|
2012-02-23 07:55:48 -08:00
|
|
|
NS_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper::)
|
|
|
|
|
|
|
|
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(BluetoothAdapter,
|
|
|
|
nsDOMEventTargetHelper)
|
|
|
|
|
2012-05-23 18:27:53 -07:00
|
|
|
BluetoothAdapter(nsPIDOMWindow*);
|
|
|
|
|
|
|
|
inline void SetEnabledInternal(bool aEnabled) {mEnabled = aEnabled;}
|
|
|
|
|
|
|
|
protected:
|
|
|
|
bool mEnabled;
|
|
|
|
|
|
|
|
NS_DECL_EVENT_HANDLER(enabled)
|
|
|
|
|
|
|
|
private:
|
|
|
|
nsCOMPtr<nsIEventTarget> mToggleBtThread;
|
2012-02-20 07:15:19 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
END_BLUETOOTH_NAMESPACE
|
2012-03-27 16:17:35 -07:00
|
|
|
|
2012-02-20 07:15:19 -08:00
|
|
|
#endif
|