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