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 namespace tinyxml2
15 {
16 class XMLElement;
17 }
18 
19 namespace KODI
20 {
21 namespace GAME
22 {
23 
28 {
29 public:
30  CPhysicalPort() = default;
31 
38  CPhysicalPort(std::string portId, std::vector<std::string> accepts);
39 
40  void Reset();
41 
47  const std::string& ID() const { return m_portId; }
48 
54  const std::vector<std::string>& Accepts() const { return m_accepts; }
55 
61  bool IsCompatible(const std::string& controllerId) const;
62 
63  bool Deserialize(const tinyxml2::XMLElement* pElement);
64 
65 private:
66  std::string m_portId;
67  std::vector<std::string> m_accepts;
68 };
69 } // namespace GAME
70 } // namespace KODI
const std::vector< std::string > & Accepts() const
Get the controllers that can connect to this port.
Definition: PhysicalPort.h:54
Definition: SkinTimerManager.h:18
Definition: AudioDecoder.h:18
Definition: PhysicalPort.h:27
const std::string & ID() const
Get the ID of the port.
Definition: PhysicalPort.h:47