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

#include <ControllerManager.h>

Public Member Functions

 CControllerManager (ADDON::CAddonMgr &addonManager)
 
 ~CControllerManager ()
 
ControllerPtr GetController (const std::string &controllerId)
 Get a controller.
 
ControllerPtr GetDefaultController ()
 Get the default controller.
 
ControllerPtr GetDefaultKeyboard ()
 Get the default keyboard.
 
ControllerPtr GetDefaultMouse ()
 Get the default mouse.
 
ControllerVector GetControllers ()
 Get installed controllers.
 
std::string TranslateFeature (const std::string &controllerId, const std::string &featureName)
 Translate a feature on a controller into its localized name.
 

Constructor & Destructor Documentation

◆ CControllerManager()

CControllerManager::CControllerManager ( ADDON::CAddonMgr & addonManager)

◆ ~CControllerManager()

CControllerManager::~CControllerManager ( )

Member Function Documentation

◆ GetController()

ControllerPtr CControllerManager::GetController ( const std::string & controllerId)

Get a controller.

A cache is used to avoid reloading controllers each time they are requested.

Parameters
controllerIdThe controller's ID
Returns
The controller, or empty if the controller isn't installed or can't be loaded

◆ GetControllers()

ControllerVector CControllerManager::GetControllers ( )

Get installed controllers.

Returns
The installed controllers that loaded successfully

◆ GetDefaultController()

ControllerPtr CControllerManager::GetDefaultController ( )

Get the default controller.

Returns
The default controller, or empty if the controller failed to load

◆ GetDefaultKeyboard()

ControllerPtr CControllerManager::GetDefaultKeyboard ( )

Get the default keyboard.

Returns
The keyboard controller, or empty if the controller failed to load

◆ GetDefaultMouse()

ControllerPtr CControllerManager::GetDefaultMouse ( )

Get the default mouse.

Returns
The mouse controller, or empty if the controller failed to load

◆ TranslateFeature()

std::string CControllerManager::TranslateFeature ( const std::string & controllerId,
const std::string & featureName )

Translate a feature on a controller into its localized name.

Parameters
controllerIdThe controller ID that the feature belongs to
featureNameThe feature name
Returns
The localized feature name, or empty if the controller or feature doesn't exist

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