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

Represents a port that devices can connect to. More...

#include <GameClientPort.h>

Public Member Functions

 CGameClientPort (const game_input_port &port)
 Construct a hardware port.
 
 CGameClientPort (const ControllerVector &controllers)
 Construct a hardware port that accepts the given controllers.
 
 CGameClientPort (const game_input_port &logicalPort, const CPhysicalPort &physicalPort)
 Construct a controller port.
 
 ~CGameClientPort ()
 Destructor.
 
PORT_TYPE PortType () const
 Get the port type.
 
const std::string & ID () const
 Get the ID of the port.
 
bool ForceConnected () const
 True if a controller must be connected, preventing the disconnected option from being shown to the user.
 
const GameClientDeviceVecDevices () const
 Get the list of devices accepted by this port.
 

Detailed Description

Represents a port that devices can connect to.

Constructor & Destructor Documentation

◆ CGameClientPort() [1/3]

CGameClientPort::CGameClientPort ( const game_input_port & port)

Construct a hardware port.

Parameters
portThe hardware port Game API struct

◆ CGameClientPort() [2/3]

CGameClientPort::CGameClientPort ( const ControllerVector & controllers)

Construct a hardware port that accepts the given controllers.

Parameters
controllersList of accepted controller profiles

The port is given the ID specified by DEFAULT_PORT_ID.

◆ CGameClientPort() [3/3]

CGameClientPort::CGameClientPort ( const game_input_port & logicalPort,
const CPhysicalPort & physicalPort )

Construct a controller port.

Parameters
logicalPortThe logical port Game API struct
physicalPortThe physical port definition

The physical port is defined by the controller profile. This definition specifies which controllers the port is physically compatible with.

The logical port is defined by the emulator's input topology. This definition specifies which controllers the emulator's logic can handle.

Obviously, the controllers specified by the logical port must be a subset of the controllers supported by the physical port.

◆ ~CGameClientPort()

CGameClientPort::~CGameClientPort ( )
default

Destructor.

Member Function Documentation

◆ Devices()

const GameClientDeviceVec & KODI::GAME::CGameClientPort::Devices ( ) const
inline

Get the list of devices accepted by this port.

◆ ForceConnected()

bool KODI::GAME::CGameClientPort::ForceConnected ( ) const
inline

True if a controller must be connected, preventing the disconnected option from being shown to the user.

◆ ID()

const std::string & KODI::GAME::CGameClientPort::ID ( ) const
inline

Get the ID of the port.

The ID is used when creating a toplogical address for the port.

◆ PortType()

PORT_TYPE KODI::GAME::CGameClientPort::PortType ( ) const
inline

Get the port type.

The port type identifies if this port is for a keyboard, mouse, or controller.


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