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

#include <PeripheralAddon.h>

Inheritance diagram for PERIPHERALS::CPeripheralAddon:
ADDON::IAddonInstanceHandler

Public Member Functions

 CPeripheralAddon (const ADDON::AddonInfoPtr &addonInfo, CPeripherals &manager)
 
 ~CPeripheralAddon (void) override
 
bool CreateAddon (void)
 Initialise the instance of this add-on.
 
void DestroyAddon ()
 Deinitialize the instance of this add-on.
 
bool Register (unsigned int peripheralIndex, const PeripheralPtr &peripheral)
 
void UnregisterRemovedDevices (const PeripheralScanResults &results, PeripheralVector &removedPeripherals)
 
void GetFeatures (std::vector< PeripheralFeature > &features) const
 
bool HasFeature (const PeripheralFeature feature) const
 
PeripheralPtr GetPeripheral (unsigned int index) const
 
PeripheralPtr GetByPath (const std::string &strPath) const
 
bool SupportsFeature (PeripheralFeature feature) const
 
unsigned int GetPeripheralsWithFeature (PeripheralVector &results, const PeripheralFeature feature) const
 
unsigned int GetNumberOfPeripherals (void) const
 
unsigned int GetNumberOfPeripheralsWithId (const int iVendorId, const int iProductId) const
 
void GetDirectory (const std::string &strPath, CFileItemList &items) const
 
Peripheral add-on methods
bool PerformDeviceScan (PeripheralScanResults &results)
 
bool ProcessEvents (void)
 
bool SendRumbleEvent (unsigned int index, unsigned int driverIndex, float magnitude)
 
- Public Member Functions inherited from ADDON::IAddonInstanceHandler
 IAddonInstanceHandler (ADDON_TYPE type, const AddonInfoPtr &addonInfo, AddonInstanceId instanceId=ADDON_INSTANCE_ID_UNUSED, KODI_HANDLE parentInstance=nullptr, const std::string &uniqueWorkID="")
 Class constructor for handling add-on instance processes, allowing an add-on to handle multiple work simultaneously and independently.
 
virtual ~IAddonInstanceHandler ()
 
ADDON_TYPE UsedType () const
 
AddonInstanceId InstanceId () const
 
const std::string & UniqueWorkID ()
 
std::string ID () const
 
std::string Name () const
 
std::string Author () const
 
std::string Icon () const
 
std::string Path () const
 
std::string Profile () const
 
CAddonVersion Version () const
 
ADDON_STATUS CreateInstance ()
 
void DestroyInstance ()
 
const AddonDllPtrAddon () const
 
AddonInfoPtr GetAddonInfo () const
 
virtual void OnPreInstall ()
 
virtual void OnPostInstall (bool update, bool modal)
 
virtual void OnPreUnInstall ()
 
virtual void OnPostUnInstall ()
 

Joystick methods

bool GetJoystickProperties (unsigned int index, CPeripheralJoystick &joystick)
 
bool HasButtonMaps (void) const
 
bool GetAppearance (const CPeripheral *device, std::string &controllerId)
 
bool SetAppearance (const CPeripheral *device, const std::string &controllerId)
 
bool GetFeatures (const CPeripheral *device, const std::string &strControllerId, FeatureMap &features)
 
bool MapFeature (const CPeripheral *device, const std::string &strControllerId, const kodi::addon::JoystickFeature &feature)
 
bool GetIgnoredPrimitives (const CPeripheral *device, PrimitiveVector &primitives)
 
bool SetIgnoredPrimitives (const CPeripheral *device, const PrimitiveVector &primitives)
 
void SaveButtonMap (const CPeripheral *device)
 
void RevertButtonMap (const CPeripheral *device)
 
void ResetButtonMap (const CPeripheral *device, const std::string &strControllerId)
 
void PowerOffJoystick (unsigned int index)
 
void RegisterButtonMap (CPeripheral *device, KODI::JOYSTICK::IButtonMap *buttonMap)
 
void UnregisterButtonMap (KODI::JOYSTICK::IButtonMap *buttonMap)
 
static bool ProvidesJoysticks (const ADDON::AddonInfoPtr &addonInfo)
 
static bool ProvidesButtonMaps (const ADDON::AddonInfoPtr &addonInfo)
 

Additional Inherited Members

- Protected Attributes inherited from ADDON::IAddonInstanceHandler
KODI_ADDON_INSTANCE_INFO m_info {}
 
KODI_ADDON_INSTANCE_STRUCT m_ifc {}
 

Constructor & Destructor Documentation

◆ CPeripheralAddon()

CPeripheralAddon::CPeripheralAddon ( const ADDON::AddonInfoPtr & addonInfo,
CPeripherals & manager )
explicit

◆ ~CPeripheralAddon()

CPeripheralAddon::~CPeripheralAddon ( void )
override

Member Function Documentation

◆ CreateAddon()

bool CPeripheralAddon::CreateAddon ( void )

Initialise the instance of this add-on.

◆ DestroyAddon()

void CPeripheralAddon::DestroyAddon ( )

Deinitialize the instance of this add-on.

◆ GetAppearance()

bool CPeripheralAddon::GetAppearance ( const CPeripheral * device,
std::string & controllerId )

◆ GetByPath()

PeripheralPtr CPeripheralAddon::GetByPath ( const std::string & strPath) const

◆ GetDirectory()

void CPeripheralAddon::GetDirectory ( const std::string & strPath,
CFileItemList & items ) const

◆ GetFeatures() [1/2]

bool CPeripheralAddon::GetFeatures ( const CPeripheral * device,
const std::string & strControllerId,
FeatureMap & features )

◆ GetFeatures() [2/2]

void CPeripheralAddon::GetFeatures ( std::vector< PeripheralFeature > & features) const

◆ GetIgnoredPrimitives()

bool CPeripheralAddon::GetIgnoredPrimitives ( const CPeripheral * device,
PrimitiveVector & primitives )

◆ GetJoystickProperties()

bool CPeripheralAddon::GetJoystickProperties ( unsigned int index,
CPeripheralJoystick & joystick )

◆ GetNumberOfPeripherals()

unsigned int CPeripheralAddon::GetNumberOfPeripherals ( void ) const

◆ GetNumberOfPeripheralsWithId()

unsigned int CPeripheralAddon::GetNumberOfPeripheralsWithId ( const int iVendorId,
const int iProductId ) const

◆ GetPeripheral()

PeripheralPtr CPeripheralAddon::GetPeripheral ( unsigned int index) const

◆ GetPeripheralsWithFeature()

unsigned int CPeripheralAddon::GetPeripheralsWithFeature ( PeripheralVector & results,
const PeripheralFeature feature ) const

◆ HasButtonMaps()

bool PERIPHERALS::CPeripheralAddon::HasButtonMaps ( void ) const
inline

◆ HasFeature()

bool CPeripheralAddon::HasFeature ( const PeripheralFeature feature) const

◆ MapFeature()

bool CPeripheralAddon::MapFeature ( const CPeripheral * device,
const std::string & strControllerId,
const kodi::addon::JoystickFeature & feature )

◆ PerformDeviceScan()

bool CPeripheralAddon::PerformDeviceScan ( PeripheralScanResults & results)

◆ PowerOffJoystick()

void CPeripheralAddon::PowerOffJoystick ( unsigned int index)

◆ ProcessEvents()

bool CPeripheralAddon::ProcessEvents ( void )

◆ ProvidesButtonMaps()

bool CPeripheralAddon::ProvidesButtonMaps ( const ADDON::AddonInfoPtr & addonInfo)
static

◆ ProvidesJoysticks()

bool CPeripheralAddon::ProvidesJoysticks ( const ADDON::AddonInfoPtr & addonInfo)
static

◆ Register()

bool CPeripheralAddon::Register ( unsigned int peripheralIndex,
const PeripheralPtr & peripheral )

◆ RegisterButtonMap()

void CPeripheralAddon::RegisterButtonMap ( CPeripheral * device,
KODI::JOYSTICK::IButtonMap * buttonMap )

◆ ResetButtonMap()

void CPeripheralAddon::ResetButtonMap ( const CPeripheral * device,
const std::string & strControllerId )

◆ RevertButtonMap()

void CPeripheralAddon::RevertButtonMap ( const CPeripheral * device)

◆ SaveButtonMap()

void CPeripheralAddon::SaveButtonMap ( const CPeripheral * device)

◆ SendRumbleEvent()

bool CPeripheralAddon::SendRumbleEvent ( unsigned int index,
unsigned int driverIndex,
float magnitude )

◆ SetAppearance()

bool CPeripheralAddon::SetAppearance ( const CPeripheral * device,
const std::string & controllerId )

◆ SetIgnoredPrimitives()

bool CPeripheralAddon::SetIgnoredPrimitives ( const CPeripheral * device,
const PrimitiveVector & primitives )

◆ SupportsFeature()

bool CPeripheralAddon::SupportsFeature ( PeripheralFeature feature) const

◆ UnregisterButtonMap()

void CPeripheralAddon::UnregisterButtonMap ( KODI::JOYSTICK::IButtonMap * buttonMap)

◆ UnregisterRemovedDevices()

void CPeripheralAddon::UnregisterRemovedDevices ( const PeripheralScanResults & results,
PeripheralVector & removedPeripherals )

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