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.
11 struct AddonGlobalInterface
;
19 * @brief Global general Add-on to Kodi callback functions
21 * To hold network functions not related to a instance type and usable for
24 * Related add-on header is "./xbmc/addons/kodi-dev-kit/include/kodi/Network.h"
26 struct Interface_Network
28 static void Init(AddonGlobalInterface
* addonInterface
);
29 static void DeInit(AddonGlobalInterface
* addonInterface
);
32 * @brief callback functions from add-on to kodi
34 * @note To add a new function use the "_" style to directly identify an
35 * add-on callback function. Everything with CamelCase is only to be used
38 * The parameter `kodiBase` is used to become the pointer for a `CAddonDll`
42 static bool wake_on_lan(void* kodiBase
, const char* mac
);
43 static char* get_ip_address(void* kodiBase
);
44 static char* get_hostname(void* kodiBase
);
45 static char* get_user_agent(void* kodiBase
);
46 static bool is_local_host(void* kodiBase
, const char* hostname
);
47 static bool is_host_on_lan(void* kodiBase
, const char* hostname
, bool offLineCheck
);
48 static char* dns_lookup(void* kodiBase
, const char* url
, bool* ret
);
49 static char* url_encode(void* kodiBase
, const char* url
);
53 } /* namespace ADDON */