dom/bluetooth/BluetoothDevice.h
author Kartikaya Gupta <kgupta@mozilla.com>
Fri, 13 Apr 2012 10:29:14 -0400
changeset 91612 84351dbcd62d12769fb601e11cc098849faee073
parent 90541 7b18a4980189bde77a5c64b8f7e823694adf6f62
permissions -rw-r--r--
Bug 742115 - Make the java panning constants preffable; original patch stolen from :joe. r=Cwiiis

/* 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_bluetoothdevice_h__
#define mozilla_dom_bluetooth_bluetoothdevice_h__

#include "BluetoothCommon.h"
#include "nsDOMEventTargetHelper.h"
#include "nsIDOMBluetoothDevice.h"
#include "nsString.h"

BEGIN_BLUETOOTH_NAMESPACE

class BluetoothDevice : public nsDOMEventTargetHelper
                      , public nsIDOMBluetoothDevice
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIDOMBLUETOOTHDEVICE

  NS_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper::)

  NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(BluetoothDevice,
                                           nsDOMEventTargetHelper)

  BluetoothDevice();

protected:
  nsString mAdapter;
  nsString mAddress;
  PRUint32 mClass;
  bool mConnected;
  bool mLegacyPairing;
  nsString mName;
  bool mPaired;
  nsTArray<nsString> mUuids;

  bool mTrusted;
  nsString mAlias;

  NS_DECL_EVENT_HANDLER(propertychanged)
  NS_DECL_EVENT_HANDLER(disconnectrequested)
};

END_BLUETOOTH_NAMESPACE

#endif