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-06-02 11:23:16 -07:00
|
|
|
#include "mozilla/Observer.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-06-02 11:23:16 -07:00
|
|
|
, public BluetoothEventObserver
|
2012-02-20 07:15:19 -08:00
|
|
|
{
|
|
|
|
public:
|
2012-05-23 21:02:23 -07:00
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
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-06-02 11:23:16 -07:00
|
|
|
static already_AddRefed<BluetoothAdapter>
|
|
|
|
Create(const nsCString& name);
|
|
|
|
|
|
|
|
void Notify(const BluetoothEvent& aParam);
|
|
|
|
protected:
|
|
|
|
nsCString mName;
|
|
|
|
private:
|
|
|
|
BluetoothAdapter() {}
|
|
|
|
BluetoothAdapter(const nsCString& name);
|
|
|
|
~BluetoothAdapter();
|
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
|