xbmc
PhysicalPort.h
1 /*
2  * Copyright (C) 2017-2021 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 <string>
12 #include <vector>
13 
14 class TiXmlElement;
15 
16 namespace KODI
17 {
18 namespace GAME
19 {
20 
22 {
23 public:
24  CPhysicalPort() = default;
25 
32  CPhysicalPort(std::string portId, std::vector<std::string> accepts);
33 
34  void Reset();
35 
41  const std::string& ID() const { return m_portId; }
42 
48  const std::vector<std::string>& Accepts() const { return m_accepts; }
49 
55  bool IsCompatible(const std::string& controllerId) const;
56 
57  bool Deserialize(const TiXmlElement* pElement);
58 
59 private:
60  std::string m_portId;
61  std::vector<std::string> m_accepts;
62 };
63 } // namespace GAME
64 } // namespace KODI
const std::vector< std::string > & Accepts() const
Get the controllers that can connect to this port.
Definition: PhysicalPort.h:48
Controller configuration window.
Definition: AudioDecoder.h:18
Definition: PhysicalPort.h:21
const std::string & ID() const
Get the ID of the port.
Definition: PhysicalPort.h:41
bool IsCompatible(const std::string &controllerId) const
Check if the controller is compatible with this port.
Definition: PhysicalPort.cpp:32