11 #include "network/Network.h" 12 #include "threads/CriticalSection.h" 14 #include "platform/android/activity/JNIXBMCConnectivityManagerNetworkCallback.h" 16 #include <androidjni/LinkProperties.h> 17 #include <androidjni/Network.h> 18 #include <androidjni/NetworkInterface.h> 24 const CJNILinkProperties& lp,
25 const CJNINetworkInterface& intf);
26 std::vector<std::string> GetNameServers();
30 bool IsEnabled()
const override;
31 bool IsConnected()
const override;
32 std::string GetMacAddress()
const override;
33 void GetMacAddressRaw(
char rawMac[6])
const override;
34 bool GetHostMacAddress(
unsigned long host_ip, std::string& mac)
const override;
35 std::string GetCurrentIPAddress()
const override;
36 std::string GetCurrentNetmask()
const override;
37 std::string GetCurrentDefaultGateway()
const override;
39 std::string GetHostName();
43 CJNINetwork m_network;
44 CJNILinkProperties m_lp;
45 CJNINetworkInterface m_intf;
58 bool GetHostName(std::string& hostname)
override;
59 std::vector<CNetworkInterface*>& GetInterfaceList()
override;
61 std::vector<std::string> GetNameServers()
override;
64 using CNetworkBase::PingHost;
65 bool PingHost(
unsigned long remote_ip,
unsigned int timeout_ms = 2000)
override;
68 void RetrieveInterfaces();
69 std::vector<CNetworkInterface*> m_interfaces;
70 std::vector<CNetworkInterface*> m_oldInterfaces;
71 CCriticalSection m_refreshMutex;
73 std::unique_ptr<CNetworkInterface> m_defaultInterface;
76 void onAvailable(
const CJNINetwork network)
override;
77 void onLost(
const CJNINetwork network)
override;
Definition: NetworkAndroid.h:20
Definition: JNIXBMCConnectivityManagerNetworkCallback.h:17
Definition: NetworkAndroid.h:48