2 * Copyright (C) 2017-2021 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
30 CPhysicalPort() = default;
33 * \brief Create a controller port
35 * \param portId The port's ID
36 * \param accepts A list of controller IDs that this port accepts
38 CPhysicalPort(std::string portId
, std::vector
<std::string
> accepts
);
43 * \brief Get the ID of the port
45 * \return The port's ID, e.g. "1", as a string
47 const std::string
& ID() const { return m_portId
; }
50 * \brief Get the controllers that can connect to this port
52 * \return A list of controllers that are physically compatible with this port
54 const std::vector
<std::string
>& Accepts() const { return m_accepts
; }
57 * \brief Check if the controller is compatible with this port
59 * \return True if the controller is accepted, false otherwise
61 bool IsCompatible(const std::string
& controllerId
) const;
63 bool Deserialize(const tinyxml2::XMLElement
* pElement
);
67 std::vector
<std::string
> m_accepts
;