dom/bluetooth/BluetoothHidManager.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
     2 /* vim: set ts=2 et sw=2 tw=80: */
     3 /* This Source Code Form is subject to the terms of the Mozilla Public
     4  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
     5  * You can obtain one at http://mozilla.org/MPL/2.0/. */
     7 #ifndef mozilla_dom_bluetooth_bluetoothhidmanager_h__
     8 #define mozilla_dom_bluetooth_bluetoothhidmanager_h__
    10 #include "BluetoothCommon.h"
    11 #include "BluetoothProfileController.h"
    12 #include "BluetoothProfileManagerBase.h"
    14 BEGIN_BLUETOOTH_NAMESPACE
    16 class BluetoothHidManager : public BluetoothProfileManagerBase
    17 {
    18 public:
    19   BT_DECL_PROFILE_MGR_BASE
    20   virtual void GetName(nsACString& aName)
    21   {
    22     aName.AssignLiteral("HID");
    23   }
    25   static BluetoothHidManager* Get();
    26   virtual ~BluetoothHidManager();
    28   // HID-specific functions
    29   void HandleInputPropertyChanged(const BluetoothSignal& aSignal);
    31 private:
    32   BluetoothHidManager();
    33   bool Init();
    34   void Cleanup();
    35   void HandleShutdown();
    37   void NotifyStatusChanged();
    39   // data member
    40   bool mConnected;
    41   nsString mDeviceAddress;
    42   nsRefPtr<BluetoothProfileController> mController;
    43 };
    45 END_BLUETOOTH_NAMESPACE
    47 #endif //#ifndef mozilla_dom_bluetooth_bluetoothhidmanager_h__

mercurial