Commit c1c434d1 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

netprofm: Implement INetworkListManager::IsConnectedToInternet and…

netprofm: Implement INetworkListManager::IsConnectedToInternet and INetworkListManager::IsConnected.
parent a0085f70
...@@ -1249,20 +1249,44 @@ static HRESULT WINAPI list_manager_IsConnectedToInternet( ...@@ -1249,20 +1249,44 @@ static HRESULT WINAPI list_manager_IsConnectedToInternet(
INetworkListManager *iface, INetworkListManager *iface,
VARIANT_BOOL *pbIsConnected ) VARIANT_BOOL *pbIsConnected )
{ {
FIXME( "%p, %p\n", iface, pbIsConnected ); struct list_manager *mgr = impl_from_INetworkListManager( iface );
struct network *network;
TRACE( "%p, %p\n", iface, pbIsConnected );
LIST_FOR_EACH_ENTRY( network, &mgr->networks, struct network, entry )
{
if (network->connected_to_internet)
{
*pbIsConnected = VARIANT_TRUE; *pbIsConnected = VARIANT_TRUE;
return S_OK; return S_OK;
}
}
*pbIsConnected = VARIANT_FALSE;
return S_OK;
} }
static HRESULT WINAPI list_manager_IsConnected( static HRESULT WINAPI list_manager_IsConnected(
INetworkListManager *iface, INetworkListManager *iface,
VARIANT_BOOL *pbIsConnected ) VARIANT_BOOL *pbIsConnected )
{ {
FIXME( "%p, %p\n", iface, pbIsConnected ); struct list_manager *mgr = impl_from_INetworkListManager( iface );
struct network *network;
TRACE( "%p, %p\n", iface, pbIsConnected );
LIST_FOR_EACH_ENTRY( network, &mgr->networks, struct network, entry )
{
if (network->connected)
{
*pbIsConnected = VARIANT_TRUE; *pbIsConnected = VARIANT_TRUE;
return S_OK; return S_OK;
}
}
*pbIsConnected = VARIANT_FALSE;
return S_OK;
} }
static HRESULT WINAPI list_manager_GetConnectivity( static HRESULT WINAPI list_manager_GetConnectivity(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment