Inherits IAddonInstance.
Public Member Functions | |
const std::string | AddonPath () const |
Used to get the full path where the add-on is installed. | |
CInstancePeripheral () | |
Peripheral class constructor. | |
CInstancePeripheral (const IInstanceInfo &instance) | |
Peripheral addon class constructor used to support multiple instance types. | |
unsigned int | 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 | FeatureType (const std::string &controllerId, const std::string &featureName) |
Return the type of the feature. | |
virtual PERIPHERAL_ERROR | GetAppearance (const kodi::addon::Joystick &joystick, std::string &controllerId) |
Get the ID of the controller that best represents the peripheral's appearance. | |
virtual void | GetCapabilities (kodi::addon::PeripheralCapabilities &capabilities) |
Get the list of features that this add-on provides. | |
virtual PERIPHERAL_ERROR | GetEvents (std::vector< kodi::addon::PeripheralEvent > &events) |
Get all events that have occurred since the last call to GetEvents(). | |
virtual PERIPHERAL_ERROR | GetFeatures (const kodi::addon::Joystick &joystick, const std::string &controller_id, std::vector< kodi::addon::JoystickFeature > &features) |
Get the features that allow translating the joystick into the controller profile. | |
virtual PERIPHERAL_ERROR | GetIgnoredPrimitives (const kodi::addon::Joystick &joystick, std::vector< kodi::addon::DriverPrimitive > &primitives) |
Get the driver primitives that should be ignored while mapping the device. | |
virtual PERIPHERAL_ERROR | GetJoystickInfo (unsigned int index, kodi::addon::Joystick &info) |
Get extended info about an attached joystick. | |
virtual PERIPHERAL_ERROR | MapFeatures (const kodi::addon::Joystick &joystick, const std::string &controller_id, const std::vector< kodi::addon::JoystickFeature > &features) |
Add or update joystick features. | |
virtual PERIPHERAL_ERROR | PerformDeviceScan (std::vector< std::shared_ptr< kodi::addon::Peripheral > > &scan_results) |
Perform a scan for joysticks. | |
virtual void | PowerOffJoystick (unsigned int index) |
Powers off the given joystick if supported. | |
void | RefreshButtonMaps (const std::string &deviceName="", const std::string &controllerId="") |
Notify the frontend that button maps have changed. | |
virtual void | ResetButtonMap (const kodi::addon::Joystick &joystick, const std::string &controller_id) |
Reset the button map for the given joystick and controller profile ID. | |
virtual void | RevertButtonMap (const kodi::addon::Joystick &joystick) |
Revert the button map to the last time it was loaded or committed to disk. | |
virtual void | SaveButtonMap (const kodi::addon::Joystick &joystick) |
Save the button map for the given joystick. | |
virtual bool | SendEvent (const kodi::addon::PeripheralEvent &event) |
Send an input event to the peripheral. | |
virtual PERIPHERAL_ERROR | SetAppearance (const kodi::addon::Joystick &joystick, const std::string &controllerId) |
Set the ID of the controller that best represents the peripheral's appearance. | |
virtual PERIPHERAL_ERROR | SetIgnoredPrimitives (const kodi::addon::Joystick &joystick, const std::vector< kodi::addon::DriverPrimitive > &primitives) |
Set the list of driver primitives that are ignored for the device. | |
void | TriggerScan (void) |
Trigger a scan for peripherals. | |
const std::string | UserPath () const |
Used to get the full path to the add-on's user profile. | |
~CInstancePeripheral () override=default | |
Destructor. | |
Public Member Functions inherited from IAddonInstance | |
bool | CheckInstanceSettingBoolean (const std::string &settingName, bool &settingValue) |
template<typename enumType > | |
bool | CheckInstanceSettingEnum (const std::string &settingName, enumType &settingValue) |
bool | CheckInstanceSettingFloat (const std::string &settingName, float &settingValue) |
bool | CheckInstanceSettingInt (const std::string &settingName, int &settingValue) |
bool | CheckInstanceSettingString (const std::string &settingName, std::string &settingValue) |
virtual ADDON_STATUS | CreateInstance (const kodi::addon::IInstanceInfo &instance, KODI_ADDON_INSTANCE_HDL &hdl) |
std::string | GetInstanceAPIVersion () const |
bool | GetInstanceSettingBoolean (const std::string &settingName, bool defaultValue=false) |
template<typename enumType > | |
enumType | GetInstanceSettingEnum (const std::string &settingName, enumType defaultValue=static_cast< enumType >(0)) |
float | GetInstanceSettingFloat (const std::string &settingName, float defaultValue=0.0f) |
int | GetInstanceSettingInt (const std::string &settingName, int defaultValue=0) |
std::string | GetInstanceSettingString (const std::string &settingName, const std::string &defaultValue="") |
std::string | GetInstanceUserPath (const std::string &append="") |
IAddonInstance (const kodi::addon::IInstanceInfo &instance) | |
bool | IsInstanceSettingUsingDefault (const std::string &settingName) |
virtual ADDON_STATUS | SetInstanceSetting (const std::string &settingName, const kodi::addon::CSettingValue &settingValue) |
void | SetInstanceSettingBoolean (const std::string &settingName, bool settingValue) |
template<typename enumType > | |
void | SetInstanceSettingEnum (const std::string &settingName, enumType settingValue) |
void | SetInstanceSettingFloat (const std::string &settingName, float settingValue) |
void | SetInstanceSettingInt (const std::string &settingName, int settingValue) |
void | SetInstanceSettingString (const std::string &settingName, const std::string &settingValue) |