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 namespace tinyxml2
16 {
17 class XMLElement;
18 }
19 
20 namespace KODI
21 {
22 namespace GAME
23 {
24 
35 {
36 public:
37  CPhysicalTopology() = default;
38  CPhysicalTopology(bool bProvidesInput, std::vector<CPhysicalPort> ports);
39 
40  void Reset();
41 
49  bool ProvidesInput() const { return m_bProvidesInput; }
50 
56  const std::vector<CPhysicalPort>& Ports() const { return m_ports; }
57 
58  bool Deserialize(const tinyxml2::XMLElement* pElement);
59 
60 private:
61  bool m_bProvidesInput = true;
62  std::vector<CPhysicalPort> m_ports;
63 };
64 
65 } // namespace GAME
66 } // namespace KODI
Represents the physical topology of controller add-ons.
Definition: PhysicalTopology.h:34
Definition: SkinTimerManager.h:18
const std::vector< CPhysicalPort > & Ports() const
Get a list of ports provided by this controller.
Definition: PhysicalTopology.h:56
Definition: AudioDecoder.h:18
bool ProvidesInput() const
Check if the controller can provide player input.
Definition: PhysicalTopology.h:49