Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
ADDON::Interface_Base Struct Reference

Global general Add-on to Kodi callback functions. More...

#include <AddonBase.h>

Static Public Member Functions

static bool InitInterface (CAddonDll *addon, AddonGlobalInterface &addonInterface, KODI_ADDON_INSTANCE_STRUCT *firstKodiInstance)
 
static void DeInitInterface (AddonGlobalInterface &addonInterface)
 
static void RegisterInterface (ADDON_GET_INTERFACE_FN fn)
 
static bool UpdateSettingInActiveDialog (CAddonDll *addon, AddonInstanceId instanceId, const char *id, const std::string &value)
 
static void addon_log_msg (const KODI_ADDON_BACKEND_HDL hdl, const int addonLogLevel, const char *strMessage)
 callback functions from add-on to kodi
 
static char * get_type_version (const KODI_ADDON_BACKEND_HDL hdl, int type)
 
static char * get_addon_path (const KODI_ADDON_BACKEND_HDL hdl)
 
static char * get_lib_path (const KODI_ADDON_BACKEND_HDL hdl)
 
static char * get_user_path (const KODI_ADDON_BACKEND_HDL hdl)
 
static char * get_temp_path (const KODI_ADDON_BACKEND_HDL hdl)
 
static char * get_localized_string (const KODI_ADDON_BACKEND_HDL hdl, long label_id)
 
static char * get_addon_info (const KODI_ADDON_BACKEND_HDL hdl, const char *id)
 
static bool open_settings_dialog (const KODI_ADDON_BACKEND_HDL hdl)
 
static bool is_setting_using_default (const KODI_ADDON_BACKEND_HDL hdl, const char *id)
 
static bool get_setting_bool (const KODI_ADDON_BACKEND_HDL hdl, const char *id, bool *value)
 
static bool get_setting_int (const KODI_ADDON_BACKEND_HDL hdl, const char *id, int *value)
 
static bool get_setting_float (const KODI_ADDON_BACKEND_HDL hdl, const char *id, float *value)
 
static bool get_setting_string (const KODI_ADDON_BACKEND_HDL hdl, const char *id, char **value)
 
static bool set_setting_bool (const KODI_ADDON_BACKEND_HDL hdl, const char *id, bool value)
 
static bool set_setting_int (const KODI_ADDON_BACKEND_HDL hdl, const char *id, int value)
 
static bool set_setting_float (const KODI_ADDON_BACKEND_HDL hdl, const char *id, float value)
 
static bool set_setting_string (const KODI_ADDON_BACKEND_HDL hdl, const char *id, const char *value)
 
static void free_string (const KODI_ADDON_BACKEND_HDL hdl, char *str)
 
static void free_string_array (const KODI_ADDON_BACKEND_HDL hdl, char **arr, int numElements)
 
static voidget_interface (const KODI_ADDON_BACKEND_HDL hdl, const char *name, const char *version)
 

Static Public Attributes

static std::vector< ADDON_GET_INTERFACE_FNs_registeredInterfaces
 

Detailed Description

Global general Add-on to Kodi callback functions.

To hold general functions not related to a instance type and usable for every add-on type.

Related add-on header is "./xbmc/addons/kodi-dev-kit/include/kodi/General.h"

Member Function Documentation

◆ addon_log_msg()

void ADDON::Interface_Base::addon_log_msg ( const KODI_ADDON_BACKEND_HDL  hdl,
const int  addonLogLevel,
const char *  strMessage 
)
static

callback functions from add-on to kodi

Addon to Kodi basic callbacks below.

Note
To add a new function use the "_" style to directly identify an add-on callback function. Everything with CamelCase is only to be used in Kodi.

The parameter kodiBase is used to become the pointer for a CAddonDll class.

The amount of functions here are hold so minimal as possible. Only parts where needed on nearly every add-on (e.g. addon_log_msg) are to add there.

More specific parts like e.g. to open files should be added to a separate part.

◆ DeInitInterface()

void ADDON::Interface_Base::DeInitInterface ( AddonGlobalInterface addonInterface)
static

◆ free_string()

void ADDON::Interface_Base::free_string ( const KODI_ADDON_BACKEND_HDL  hdl,
char *  str 
)
static

◆ free_string_array()

void ADDON::Interface_Base::free_string_array ( const KODI_ADDON_BACKEND_HDL  hdl,
char **  arr,
int  numElements 
)
static

◆ get_addon_info()

char * ADDON::Interface_Base::get_addon_info ( const KODI_ADDON_BACKEND_HDL  hdl,
const char *  id 
)
static

◆ get_addon_path()

char * ADDON::Interface_Base::get_addon_path ( const KODI_ADDON_BACKEND_HDL  hdl)
static

◆ get_interface()

void * ADDON::Interface_Base::get_interface ( const KODI_ADDON_BACKEND_HDL  hdl,
const char *  name,
const char *  version 
)
static

◆ get_lib_path()

char * ADDON::Interface_Base::get_lib_path ( const KODI_ADDON_BACKEND_HDL  hdl)
static

◆ get_localized_string()

char * ADDON::Interface_Base::get_localized_string ( const KODI_ADDON_BACKEND_HDL  hdl,
long  label_id 
)
static

◆ get_setting_bool()

bool ADDON::Interface_Base::get_setting_bool ( const KODI_ADDON_BACKEND_HDL  hdl,
const char *  id,
bool value 
)
static

◆ get_setting_float()

bool ADDON::Interface_Base::get_setting_float ( const KODI_ADDON_BACKEND_HDL  hdl,
const char *  id,
float *  value 
)
static

◆ get_setting_int()

bool ADDON::Interface_Base::get_setting_int ( const KODI_ADDON_BACKEND_HDL  hdl,
const char *  id,
int value 
)
static

◆ get_setting_string()

bool ADDON::Interface_Base::get_setting_string ( const KODI_ADDON_BACKEND_HDL  hdl,
const char *  id,
char **  value 
)
static

◆ get_temp_path()

char * ADDON::Interface_Base::get_temp_path ( const KODI_ADDON_BACKEND_HDL  hdl)
static

◆ get_type_version()

char * ADDON::Interface_Base::get_type_version ( const KODI_ADDON_BACKEND_HDL  hdl,
int  type 
)
static

◆ get_user_path()

char * ADDON::Interface_Base::get_user_path ( const KODI_ADDON_BACKEND_HDL  hdl)
static

◆ InitInterface()

bool ADDON::Interface_Base::InitInterface ( CAddonDll addon,
AddonGlobalInterface addonInterface,
KODI_ADDON_INSTANCE_STRUCT firstKodiInstance 
)
static

◆ is_setting_using_default()

bool ADDON::Interface_Base::is_setting_using_default ( const KODI_ADDON_BACKEND_HDL  hdl,
const char *  id 
)
static

◆ open_settings_dialog()

bool ADDON::Interface_Base::open_settings_dialog ( const KODI_ADDON_BACKEND_HDL  hdl)
static

◆ RegisterInterface()

void ADDON::Interface_Base::RegisterInterface ( ADDON_GET_INTERFACE_FN  fn)
static

◆ set_setting_bool()

bool ADDON::Interface_Base::set_setting_bool ( const KODI_ADDON_BACKEND_HDL  hdl,
const char *  id,
bool  value 
)
static

◆ set_setting_float()

bool ADDON::Interface_Base::set_setting_float ( const KODI_ADDON_BACKEND_HDL  hdl,
const char *  id,
float  value 
)
static

◆ set_setting_int()

bool ADDON::Interface_Base::set_setting_int ( const KODI_ADDON_BACKEND_HDL  hdl,
const char *  id,
int  value 
)
static

◆ set_setting_string()

bool ADDON::Interface_Base::set_setting_string ( const KODI_ADDON_BACKEND_HDL  hdl,
const char *  id,
const char *  value 
)
static

◆ UpdateSettingInActiveDialog()

bool ADDON::Interface_Base::UpdateSettingInActiveDialog ( CAddonDll addon,
AddonInstanceId  instanceId,
const char *  id,
const std::string &  value 
)
static

Member Data Documentation

◆ s_registeredInterfaces

std::vector< ADDON_GET_INTERFACE_FN > ADDON::Interface_Base::s_registeredInterfaces
static

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