Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
Functions to handle settings access
This can be used to get and set the addon related values inside his settings.xml.
More...
Functions | |
bool ATTR_DLL_LOCAL | kodi::addon::OpenSettings () |
Opens this Add-Ons settings dialog. | |
bool ATTR_DLL_LOCAL | kodi::addon::IsSettingUsingDefault (const std::string &settingName) |
Check the given setting name is set to default value. | |
bool ATTR_DLL_LOCAL | kodi::addon::CheckSettingString (const std::string &settingName, std::string &settingValue) |
Check and get a string setting value. | |
std::string ATTR_DLL_LOCAL | kodi::addon::GetSettingString (const std::string &settingName, const std::string &defaultValue="") |
Get string setting value. | |
void ATTR_DLL_LOCAL | kodi::addon::SetSettingString (const std::string &settingName, const std::string &settingValue) |
Set string setting of addon. | |
bool ATTR_DLL_LOCAL | kodi::addon::CheckSettingInt (const std::string &settingName, int &settingValue) |
Check and get a integer setting value. | |
int ATTR_DLL_LOCAL | kodi::addon::GetSettingInt (const std::string &settingName, int defaultValue=0) |
Get integer setting value. | |
void ATTR_DLL_LOCAL | kodi::addon::SetSettingInt (const std::string &settingName, int settingValue) |
Set integer setting of addon. | |
bool ATTR_DLL_LOCAL | kodi::addon::CheckSettingBoolean (const std::string &settingName, bool &settingValue) |
Check and get a boolean setting value. | |
bool ATTR_DLL_LOCAL | kodi::addon::GetSettingBoolean (const std::string &settingName, bool defaultValue=false) |
Get boolean setting value. | |
void ATTR_DLL_LOCAL | kodi::addon::SetSettingBoolean (const std::string &settingName, bool settingValue) |
Set boolean setting of addon. | |
bool ATTR_DLL_LOCAL | kodi::addon::CheckSettingFloat (const std::string &settingName, float &settingValue) |
Check and get a floating point setting value. | |
float ATTR_DLL_LOCAL | kodi::addon::GetSettingFloat (const std::string &settingName, float defaultValue=0.0f) |
Get floating point setting value. | |
void ATTR_DLL_LOCAL | kodi::addon::SetSettingFloat (const std::string &settingName, float settingValue) |
Set floating point setting of addon. | |
template<typename enumType > | |
bool ATTR_DLL_LOCAL | kodi::addon::CheckSettingEnum (const std::string &settingName, enumType &settingValue) |
Check and get a enum setting value. | |
template<typename enumType > | |
enumType ATTR_DLL_LOCAL | kodi::addon::GetSettingEnum (const std::string &settingName, enumType defaultValue=static_cast< enumType >(0)) |
Get enum setting value. | |
template<typename enumType > | |
void ATTR_DLL_LOCAL | kodi::addon::SetSettingEnum (const std::string &settingName, enumType settingValue) |
Set enum setting of addon. | |
Functions to handle settings access
This can be used to get and set the addon related values inside his settings.xml.
The settings style is given with installed part on e.g. $HOME/.kodi/addons/myspecial.addon/resources/settings.xml
. The related edit becomes then stored inside $HOME/.kodi/userdata/addon_data/myspecial.addon/settings.xml
.
|
inline |
Check and get a boolean setting value.
The setting name relate to names used in his settings.xml file.
[in] | settingName | The name of asked setting |
[out] | settingValue | The given setting value |
Example:
|
inline |
Check and get a enum setting value.
The setting name relate to names used in his settings.xml file.
[in] | settingName | The name of asked setting |
[out] | settingValue | The given setting value |
Example:
|
inline |
Check and get a floating point setting value.
The setting name relate to names used in his settings.xml file.
[in] | settingName | The name of asked setting |
[out] | settingValue | The given setting value |
Example:
|
inline |
Check and get a integer setting value.
The setting name relate to names used in his settings.xml file.
[in] | settingName | The name of asked setting |
[out] | settingValue | The given setting value |
Example:
|
inline |
Check and get a string setting value.
The setting name relate to names used in his settings.xml file.
[in] | settingName | The name of asked setting |
[out] | settingValue | The given setting value |
Example:
|
inline |
Get boolean setting value.
The setting name relate to names used in his settings.xml file.
[in] | settingName | The name of asked setting |
[in] | defaultValue | [opt] Default value if not found |
false
or defaultValue if not foundExample:
|
inline |
Get enum setting value.
The setting name relate to names used in his settings.xml file.
[in] | settingName | The name of asked setting |
[in] | defaultValue | [opt] Default value if not found |
0
or defaultValue if not foundExample:
|
inline |
Get floating point setting value.
The setting name relate to names used in his settings.xml file.
[in] | settingName | The name of asked setting |
[in] | defaultValue | [opt] Default value if not found |
0.0
or defaultValue if not foundExample:
|
inline |
Get integer setting value.
The setting name relate to names used in his settings.xml file.
[in] | settingName | The name of asked setting |
[in] | defaultValue | [opt] Default value if not found |
0
or defaultValue if not foundExample:
|
inline |
Get string setting value.
The setting name relate to names used in his settings.xml file.
[in] | settingName | The name of asked setting |
[in] | defaultValue | [opt] Default value if not found |
Example:
|
inline |
Check the given setting name is set to default value.
The setting name relate to names used in his settings.xml file.
[in] | settingName | The name of asked setting |
|
inline |
Opens this Add-Ons settings dialog.
Example:
|
inline |
Set boolean setting of addon.
The setting name relate to names used in his settings.xml file.
[in] | settingName | The name of setting |
[in] | settingValue | The setting value to write |
Example:
|
inline |
Set enum setting of addon.
The setting name relate to names used in his settings.xml file.
[in] | settingName | The name of setting |
[in] | settingValue | The setting value to write |
Example:
|
inline |
Set floating point setting of addon.
The setting name relate to names used in his settings.xml file.
[in] | settingName | The name of setting |
[in] | settingValue | The setting value to write |
Example:
|
inline |
Set integer setting of addon.
The setting name relate to names used in his settings.xml file.
[in] | settingName | The name of setting |
[in] | settingValue | The setting value to write |
Example:
|
inline |
Set string setting of addon.
The setting name relate to names used in his settings.xml file.
[in] | settingName | The name of setting |
[in] | settingValue | The setting value to write |
Example: