|
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/. */ |
|
6 |
|
7 #ifndef mozilla_dom_bluetooth_bluetoothhidmanager_h__ |
|
8 #define mozilla_dom_bluetooth_bluetoothhidmanager_h__ |
|
9 |
|
10 #include "BluetoothCommon.h" |
|
11 #include "BluetoothProfileController.h" |
|
12 #include "BluetoothProfileManagerBase.h" |
|
13 |
|
14 BEGIN_BLUETOOTH_NAMESPACE |
|
15 |
|
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 } |
|
24 |
|
25 static BluetoothHidManager* Get(); |
|
26 virtual ~BluetoothHidManager(); |
|
27 |
|
28 // HID-specific functions |
|
29 void HandleInputPropertyChanged(const BluetoothSignal& aSignal); |
|
30 |
|
31 private: |
|
32 BluetoothHidManager(); |
|
33 bool Init(); |
|
34 void Cleanup(); |
|
35 void HandleShutdown(); |
|
36 |
|
37 void NotifyStatusChanged(); |
|
38 |
|
39 // data member |
|
40 bool mConnected; |
|
41 nsString mDeviceAddress; |
|
42 nsRefPtr<BluetoothProfileController> mController; |
|
43 }; |
|
44 |
|
45 END_BLUETOOTH_NAMESPACE |
|
46 |
|
47 #endif //#ifndef mozilla_dom_bluetooth_bluetoothhidmanager_h__ |