2012-05-24 08:02:23 +04:00
|
|
|
/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
|
2012-08-21 07:21:24 +04:00
|
|
|
/* vim: set ts=2 et sw=2 tw=80: */
|
2012-05-24 08:02:23 +04: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_bluetoothmanager_h__
|
|
|
|
#define mozilla_dom_bluetooth_bluetoothmanager_h__
|
|
|
|
|
2013-06-05 20:15:48 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
2012-05-24 08:02:23 +04:00
|
|
|
#include "BluetoothCommon.h"
|
2012-08-01 08:53:04 +04:00
|
|
|
#include "BluetoothPropertyContainer.h"
|
2012-05-24 08:02:23 +04:00
|
|
|
#include "nsDOMEventTargetHelper.h"
|
|
|
|
#include "nsIDOMBluetoothManager.h"
|
2012-08-30 10:08:50 +04:00
|
|
|
#include "mozilla/Observer.h"
|
2012-05-24 08:02:23 +04:00
|
|
|
|
|
|
|
BEGIN_BLUETOOTH_NAMESPACE
|
|
|
|
|
2012-08-01 08:53:04 +04:00
|
|
|
class BluetoothNamedValue;
|
|
|
|
|
2012-05-24 08:02:23 +04:00
|
|
|
class BluetoothManager : public nsDOMEventTargetHelper
|
2012-06-02 22:23:16 +04:00
|
|
|
, public nsIDOMBluetoothManager
|
2012-07-18 07:41:54 +04:00
|
|
|
, public BluetoothSignalObserver
|
2012-08-01 08:53:04 +04:00
|
|
|
, public BluetoothPropertyContainer
|
2012-05-24 08:02:23 +04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
|
|
|
NS_DECL_NSIDOMBLUETOOTHMANAGER
|
|
|
|
|
2013-04-17 01:16:08 +04:00
|
|
|
NS_REALLY_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper)
|
2012-05-24 08:02:23 +04:00
|
|
|
|
2012-06-02 22:23:16 +04:00
|
|
|
static already_AddRefed<BluetoothManager>
|
|
|
|
Create(nsPIDOMWindow* aWindow);
|
2012-07-18 07:41:54 +04:00
|
|
|
void Notify(const BluetoothSignal& aData);
|
2013-06-05 20:15:48 +04:00
|
|
|
virtual void SetPropertyByValue(const BluetoothNamedValue& aValue) MOZ_OVERRIDE;
|
2012-05-24 08:02:23 +04:00
|
|
|
private:
|
2012-06-02 22:23:16 +04:00
|
|
|
BluetoothManager(nsPIDOMWindow* aWindow);
|
|
|
|
~BluetoothManager();
|
2012-05-24 08:02:23 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
END_BLUETOOTH_NAMESPACE
|
|
|
|
|
2012-06-02 22:23:16 +04:00
|
|
|
nsresult NS_NewBluetoothManager(nsPIDOMWindow* aWindow,
|
|
|
|
nsIDOMBluetoothManager** aBluetoothManager);
|
2012-05-24 08:02:23 +04:00
|
|
|
|
|
|
|
#endif
|