2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
14 struct AddonGlobalInterface
;
15 struct AddonKeyboardKeyTable
;
21 * @brief Global general Add-on to Kodi callback functions
23 * To hold general functions not related to a instance type and usable for
26 * Related add-on header is "./xbmc/addons/kodi-dev-kit/include/kodi/General.h"
28 struct Interface_General
30 static void Init(AddonGlobalInterface
* addonInterface
);
31 static void DeInit(AddonGlobalInterface
* addonInterface
);
34 * @brief callback functions from add-on to kodi
36 * @note To add a new function use the "_" style to directly identify an
37 * add-on callback function. Everything with CamelCase is only to be used
40 * The parameter `kodiBase` is used to become the pointer for a `CAddonDll`
44 static char* unknown_to_utf8(void* kodiBase
, const char* source
, bool* ret
, bool failOnBadChar
);
45 static char* get_language(void* kodiBase
, int format
, bool region
);
46 static bool queue_notification(void* kodiBase
,
50 const char* imageFile
,
51 unsigned int displayTime
,
53 unsigned int messageTime
);
54 static void get_md5(void* kodiBase
, const char* text
, char* md5
);
55 static char* get_region(void* kodiBase
, const char* id
);
56 static void get_free_mem(void* kodiInstance
, long* free
, long* total
, bool as_bytes
);
57 static int get_global_idle_time(void* kodiBase
);
58 static bool is_addon_avilable(void* kodiBase
, const char* id
, char** version
, bool* enabled
);
59 static void kodi_version(void* kodiBase
,
66 static char* get_current_skin_id(void* kodiBase
);
67 static bool change_keyboard_layout(void* kodiBase
, char** layout_name
);
68 static bool get_keyboard_layout(void* kodiBase
,
71 AddonKeyboardKeyTable
* c_layout
);
75 } /* namespace ADDON */