xbmc
Public Member Functions | List of all members
KODI::GAME::CPortNode Class Reference

Collection of nodes that can be connected to this port. More...

#include <PortNode.h>

Public Member Functions

 CPortNode (const CPortNode &other)
 
 CPortNode (CPortNode &&other)=default
 
CPortNodeoperator= (const CPortNode &rhs)
 
CPortNodeoperator= (CPortNode &&rhs) noexcept
 
bool IsConnected () const
 Connection state of the port. More...
 
void SetConnected (bool bConnected)
 
const CControllerNodeGetActiveController () const
 The controller that is active on this port. More...
 
CControllerNodeGetActiveController ()
 
void SetActiveController (unsigned int controllerIndex)
 
bool SetActiveController (const std::string &controllerId)
 
PORT_TYPE GetPortType () const
 The port type. More...
 
void SetPortType (PORT_TYPE type)
 
const std::string & GetPortID () const
 The hardware or controller port ID. More...
 
void SetPortID (std::string portId)
 
const std::string & GetAddress () const
 Address given to the node by the implementation.
 
void SetAddress (std::string address)
 
bool IsForceConnected () const
 If true, prevents a disconnection option from being shown for this port.
 
void SetForceConnected (bool forceConnected)
 
const ControllerNodeVec & GetCompatibleControllers () const
 Return the controller profiles that are compatible with this port. More...
 
ControllerNodeVec & GetCompatibleControllers ()
 
void SetCompatibleControllers (ControllerNodeVec controllers)
 
bool IsControllerAccepted (const std::string &controllerId) const
 Check to see if a controller is compatible with this tree. More...
 
bool IsControllerAccepted (const std::string &portAddress, const std::string &controllerId) const
 Check to see if a controller is compatible with this tree. More...
 

Detailed Description

Collection of nodes that can be connected to this port.

Member Function Documentation

◆ GetActiveController()

const CControllerNode & CPortNode::GetActiveController ( ) const

The controller that is active on this port.

Returns
The active controller, or invalid if port is disconnected

◆ GetCompatibleControllers()

const ControllerNodeVec& KODI::GAME::CPortNode::GetCompatibleControllers ( ) const
inline

Return the controller profiles that are compatible with this port.

Returns
The controller profiles, or empty if this port doesn't support any controller profiles

◆ GetPortID()

const std::string& KODI::GAME::CPortNode::GetPortID ( ) const
inline

The hardware or controller port ID.

Returns
The port ID of the hardware port or controller port, or empty if the port is only identified by its type

◆ GetPortType()

PORT_TYPE KODI::GAME::CPortNode::GetPortType ( ) const
inline

The port type.

Returns
The port type, if known

◆ IsConnected()

bool KODI::GAME::CPortNode::IsConnected ( ) const
inline

Connection state of the port.

Returns
True if a controller is connected, false otherwise

◆ IsControllerAccepted() [1/2]

bool CPortNode::IsControllerAccepted ( const std::string &  controllerId) const

Check to see if a controller is compatible with this tree.

Parameters
controllerIdThe ID of the controller
Returns
True if the controller is compatible with the tree, false otherwise

◆ IsControllerAccepted() [2/2]

bool CPortNode::IsControllerAccepted ( const std::string &  portAddress,
const std::string &  controllerId 
) const

Check to see if a controller is compatible with this tree.

Parameters
portAddressThe port address
controllerIdThe ID of the controller
Returns
True if the controller is compatible with the tree, false otherwise

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