xbmc
PhysicalTopology.h
1 /*
2  * Copyright (C) 2017-2018 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 "games/ports/input/PhysicalPort.h"
12 
13 #include <vector>
14 
15 class TiXmlElement;
16 
17 namespace KODI
18 {
19 namespace GAME
20 {
21 
30 {
31 public:
32  CPhysicalTopology() = default;
33  CPhysicalTopology(bool bProvidesInput, std::vector<CPhysicalPort> ports);
34 
35  void Reset();
36 
44  bool ProvidesInput() const { return m_bProvidesInput; }
45 
51  const std::vector<CPhysicalPort>& Ports() const { return m_ports; }
52 
53  bool Deserialize(const TiXmlElement* pElement);
54 
55 private:
56  bool m_bProvidesInput = true;
57  std::vector<CPhysicalPort> m_ports;
58 };
59 
60 } // namespace GAME
61 } // namespace KODI
Represents the physical topology of controller add-ons.
Definition: PhysicalTopology.h:29
const std::vector< CPhysicalPort > & Ports() const
Get a list of ports provided by this controller.
Definition: PhysicalTopology.h:51
Controller configuration window.
Definition: AudioDecoder.h:18
bool ProvidesInput() const
Check if the controller can provide player input.
Definition: PhysicalTopology.h:44