| 
    Kodi Documentation 22.0
    
   Kodi is an open source media player and entertainment hub. 
   | 
 
Class:  kodi::addon::CInstancePeripheral Topics | |
| Peripheral system | |
| System description.  | |
| Definitions, structures and enumerators | |
| Peripheral add-on general variables  | |
| 1. Peripheral operations | |
| Peripheral operations to handle control about.  | |
| 2. Joystick operations | |
| Joystick operations to handle control about.  | |
| 3. Callback functions | |
| Callback to Kodi functions.  | |
Functions | |
| kodi::addon::CInstancePeripheral::CInstancePeripheral () | |
| Peripheral class constructor.   | |
| kodi::addon::CInstancePeripheral::CInstancePeripheral (const IInstanceInfo &instance) | |
| Peripheral addon class constructor used to support multiple instance types.   | |
| kodi::addon::CInstancePeripheral::~CInstancePeripheral () override=default | |
| Destructor.   | |
Class:  kodi::addon::CInstancePeripheral The peripheral add-ons provides access to many joystick and gamepad interfaces across various platforms. An input addon is used to map the buttons/axis on your physical input device, to the buttons/axis of your virtual system. This is necessary because different retro systems usually have different button layouts. A controller configuration utility is also in the works.
Here is an example of what the addon.xml.in would look like for an peripheral addon:
Description to peripheral related addon.xml values:
| Name | Description | 
|---|---|
provides_joysticks    | Set to "true" if addon provides joystick support. | 
provides_buttonmaps    | Set to "true" if button map is used and supported by addon. | 
point    | Addon type specification At all addon types and for this kind always "kodi.peripheral".  | 
library_@PLATFORM@    | Sets the used library name, which is automatically set by cmake at addon build. | 
addon.xml, see also https://kodi.wiki/view/Addon.xml.Here is an example of how addon can be used as a single:
Here is another example where the peripheral is used together with other instance types:
The destruction of the example class CMyPeripheralAddon is called from Kodi's header. Manually deleting the add-on instance is not required. 
      
  | 
  inline | 
Peripheral class constructor.
Used by an add-on that only supports peripheral.
      
  | 
  inlineexplicit | 
Peripheral addon class constructor used to support multiple instance types.
| [in] | instance | The instance value given to kodi::addon::CAddonBase::CreateInstance(...). | 
      
  | 
  overridedefault | 
Destructor.