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

#include <Controller.h>

Inheritance diagram for KODI::GAME::CController:
ADDON::CAddon ADDON::IAddon

Public Member Functions

 CController (const ADDON::AddonInfoPtr &addonInfo)
 
 ~CController () override
 
bool CanHaveAddonOrInstanceSettings () override
 Check whether this add-on can be configured by the user.
 
const std::vector< CPhysicalFeature > & Features (void) const
 Get all controller features.
 
const CPhysicalFeatureGetFeature (const std::string &name) const
 Get a feature by its name.
 
unsigned int FeatureCount (FEATURE_TYPE type=FEATURE_TYPE::UNKNOWN, JOYSTICK::INPUT_TYPE inputType=JOYSTICK::INPUT_TYPE::UNKNOWN) const
 Get the count of controller features matching the specified types.
 
void GetFeatures (std::vector< std::string > &features, FEATURE_TYPE type=FEATURE_TYPE::UNKNOWN) const
 Get the features matching the specified type.
 
FEATURE_TYPE FeatureType (const std::string &feature) const
 Get the type of the specified feature.
 
JOYSTICK::INPUT_TYPE GetInputType (const std::string &feature) const
 Get the input type of the specified feature.
 
bool LoadLayout (void)
 Load the controller layout.
 
const CControllerLayoutLayout (void) const
 Get the controller layout.
 
const CPhysicalTopologyTopology () const
 Get the controller's physical topology.
 
- Public Member Functions inherited from ADDON::CAddon
 CAddon (const AddonInfoPtr &addonInfo, AddonType addonType)
 
 ~CAddon () override=default
 
AddonType MainType () const override
 To get the main type of this addon.
 
AddonType Type () const override
 To get the on this CAddon class processed addon type.
 
bool HasType (AddonType type) const override
 To check complete addon (not only this) contains a type.
 
bool HasMainType (AddonType type) const override
 To check complete addon (not only this) has a specific type defined in its first extension point including the provided subcontent e.g. video or audio.
 
const CAddonTypeType (AddonType type) const
 The get for given addon type information and extension data.
 
std::string ID () const override
 
std::string Name () const override
 
bool IsInUse () const override
 
bool IsBinary () const override
 
CAddonVersion Version () const override
 
CAddonVersion MinVersion () const override
 
std::string Summary () const override
 
std::string Description () const override
 
std::string Path () const override
 
std::string Profile () const override
 
std::string LibPath () const override
 
std::string Author () const override
 
std::string ChangeLog () const override
 
std::string Icon () const override
 
ArtMap Art () const override
 
std::vector< std::string > Screenshots () const override
 
std::string Disclaimer () const override
 
AddonLifecycleState LifecycleState () const override
 
std::string LifecycleStateDescription () const override
 
CDateTime InstallDate () const override
 
CDateTime LastUpdated () const override
 
CDateTime LastUsed () const override
 
std::string Origin () const override
 
std::string OriginName () const override
 
uint64_t PackageSize () const override
 
const InfoMapExtraInfo () const override
 
const std::vector< DependencyInfo > & GetDependencies () const override
 
std::string FanArt () const override
 
bool SupportsMultipleInstances () const override
 Check add-on for support from independent work instances.
 
AddonInstanceSupport InstanceUseType () const override
 Return the used instance path type of the add-on type.
 
std::vector< AddonInstanceIdGetKnownInstanceIds () const override
 Gives active, independently working instance identifiers for this add-on.
 
bool SupportsInstanceSettings () const override
 Check whether the add-on supports individual settings per add-on instance.
 
bool DeleteInstanceSettings (AddonInstanceId instance) override
 Delete selected instance settings from storage.
 
bool HasSettings (AddonInstanceId id=ADDON_SETTINGS_ID) override
 Check whether this add-on can be configured by the user.
 
bool HasUserSettings (AddonInstanceId id=ADDON_SETTINGS_ID) override
 Check whether the user has configured this add-on or not.
 
bool SaveSettings (AddonInstanceId id=ADDON_SETTINGS_ID) override
 Save any user configured settings.
 
void UpdateSetting (const std::string &key, const std::string &value, AddonInstanceId id=ADDON_SETTINGS_ID) override
 Update a user-configured setting with a new value.
 
bool UpdateSettingBool (const std::string &key, bool value, AddonInstanceId id=ADDON_SETTINGS_ID) override
 Update a user-configured setting with a new boolean value.
 
bool UpdateSettingInt (const std::string &key, int value, AddonInstanceId id=ADDON_SETTINGS_ID) override
 Update a user-configured setting with a new integer value.
 
bool UpdateSettingNumber (const std::string &key, double value, AddonInstanceId id=ADDON_SETTINGS_ID) override
 Update a user-configured setting with a new number value.
 
bool UpdateSettingString (const std::string &key, const std::string &value, AddonInstanceId id=ADDON_SETTINGS_ID) override
 Update a user-configured setting with a new string value.
 
std::string GetSetting (const std::string &key, AddonInstanceId id=ADDON_SETTINGS_ID) override
 Retrieve a particular settings value.
 
bool GetSettingBool (const std::string &key, bool &value, AddonInstanceId id=ADDON_SETTINGS_ID) override
 Retrieve a particular settings value as boolean.
 
bool GetSettingInt (const std::string &key, int &value, AddonInstanceId id=ADDON_SETTINGS_ID) override
 Retrieve a particular settings value as integer.
 
bool GetSettingNumber (const std::string &key, double &value, AddonInstanceId id=ADDON_SETTINGS_ID) override
 Retrieve a particular settings value as number.
 
bool GetSettingString (const std::string &key, std::string &value, AddonInstanceId id=ADDON_SETTINGS_ID) override
 Retrieve a particular settings value as string.
 
std::shared_ptr< CAddonSettingsGetSettings (AddonInstanceId id=ADDON_SETTINGS_ID) override
 
CAddonVersion GetDependencyVersion (const std::string &dependencyID) const override
 get the required version of a dependency.
 
bool MeetsVersion (const CAddonVersion &versionMin, const CAddonVersion &version) const override
 return whether or not this addon satisfies the given version requirements
 
bool ReloadSettings (AddonInstanceId id=ADDON_SETTINGS_ID) override
 
void ResetSettings (AddonInstanceId id=ADDON_SETTINGS_ID) override
 
AddonPtr GetRunningInstance () const override
 retrieve the running instance of an add-on if it persists while running.
 
void OnPreInstall () override
 
void OnPostInstall (bool update, bool modal) override
 
void OnPreUnInstall () override
 
void OnPostUnInstall () override
 
- Public Member Functions inherited from ADDON::IAddon
virtual ~IAddon ()=default
 

Static Public Attributes

static const ControllerPtr EmptyPtr
 

Additional Inherited Members

- Protected Member Functions inherited from ADDON::CAddon
virtual bool SettingsInitialized (AddonInstanceId id=ADDON_SETTINGS_ID) const
 Whether or not the settings have been initialized.
 
virtual bool SettingsLoaded (AddonInstanceId id=ADDON_SETTINGS_ID) const
 Whether or not the settings have been loaded.
 
bool LoadSettings (bool bForce, bool loadUserSettings, AddonInstanceId id=ADDON_SETTINGS_ID)
 Load the default settings and override these with any previously configured user settings.
 
virtual bool LoadUserSettings (AddonInstanceId id=ADDON_SETTINGS_ID)
 Load the user settings.
 
virtual bool HasSettingsToSave (AddonInstanceId id=ADDON_SETTINGS_ID) const
 Whether there are settings to be saved.
 
virtual bool SettingsFromXML (const CXBMCTinyXML &doc, bool loadDefaults, AddonInstanceId id=ADDON_SETTINGS_ID)
 Parse settings from an XML document.
 
virtual bool SettingsToXML (CXBMCTinyXML &doc, AddonInstanceId id=ADDON_SETTINGS_ID) const
 Write settings into an XML document.
 
- Protected Attributes inherited from ADDON::CAddon
const AddonInfoPtr m_addonInfo
 

Constructor & Destructor Documentation

◆ CController()

CController::CController ( const ADDON::AddonInfoPtr & addonInfo)
explicit

◆ ~CController()

CController::~CController ( )
overridedefault

Member Function Documentation

◆ CanHaveAddonOrInstanceSettings()

bool KODI::GAME::CController::CanHaveAddonOrInstanceSettings ( )
inlineoverridevirtual

Check whether this add-on can be configured by the user.

Returns
true if the add-on has settings, false otherwise

Reimplemented from ADDON::CAddon.

◆ FeatureCount()

unsigned int CController::FeatureCount ( FEATURE_TYPE type = FEATURE_TYPE::UNKNOWN,
JOYSTICK::INPUT_TYPE inputType = JOYSTICK::INPUT_TYPE::UNKNOWN ) const

Get the count of controller features matching the specified types.

Parameters
typeThe feature type, or FEATURE_TYPE::UNKNOWN to match all feature types
inputTypeThe input type, or INPUT_TYPE::UNKNOWN to match all input types
Returns
The feature count

◆ Features()

const std::vector< CPhysicalFeature > & KODI::GAME::CController::Features ( void ) const
inline

Get all controller features.

Returns
The features

◆ FeatureType()

JOYSTICK::FEATURE_TYPE CController::FeatureType ( const std::string & feature) const

Get the type of the specified feature.

Parameters
featureThe feature name to look up
Returns
The feature type, or FEATURE_TYPE::UNKNOWN if an invalid feature was specified

◆ GetFeature()

const CPhysicalFeature & CController::GetFeature ( const std::string & name) const

Get a feature by its name.

Parameters
nameThe feature name
Returns
The feature, or a feature of type FEATURE_TYPE::UNKNOWN if the name is invalid

◆ GetFeatures()

void CController::GetFeatures ( std::vector< std::string > & features,
FEATURE_TYPE type = FEATURE_TYPE::UNKNOWN ) const

Get the features matching the specified type.

Parameters
typeThe feature type, or FEATURE_TYPE::UNKNOWN to get all features

◆ GetInputType()

JOYSTICK::INPUT_TYPE CController::GetInputType ( const std::string & feature) const

Get the input type of the specified feature.

Parameters
featureThe feature name to look up
Returns
The input type of the feature, or INPUT_TYPE::UNKNOWN if unknown

◆ Layout()

const CControllerLayout & KODI::GAME::CController::Layout ( void ) const
inline

Get the controller layout.

◆ LoadLayout()

bool CController::LoadLayout ( void )

Load the controller layout.

Returns
true if the layout is loaded or was already loaded, false otherwise

◆ Topology()

const CPhysicalTopology & CController::Topology ( ) const

Get the controller's physical topology.

This defines how controllers physically connect to each other.

Returns
The physical topology of the controller

Member Data Documentation

◆ EmptyPtr

const ControllerPtr CController::EmptyPtr
static

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