Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches

Callback to Kodi functions. More...

Functions

const std::string kodi::addon::CInstancePeripheral::AddonPath () const
 Used to get the full path where the add-on is installed.
 
const std::string kodi::addon::CInstancePeripheral::UserPath () const
 Used to get the full path to the add-on's user profile.
 
void kodi::addon::CInstancePeripheral::TriggerScan (void)
 Trigger a scan for peripherals.
 
void kodi::addon::CInstancePeripheral::RefreshButtonMaps (const std::string &deviceName="", const std::string &controllerId="")
 Notify the frontend that button maps have changed.
 
unsigned int kodi::addon::CInstancePeripheral::FeatureCount (const std::string &controllerId, JOYSTICK_FEATURE_TYPE type=JOYSTICK_FEATURE_TYPE_UNKNOWN)
 Return the number of features belonging to the specified controller.
 
JOYSTICK_FEATURE_TYPE kodi::addon::CInstancePeripheral::FeatureType (const std::string &controllerId, const std::string &featureName)
 Return the type of the feature.
 

Detailed Description

Callback to Kodi functions.

Function Documentation

◆ AddonPath()

const std::string kodi::addon::CInstancePeripheral::AddonPath ( ) const
inline

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

Returns
The add-on installation path

◆ FeatureCount()

unsigned int kodi::addon::CInstancePeripheral::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 kodi::addon::CInstancePeripheral::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

◆ RefreshButtonMaps()

void kodi::addon::CInstancePeripheral::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

◆ TriggerScan()

void kodi::addon::CInstancePeripheral::TriggerScan ( void )
inline

Trigger a scan for peripherals.

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

◆ UserPath()

const std::string kodi::addon::CInstancePeripheral::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