|
std::string ATTR_DLL_LOCAL | kodi::GetKodiTypeVersion (int type) |
| To get used version inside Kodi itself about asked type. More...
|
|
std::string ATTR_DLL_LOCAL | kodi::GetAddonPath (const std::string &append="") |
| To get the addon system installation folder. More...
|
|
std::string ATTR_DLL_LOCAL | kodi::GetBaseUserPath (const std::string &append="") |
| To get the user-related folder of the addon. More...
|
|
std::string ATTR_DLL_LOCAL | kodi::GetLibPath () |
| This function gives OS associated executable binary path of the addon. More...
|
|
void ATTR_DLL_LOCAL | kodi::Log (const AddonLog loglevel, const char *format,...) |
| Add a message to Kodi's log. More...
|
|
std::string ATTR_DLL_LOCAL | kodi::TranslateAddonStatus (ADDON_STATUS status) |
| Get to related ADDON_STATUS a human readable text. More...
|
|
void * | kodi::GetInterface (const std::string &name, const std::string &version) |
| Returns a function table to a named interface. More...
|
|
std::string ATTR_DLL_LOCAL | kodi::GetAddonInfo (const std::string &id) |
| Returns the value of an addon property as a string. More...
|
|
bool ATTR_DLL_LOCAL | kodi::OpenSettings () |
| Opens this Add-Ons settings dialog. More...
|
|
std::string ATTR_DLL_LOCAL | kodi::GetLocalizedString (uint32_t labelId, const std::string &defaultStr="") |
| Returns an addon's localized 'unicode string'. More...
|
|
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. More...
|
|
std::string ATTR_DLL_LOCAL | kodi::GetLanguage (LangFormats format=LANG_FMT_ENGLISH_NAME, bool region=false) |
| Returns the active language as a string. More...
|
|
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. More...
|
|
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. More...
|
|
std::string ATTR_DLL_LOCAL | kodi::GetMD5 (const std::string &text) |
| Get the MD5 digest of the given text. More...
|
|
std::string ATTR_DLL_LOCAL | kodi::GetTempAddonPath (const std::string &append="") |
| To get a temporary path for the addon. More...
|
|
std::string ATTR_DLL_LOCAL | kodi::GetRegion (const std::string &id) |
| Returns your regions setting as a string for the specified id. More...
|
|
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. More...
|
|
int ATTR_DLL_LOCAL | kodi::GetGlobalIdleTime () |
| Returns the elapsed idle time in seconds as an integer. More...
|
|
std::string ATTR_DLL_LOCAL | kodi::GetCurrentSkinId () |
| Get the currently used skin identification name from Kodi. More...
|
|
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.: More...
|
|
bool ATTR_DLL_LOCAL | kodi::GetKeyboardLayout (int modifierKey, std::string &layout_name, std::vector< std::vector< std::string > > &layout) |
| To get keyboard layout characters. More...
|
|
bool ATTR_DLL_LOCAL | kodi::ChangeKeyboardLayout (std::string &layout_name) |
| To change keyboard layout characters. More...
|
|
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.
After the format parameter, the function expects at least as many additional arguments as specified by format.
- Parameters
-
[in] | type | The message type.
enum code: | Description: |
QUEUE_INFO | Show info notification message |
QUEUE_WARNING | Show warning notification message |
QUEUE_ERROR | Show error notification message |
|
[in] | format | The format of the message to pass to display in Kodi. C string that contains the text to be written to the stream. It can optionally contain embedded format specifiers that are replaced by the values specified in subsequent additional arguments and formatted as requested.
specifier | Output | Example |
d or i | Signed decimal integer | 392 |
u | Unsigned decimal integer | 7235 |
o | Unsigned octal | 610 |
x | Unsigned hexadecimal integer | 7fa |
X | Unsigned hexadecimal integer (uppercase) | 7FA |
f | Decimal floating point, lowercase | 392.65 |
F | Decimal floating point, uppercase | 392.65 |
e | Scientific notation (mantissa/exponent), lowercase | 3.9265e+2 |
E | Scientific notation (mantissa/exponent), uppercase | 3.9265E+2 |
g | Use the shortest representation: e or f | 392.65 |
G | Use the shortest representation: E or F | 392.65 |
a | Hexadecimal floating point, lowercase | -0xc.90fep-2 |
A | Hexadecimal floating point, uppercase | -0XC.90FEP-2 |
c | Character | a |
s | String of characters | sample |
p | Pointer address | b8000000 |
% | A % followed by another % character will write a single % to the stream. | % |
|
The length sub-specifier modifies the length of the data type. This is a chart showing the types used to interpret the corresponding arguments with and without length specifier (if a different type is used, the proper type promotion or conversion is performed, if allowed):
length | d i | u o x X | f F e E g G a A | c | s | p | n |
(none) | int | unsigned int | double | int | char* | void* | int* |
hh | signed char | unsigned char | | | | | signed char* |
h | short int | unsigned short int | | | | | short int* |
l | long int | unsigned long int | | wint_t | wchar_t* | | long int* |
ll | long long int | unsigned long long int | | | | | long long int* |
j | intmax_t | uintmax_t | | | | | intmax_t* |
z | size_t | size_t | | | | | size_t* |
t | ptrdiff_t | ptrdiff_t | | | | | ptrdiff_t* |
L | | | long double | | | | |
Note: that the c specifier takes an int (or wint_t) as argument, but performs the proper conversion to a char value (or a wchar_t) before formatting it for output.
- Parameters
-
[in] | ... | (additional arguments) Depending on the format string, the function may expect a sequence of additional arguments, each containing a value to be used to replace a format specifier in the format string (or a pointer to a storage location, for n). There should be at least as many of these arguments as the number of values specified in the format specifiers. Additional arguments are ignored by the function. |
Example:
...
kodi::QueueFormattedNotification(
QUEUE_WARNING,
"I'm want to inform you, here with a test call to show '%s'",
"this");
...
@ QUEUE_WARNING
Show warning notification message.
Definition: kodi-dev-kit/include/kodi/c-api/General.h:47