Kodi Development  19.0
for Binary and Script based Add-Ons
network.h
1 /*
2  * Copyright (C) 2005-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #ifndef C_API_NETWORK_H
12 #define C_API_NETWORK_H
13 
14 #include <stdbool.h>
15 
16 #ifdef __cplusplus
17 extern "C"
18 {
19 #endif /* __cplusplus */
20 
21  /*
22  * For interface between add-on and kodi.
23  *
24  * This structure defines the addresses of functions stored inside Kodi which
25  * are then available for the add-on to call
26  *
27  * All function pointers there are used by the C++ interface functions below.
28  * You find the set of them on xbmc/addons/interfaces/General.cpp
29  *
30  * Note: For add-on development itself this is not needed
31  */
33  {
34  bool (*wake_on_lan)(void* kodiBase, const char* mac);
35  char* (*get_ip_address)(void* kodiBase);
36  char* (*dns_lookup)(void* kodiBase, const char* url, bool* ret);
37  char* (*url_encode)(void* kodiBase, const char* url);
38  char* (*get_hostname)(void* kodiBase);
39  bool (*is_local_host)(void* kodiBase, const char* hostname);
40  bool (*is_host_on_lan)(void* kodiBase, const char* hostname, bool offLineCheck);
41  char* (*get_user_agent)(void* kodiBase);
43 
44 #ifdef __cplusplus
45 } /* extern "C" */
46 #endif /* __cplusplus */
47 
48 #endif /* C_API_NETWORK_H */
AddonToKodiFuncTable_kodi_network
Definition: network.h:33