Kodi Docs 20.0
Kodi is an open source media player and entertainment hub.

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. More...
 
virtual kodi::addon::Peripheral::~Peripheral (void)=default
 Destructor. More...
 
PERIPHERAL_TYPE kodi::addon::Peripheral::Type (void) const
 Get peripheral type. More...
 
const std::string & kodi::addon::Peripheral::Name (void) const
 Get peripheral name. More...
 
uint16_t kodi::addon::Peripheral::VendorID (void) const
 Get peripheral vendor id. More...
 
uint16_t kodi::addon::Peripheral::ProductID (void) const
 Get peripheral product id. More...
 
unsigned int kodi::addon::Peripheral::Index (void) const
 Get peripheral index identifier. More...
 
bool kodi::addon::Peripheral::IsVidPidKnown (void) const
 Check VID and PID are known. More...
 
void kodi::addon::Peripheral::SetType (PERIPHERAL_TYPE type)
 Set peripheral type. More...
 
void kodi::addon::Peripheral::SetName (const std::string &strName)
 Set peripheral name. More...
 
void kodi::addon::Peripheral::SetVendorID (uint16_t vendorId)
 Set peripheral vendor id. More...
 
void kodi::addon::Peripheral::SetProductID (uint16_t productId)
 Set peripheral product identifier. More...
 
void kodi::addon::Peripheral::SetIndex (unsigned int index)
 Set peripheral index. More...
 

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

◆ 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.