Kodi Development  20.0
for Binary and Script based Add-Ons

Detailed Description

Callback to Kodi functions.

Function Documentation

◆ AddonPath()

const std::string AddonPath ( ) const
inline

Used to get the full path where the add-on is installed.

Returns
The add-on installation path

◆ UserPath()

const std::string UserPath ( ) const
inline

Used to get the full path to the add-on's user profile.

Note
The trailing folder (consisting of the add-on's ID) is not created by default. If it is needed, you must call kodi::vfs::CreateDirectory() to create the folder.
Returns
Path to the user profile

◆ TriggerScan()

void TriggerScan ( void  )
inline

Trigger a scan for peripherals.

The add-on calls this if a change in hardware is detected.

◆ RefreshButtonMaps()

void RefreshButtonMaps ( const std::string &  deviceName = "",
const std::string &  controllerId = "" 
)
inline

Notify the frontend that button maps have changed.

Parameters
[in]deviceName[optional] The name of the device to refresh, or empty/null for all devices
[in]controllerId[optional] The controller ID to refresh, or empty/null for all controllers

◆ FeatureCount()

unsigned int FeatureCount ( const std::string &  controllerId,
JOYSTICK_FEATURE_TYPE  type = JOYSTICK_FEATURE_TYPE_UNKNOWN 
)
inline

Return the number of features belonging to the specified controller.

Parameters
[in]controllerIdThe controller ID to enumerate
[in]type[optional] Type to filter by, or JOYSTICK_FEATURE_TYPE_UNKNOWN for all features
Returns
The number of features matching the request parameters

◆ FeatureType()

JOYSTICK_FEATURE_TYPE FeatureType ( const std::string &  controllerId,
const std::string &  featureName 
)
inline

Return the type of the feature.

Parameters
[in]controllerIdThe controller ID to check
[in]featureNameThe feature to check
Returns
The type of the specified feature, or JOYSTICK_FEATURE_TYPE_UNKNOWN if unknown