| 1 |
/* |
| 2 |
* Copyright (C) 2012-2024 Team Kodi |
| 3 |
* This file is part of Kodi - https://kodi.tv |
| 4 |
* |
| 5 |
* SPDX-License-Identifier: GPL-2.0-or-later |
| 6 |
* See LICENSES/README.md for more information. |
| 7 |
*/ |
| 8 |
|
| 9 |
#pragma once |
| 10 |
|
| 11 |
#include "PeripheralHID.h" |
| 12 |
|
| 13 |
#include <atomic> |
| 14 |
|
| 15 |
class CSetting; |
| 16 |
|
| 17 |
namespace PERIPHERALS |
| 18 |
{ |
| 19 |
/*! |
| 20 |
* \ingroup peripherals |
| 21 |
*/ |
| 22 |
class CPeripheralImon : public CPeripheralHID |
| 23 |
{ |
| 24 |
public: |
| 25 |
CPeripheralImon(CPeripherals& manager, |
| 26 |
const PeripheralScanResult& scanResult, |
| 27 |
CPeripheralBus* bus); |
| 28 |
~CPeripheralImon(void) override = default; |
| 29 |
bool InitialiseFeature(const PeripheralFeature feature) override; |
| 30 |
void OnSettingChanged(const std::string& strChangedSetting) override; |
| 31 |
void OnDeviceRemoved() override; |
| 32 |
void AddSetting(const std::string& strKey, |
| 33 |
const std::shared_ptr<const CSetting>& setting, |
| 34 |
int order) override; |
| 35 |
inline bool IsImonConflictsWithDInput() { return m_bImonConflictsWithDInput; } |
| 36 |
static inline long GetCountOfImonsConflictWithDInput() |
| 37 |
{ |
| 38 |
return m_lCountOfImonsConflictWithDInput; |
| 39 |
} |
| 40 |
static void ActionOnImonConflict(bool deviceInserted = true); |
| 41 |
|
| 42 |
private: |
| 43 |
bool m_bImonConflictsWithDInput; |
| 44 |
static std::atomic<long> m_lCountOfImonsConflictWithDInput; |
| 45 |
}; |
| 46 |
} // namespace PERIPHERALS |