2013-08-12 13:32:25 +04:00
|
|
|
/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
|
|
|
|
/* vim: set ts=2 et sw=2 tw=80: */
|
|
|
|
/* 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_bluetoothhidmanager_h__
|
|
|
|
#define mozilla_dom_bluetooth_bluetoothhidmanager_h__
|
|
|
|
|
|
|
|
#include "BluetoothCommon.h"
|
2013-10-01 11:26:40 +04:00
|
|
|
#include "BluetoothProfileController.h"
|
2013-08-12 13:32:25 +04:00
|
|
|
#include "BluetoothProfileManagerBase.h"
|
|
|
|
|
|
|
|
BEGIN_BLUETOOTH_NAMESPACE
|
|
|
|
|
|
|
|
class BluetoothHidManager : public BluetoothProfileManagerBase
|
|
|
|
{
|
|
|
|
public:
|
2013-11-12 07:59:01 +04:00
|
|
|
BT_DECL_PROFILE_MGR_BASE
|
2013-09-14 02:51:00 +04:00
|
|
|
virtual void GetName(nsACString& aName)
|
|
|
|
{
|
|
|
|
aName.AssignLiteral("HID");
|
|
|
|
}
|
|
|
|
|
2013-11-12 07:59:01 +04:00
|
|
|
static BluetoothHidManager* Get();
|
2013-12-06 08:20:07 +04:00
|
|
|
virtual ~BluetoothHidManager();
|
2013-11-12 07:59:01 +04:00
|
|
|
|
2013-09-14 02:51:00 +04:00
|
|
|
// HID-specific functions
|
2013-08-12 13:32:25 +04:00
|
|
|
void HandleInputPropertyChanged(const BluetoothSignal& aSignal);
|
|
|
|
|
|
|
|
private:
|
|
|
|
BluetoothHidManager();
|
|
|
|
bool Init();
|
|
|
|
void Cleanup();
|
|
|
|
void HandleShutdown();
|
|
|
|
|
|
|
|
void NotifyStatusChanged();
|
|
|
|
|
|
|
|
// data member
|
|
|
|
bool mConnected;
|
|
|
|
nsString mDeviceAddress;
|
2013-10-01 11:26:40 +04:00
|
|
|
nsRefPtr<BluetoothProfileController> mController;
|
2013-08-12 13:32:25 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
END_BLUETOOTH_NAMESPACE
|
|
|
|
|
|
|
|
#endif //#ifndef mozilla_dom_bluetooth_bluetoothhidmanager_h__
|