| 1 |
/* |
| 2 |
* Copyright (C) 2015-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 "peripherals/bus/PeripheralBus.h" |
| 12 |
|
| 13 |
namespace PERIPHERALS |
| 14 |
{ |
| 15 |
/*! |
| 16 |
* \ingroup peripherals |
| 17 |
* |
| 18 |
* @class CPeripheralBusApplication |
| 19 |
* |
| 20 |
* This exposes peripherals that exist logically at the application level, |
| 21 |
* such as emulated joysticks. |
| 22 |
*/ |
| 23 |
class CPeripheralBusApplication : public CPeripheralBus |
| 24 |
{ |
| 25 |
public: |
| 26 |
explicit CPeripheralBusApplication(CPeripherals& manager); |
| 27 |
~CPeripheralBusApplication(void) override = default; |
| 28 |
|
| 29 |
// implementation of CPeripheralBus |
| 30 |
void Initialise(void) override; |
| 31 |
void GetDirectory(const std::string& strPath, CFileItemList& items) const override; |
| 32 |
|
| 33 |
/*! |
| 34 |
* \brief Get the location for the specified controller index |
| 35 |
*/ |
| 36 |
std::string MakeLocation(unsigned int controllerIndex) const; |
| 37 |
|
| 38 |
protected: |
| 39 |
// implementation of CPeripheralBus |
| 40 |
bool PerformDeviceScan(PeripheralScanResults& results) override; |
| 41 |
}; |
| 42 |
} // namespace PERIPHERALS |