Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
General.h File Reference
#include "AddonBase.h"
#include "c-api/general.h"
#include "tools/StringUtils.h"

Classes

struct  kodi_version_t
 For kodi::Version used structure. More...
 

Namespaces

namespace  kodi
 

Typedefs

typedef struct kodi_version_t kodi_version_t
 For kodi::Version used structure.
 

Functions

bool ATTR_DLL_LOCAL kodi::UnknownToUTF8 (const std::string &stringSrc, std::string &utf8StringDst, bool failOnBadChar=false)
 Translate a string with an unknown encoding to UTF8.
 
std::string ATTR_DLL_LOCAL kodi::GetLanguage (LangFormats format=LANG_FMT_ENGLISH_NAME, bool region=false)
 Returns the active language as a string.
 
void ATTR_DLL_LOCAL kodi::QueueFormattedNotification (QueueMsg type, const char *format,...)
 Writes the C string pointed by format in the GUI. If format includes format specifiers (subsequences beginning with %), the additional arguments following format are formatted and inserted in the resulting string replacing their respective specifiers.
 
void ATTR_DLL_LOCAL kodi::QueueNotification (QueueMsg type, const std::string &header, const std::string &message, const std::string &imageFile="", unsigned int displayTime=5000, bool withSound=true, unsigned int messageTime=1000)
 Queue a notification in the GUI.
 
std::string ATTR_DLL_LOCAL kodi::GetMD5 (const std::string &text)
 Get the MD5 digest of the given text.
 
std::string ATTR_DLL_LOCAL kodi::GetRegion (const std::string &id)
 Returns your regions setting as a string for the specified id.
 
void ATTR_DLL_LOCAL kodi::GetFreeMem (long &free, long &total, bool asBytes=false)
 Returns the amount of free memory in MByte (or as bytes) as an long integer.
 
int ATTR_DLL_LOCAL kodi::GetGlobalIdleTime ()
 Returns the elapsed idle time in seconds as an integer.
 
std::string ATTR_DLL_LOCAL kodi::GetCurrentSkinId ()
 Get the currently used skin identification name from Kodi.
 
bool ATTR_DLL_LOCAL kodi::IsAddonAvailable (const std::string &id, std::string &version, bool &enabled)
 To check another addon is available and usable inside Kodi.
 
void ATTR_DLL_LOCAL kodi::KodiVersion (kodi_version_t &version)
 Get current Kodi information and versions, returned data from the following kodi_version_t version; kodi::KodiVersion(version); is e.g.:
 
bool ATTR_DLL_LOCAL kodi::GetKeyboardLayout (int modifierKey, std::string &layout_name, std::vector< std::vector< std::string > > &layout)
 To get keyboard layout characters.
 
bool ATTR_DLL_LOCAL kodi::ChangeKeyboardLayout (std::string &layout_name)
 To change keyboard layout characters.