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

Wrapper class providing peripheral information
Classes can extend Peripheral to inherit peripheral properties. More...

Classes

class  kodi::addon::Peripheral
 

Functions

 kodi::addon::Peripheral::Peripheral (PERIPHERAL_TYPE type=PERIPHERAL_TYPE_UNKNOWN, const std::string &strName="")
 Constructor.
 
virtual kodi::addon::Peripheral::~Peripheral (void)=default
 Destructor.
 
bool kodi::addon::Peripheral::operator== (const Peripheral &rhs) const
 Comparison operator.
 
PERIPHERAL_TYPE kodi::addon::Peripheral::Type (void) const
 Get peripheral type.
 
const std::string & kodi::addon::Peripheral::Name (void) const
 Get peripheral name.
 
uint16_t kodi::addon::Peripheral::VendorID (void) const
 Get peripheral vendor id.
 
uint16_t kodi::addon::Peripheral::ProductID (void) const
 Get peripheral product id.
 
unsigned int kodi::addon::Peripheral::Index (void) const
 Get peripheral index identifier.
 
bool kodi::addon::Peripheral::IsVidPidKnown (void) const
 Check VID and PID are known.
 
void kodi::addon::Peripheral::SetType (PERIPHERAL_TYPE type)
 Set peripheral type.
 
void kodi::addon::Peripheral::SetName (const std::string &strName)
 Set peripheral name.
 
void kodi::addon::Peripheral::SetVendorID (uint16_t vendorId)
 Set peripheral vendor id.
 
void kodi::addon::Peripheral::SetProductID (uint16_t productId)
 Set peripheral product identifier.
 
void kodi::addon::Peripheral::SetIndex (unsigned int index)
 Set peripheral index.
 

Detailed Description

Wrapper class providing peripheral information
Classes can extend Peripheral to inherit peripheral properties.

Used on kodi::addon::CInstancePeripheral::PerformDeviceScan().


@ingroup cpp_kodi_addon_peripheral_Defs_Peripheral_Peripheral

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

Name Type Set call Get call
Peripheral type PERIPHERAL_TYPE SetType Type
Peripheral name const std::string& SetName Name
Peripheral vendor id uint16_t SetVendorID VendorID
Peripheral product id uint16_t SetProductID ProductID
Peripheral index unsigned int SetIndex Index

Further are following included:

Function Documentation

◆ Index()

unsigned int kodi::addon::Peripheral::Index ( void ) const
inline

Get peripheral index identifier.

Returns
Index number

◆ IsVidPidKnown()

bool kodi::addon::Peripheral::IsVidPidKnown ( void ) const
inline

Check VID and PID are known.

Returns
true if VID and PID are not 0
Note
Derived property: VID and PID are 0x0000 if unknown

◆ Name()

const std::string & kodi::addon::Peripheral::Name ( void ) const
inline

Get peripheral name.

Returns
Name string of peripheral

◆ operator==()

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

Comparison operator.

Note
The index is not included in the comparison because it is affected by the presence of other peripherals

◆ Peripheral()

kodi::addon::Peripheral::Peripheral ( PERIPHERAL_TYPE type = PERIPHERAL_TYPE_UNKNOWN,
const std::string & strName = "" )
inline

Constructor.

Parameters
[in]type[optional] Peripheral type, or PERIPHERAL_TYPE_UNKNOWN as default
[in]strName[optional] Name of related peripheral

◆ ProductID()

uint16_t kodi::addon::Peripheral::ProductID ( void ) const
inline

Get peripheral product id.

Returns
Product id

◆ SetIndex()

void kodi::addon::Peripheral::SetIndex ( unsigned int index)
inline

Set peripheral index.

Parameters
[in]indexType to set

◆ SetName()

void kodi::addon::Peripheral::SetName ( const std::string & strName)
inline

Set peripheral name.

Parameters
[in]strNameName to set

◆ SetProductID()

void kodi::addon::Peripheral::SetProductID ( uint16_t productId)
inline

Set peripheral product identifier.

Parameters
[in]productIdType to set

◆ SetType()

void kodi::addon::Peripheral::SetType ( PERIPHERAL_TYPE type)
inline

Set peripheral type.

Parameters
[in]typeType to set

◆ SetVendorID()

void kodi::addon::Peripheral::SetVendorID ( uint16_t vendorId)
inline

Set peripheral vendor id.

Parameters
[in]vendorIdType to set

◆ Type()

PERIPHERAL_TYPE kodi::addon::Peripheral::Type ( void ) const
inline

Get peripheral type.

Returns
Type defined with PERIPHERAL_TYPE

◆ VendorID()

uint16_t kodi::addon::Peripheral::VendorID ( void ) const
inline

Get peripheral vendor id.

Returns
Vendor id

◆ ~Peripheral()

virtual kodi::addon::Peripheral::~Peripheral ( void )
virtualdefault

Destructor.