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

Wrapper class providing additional joystick information
This is a child class to expand another class with necessary joystick data. More...

Classes

class  kodi::addon::Joystick
 

Functions

 kodi::addon::Joystick::Joystick (const std::string &provider="", const std::string &strName="")
 Constructor.
 
 kodi::addon::Joystick::Joystick (const Joystick &other)
 Class copy constructor.
 
 kodi::addon::Joystick::~Joystick (void) override=default
 Destructor.
 
Joystickkodi::addon::Joystick::operator= (const Joystick &rhs)
 Copy data from another Joystick class to here.
 
bool kodi::addon::Joystick::operator== (const Joystick &rhs) const
 Comparison operator.
 
const std::string & kodi::addon::Joystick::Provider (void) const
 Get provider name.
 
int kodi::addon::Joystick::RequestedPort (void) const
 Get requested port number.
 
unsigned int kodi::addon::Joystick::ButtonCount (void) const
 Get button count.
 
unsigned int kodi::addon::Joystick::HatCount (void) const
 Get hat count.
 
unsigned int kodi::addon::Joystick::AxisCount (void) const
 Get axis count.
 
unsigned int kodi::addon::Joystick::MotorCount (void) const
 Get motor count.
 
bool kodi::addon::Joystick::SupportsPowerOff (void) const
 Get supports power off.
 
void kodi::addon::Joystick::SetProvider (const std::string &provider)
 Set provider name.
 
void kodi::addon::Joystick::SetRequestedPort (int requestedPort)
 Get requested port number.
 
void kodi::addon::Joystick::SetButtonCount (unsigned int buttonCount)
 Get button count.
 
void kodi::addon::Joystick::SetHatCount (unsigned int hatCount)
 Get hat count.
 
void kodi::addon::Joystick::SetAxisCount (unsigned int axisCount)
 Get axis count.
 
void kodi::addon::Joystick::SetMotorCount (unsigned int motorCount)
 Get motor count.
 
void kodi::addon::Joystick::SetSupportsPowerOff (bool supportsPowerOff)
 Get supports power off.
 

Detailed Description

Wrapper class providing additional joystick information
This is a child class to expand another class with necessary joystick data.

For data not provided by class Peripheral.

Used on:


@ingroup cpp_kodi_addon_peripheral_Defs_Joystick_Joystick

The following table contains values that can be set with class Joystick :

Name Type Class Set call Get call
Joystick provider const std::string& Joystick SetProvider Provider
Joystick requested port int Joystick SetRequestedPort RequestedPort
Joystick button count unsigned int Joystick SetButtonCount ButtonCount
Joystick hat count unsigned int Joystick SetHatCount HatCount
Joystick axis count unsigned int Joystick SetAxisCount AxisCount
Joystick motor count unsigned int Joystick SetMotorCount MotorCount
Joystick support power off bool Joystick SetSupportsPowerOff SupportsPowerOff
Peripheral type PERIPHERAL_TYPE Peripheral SetType Type
Peripheral name const std::string& Peripheral SetName Name
Peripheral vendor id uint16_t Peripheral SetVendorID VendorID
Peripheral product id uint16_t Peripheral SetProductID ProductID
Peripheral index unsigned int Peripheral SetIndex Index

Further are following included:

Function Documentation

◆ AxisCount()

unsigned int kodi::addon::Joystick::AxisCount ( void ) const
inline

Get axis count.

Returns
Axis count

◆ ButtonCount()

unsigned int kodi::addon::Joystick::ButtonCount ( void ) const
inline

Get button count.

Returns
Button count

◆ HatCount()

unsigned int kodi::addon::Joystick::HatCount ( void ) const
inline

Get hat count.

Returns
Hat count

◆ Joystick() [1/2]

kodi::addon::Joystick::Joystick ( const Joystick & other)
inline

Class copy constructor.

Parameters
[in]otherOther class to copy on construct here

◆ Joystick() [2/2]

kodi::addon::Joystick::Joystick ( const std::string & provider = "",
const std::string & strName = "" )
inline

Constructor.

Parameters
[in]provider[optional] Provide name
[in]strName[optional] Name of related joystick

◆ MotorCount()

unsigned int kodi::addon::Joystick::MotorCount ( void ) const
inline

Get motor count.

Returns
Motor count

◆ operator=()

Joystick & kodi::addon::Joystick::operator= ( const Joystick & rhs)
inline

Copy data from another Joystick class to here.

Parameters
[in]otherOther class to copy here

◆ operator==()

bool kodi::addon::Joystick::operator== ( const Joystick & rhs) const
inline

Comparison operator.

◆ Provider()

const std::string & kodi::addon::Joystick::Provider ( void ) const
inline

Get provider name.

Returns
Name of provider

◆ RequestedPort()

int kodi::addon::Joystick::RequestedPort ( void ) const
inline

Get requested port number.

Returns
Port

◆ SetAxisCount()

void kodi::addon::Joystick::SetAxisCount ( unsigned int axisCount)
inline

Get axis count.

Parameters
[in]axisCountAxis count

◆ SetButtonCount()

void kodi::addon::Joystick::SetButtonCount ( unsigned int buttonCount)
inline

Get button count.

Parameters
[in]buttonCountButton count

◆ SetHatCount()

void kodi::addon::Joystick::SetHatCount ( unsigned int hatCount)
inline

Get hat count.

Parameters
[in]hatCountHat count

◆ SetMotorCount()

void kodi::addon::Joystick::SetMotorCount ( unsigned int motorCount)
inline

Get motor count.

Parameters
[in]motorCountMotor count

◆ SetProvider()

void kodi::addon::Joystick::SetProvider ( const std::string & provider)
inline

Set provider name.

Parameters
[in]providerName of provider

◆ SetRequestedPort()

void kodi::addon::Joystick::SetRequestedPort ( int requestedPort)
inline

Get requested port number.

Parameters
[in]requestedPortPort

◆ SetSupportsPowerOff()

void kodi::addon::Joystick::SetSupportsPowerOff ( bool supportsPowerOff)
inline

Get supports power off.

Parameters
[in]supportsPowerOffTrue if power off is supported, false otherwise

◆ SupportsPowerOff()

bool kodi::addon::Joystick::SupportsPowerOff ( void ) const
inline

Get supports power off.

Returns
True if power off is supported, false otherwise

◆ ~Joystick()

kodi::addon::Joystick::~Joystick ( void )
overridedefault

Destructor.