Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
kodi::addon::CInstancePeripheral Class Reference

#include <Peripheral.h>

Inheritance diagram for kodi::addon::CInstancePeripheral:
kodi::addon::IAddonInstance

Public Member Functions

 CInstancePeripheral ()
 Peripheral class constructor.
 
 CInstancePeripheral (const IInstanceInfo &instance)
 Peripheral addon class constructor used to support multiple instance types.
 
 ~CInstancePeripheral () override=default
 Destructor.
 
virtual void GetCapabilities (kodi::addon::PeripheralCapabilities &capabilities)
 Get the list of features that this add-on provides.
 
virtual PERIPHERAL_ERROR PerformDeviceScan (std::vector< std::shared_ptr< kodi::addon::Peripheral > > &scan_results)
 Perform a scan for joysticks.
 
virtual PERIPHERAL_ERROR GetEvents (std::vector< kodi::addon::PeripheralEvent > &events)
 Get all events that have occurred since the last call to GetEvents().
 
virtual bool SendEvent (const kodi::addon::PeripheralEvent &event)
 Send an input event to the peripheral.
 
virtual PERIPHERAL_ERROR GetJoystickInfo (unsigned int index, kodi::addon::Joystick &info)
 Get extended info about an attached joystick.
 
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 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 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 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 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 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.
 
virtual void SaveButtonMap (const kodi::addon::Joystick &joystick)
 Save the button map for the given joystick.
 
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 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 PowerOffJoystick (unsigned int index)
 Powers off the given joystick if supported.
 
const std::string AddonPath () const
 Used to get the full path where the add-on is installed.
 
const std::string UserPath () const
 Used to get the full path to the add-on's user profile.
 
void TriggerScan (void)
 Trigger a scan for peripherals.
 
void RefreshButtonMaps (const std::string &deviceName="", const std::string &controllerId="")
 Notify the frontend that button maps have changed.
 
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.
 
- Public Member Functions inherited from kodi::addon::IAddonInstance
 IAddonInstance (const kodi::addon::IInstanceInfo &instance)
 
virtual ~IAddonInstance ()=default
 
virtual ADDON_STATUS CreateInstance (const kodi::addon::IInstanceInfo &instance, KODI_ADDON_INSTANCE_HDL &hdl)
 
std::string GetInstanceAPIVersion () const
 
virtual ADDON_STATUS SetInstanceSetting (const std::string &settingName, const kodi::addon::CSettingValue &settingValue)
 
bool IsInstanceSettingUsingDefault (const std::string &settingName)
 
std::string GetInstanceUserPath (const std::string &append="")
 
bool CheckInstanceSettingString (const std::string &settingName, std::string &settingValue)
 
std::string GetInstanceSettingString (const std::string &settingName, const std::string &defaultValue="")
 
void SetInstanceSettingString (const std::string &settingName, const std::string &settingValue)
 
bool CheckInstanceSettingInt (const std::string &settingName, int &settingValue)
 
int GetInstanceSettingInt (const std::string &settingName, int defaultValue=0)
 
void SetInstanceSettingInt (const std::string &settingName, int settingValue)
 
bool CheckInstanceSettingBoolean (const std::string &settingName, bool &settingValue)
 
bool GetInstanceSettingBoolean (const std::string &settingName, bool defaultValue=false)
 
void SetInstanceSettingBoolean (const std::string &settingName, bool settingValue)
 
bool CheckInstanceSettingFloat (const std::string &settingName, float &settingValue)
 
float GetInstanceSettingFloat (const std::string &settingName, float defaultValue=0.0f)
 
void SetInstanceSettingFloat (const std::string &settingName, float settingValue)
 
template<typename enumType >
bool CheckInstanceSettingEnum (const std::string &settingName, enumType &settingValue)
 
template<typename enumType >
enumType GetInstanceSettingEnum (const std::string &settingName, enumType defaultValue=static_cast< enumType >(0))
 
template<typename enumType >
void SetInstanceSettingEnum (const std::string &settingName, enumType settingValue)
 

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