Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
No Matches
KODI::GAME::CPhysicalPort Class Reference

#include <PhysicalPort.h>

Public Member Functions

 CPhysicalPort ()=default
 CPhysicalPort (std::string portId, std::vector< std::string > accepts)
 Create a controller port.
void Reset ()
const std::string & ID () const
 Get the ID of the port.
const std::vector< std::string > & Accepts () const
 Get the controllers that can connect to this port.
bool IsCompatible (const std::string &controllerId) const
 Check if the controller is compatible with this port.
bool Deserialize (const tinyxml2::XMLElement *pElement)

Constructor & Destructor Documentation

◆ CPhysicalPort() [1/2]

KODI::GAME::CPhysicalPort::CPhysicalPort ( )

◆ CPhysicalPort() [2/2]

CPhysicalPort::CPhysicalPort ( std::string portId,
std::vector< std::string > accepts )

Create a controller port.

portIdThe port's ID
acceptsA list of controller IDs that this port accepts

Member Function Documentation

◆ Accepts()

const std::vector< std::string > & KODI::GAME::CPhysicalPort::Accepts ( ) const

Get the controllers that can connect to this port.

A list of controllers that are physically compatible with this port

◆ Deserialize()

bool CPhysicalPort::Deserialize ( const tinyxml2::XMLElement * pElement)

◆ ID()

const std::string & KODI::GAME::CPhysicalPort::ID ( ) const

Get the ID of the port.

The port's ID, e.g. "1", as a string

◆ IsCompatible()

bool CPhysicalPort::IsCompatible ( const std::string & controllerId) const

Check if the controller is compatible with this port.

True if the controller is accepted, false otherwise

◆ Reset()

void CPhysicalPort::Reset ( )

The documentation for this class was generated from the following files: