From 5f8335c1e49ce108ef3481863833c98efa00411b Mon Sep 17 00:00:00 2001 From: manuel Date: Thu, 2 Jul 2020 23:09:26 +0200 Subject: sync with upstream --- .../include/kodi/c-api/network.h | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/network.h (limited to 'xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/network.h') diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/network.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/network.h new file mode 100644 index 0000000..6c0441f --- /dev/null +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/network.h @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv + * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. + */ + +#pragma once + +#include + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + /* + * For interface between add-on and kodi. + * + * This structure defines the addresses of functions stored inside Kodi which + * are then available for the add-on to call + * + * All function pointers there are used by the C++ interface functions below. + * You find the set of them on xbmc/addons/interfaces/General.cpp + * + * Note: For add-on development itself this is not needed + */ + typedef struct AddonToKodiFuncTable_kodi_network + { + bool (*wake_on_lan)(void* kodiBase, const char* mac); + char* (*get_ip_address)(void* kodiBase); + char* (*dns_lookup)(void* kodiBase, const char* url, bool* ret); + char* (*url_encode)(void* kodiBase, const char* url); + char* (*get_hostname)(void* kodiBase); + bool (*is_local_host)(void* kodiBase, const char* hostname); + bool (*is_host_on_lan)(void* kodiBase, const char* hostname, bool offLineCheck); + char* (*get_user_agent)(void* kodiBase); + } AddonToKodiFuncTable_kodi_network; + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ -- cgit v1.2.3