-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathINetworkInformation.hpp
More file actions
75 lines (59 loc) · 2.05 KB
/
INetworkInformation.hpp
File metadata and controls
75 lines (59 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//
// Copyright (c) Microsoft Corporation. All rights reserved.
// SPDX-License-Identifier: Apache-2.0
//
#ifndef INETWORKINFORMATION_HPP
#define INETWORKINFORMATION_HPP
#include "pal/PAL.hpp"
#include "IInformationProvider.hpp"
#include <string>
#define ETHERNET_AVAILABLE "EthernetAvailable"
#define WIFI_AVAILABLE "WifiAvailable"
#define WWAN_AVAILABLE "WwanAvailable"
// PropertyName
#define NETWORK_PROVIDER "NetworkProvider"
#define NETWORK_COST "NetworkCost"
#define NETWORK_TYPE "NetworkType"
using namespace MAT;
namespace PAL_NS_BEGIN {
class INetworkInformation : public IInformationProvider
{
public:
virtual ~INetworkInformation() {}
/// <summary>
/// Gets the current network provider for the device
/// </summary>
/// <returns>The current network provider for the device</returns>
virtual std::string const& GetNetworkProvider() = 0;
/// <summary>
/// Gets the current network type for the device
/// E.g. Wifi, 3G, Ethernet
/// </summary>
/// <returns>The current network type for the device</returns>
virtual NetworkType GetNetworkType() = 0;
/// <summary>
/// Gets the current network cost for the device:
/// OVER_DATA_LIMIT
/// METERED
/// UNMETERED
/// </summary>
/// <returns>The current network cost for the device</returns>
virtual NetworkCost GetNetworkCost() = 0;
/// <summary>
/// Gets the current network Ethernet availability
/// </summary>
/// <returns>Ethernet availability</returns>
virtual bool IsEthernetAvailable() = 0;
/// <summary>
/// Gets the current network wifi availability
/// </summary>
/// <returns>Wifi availability</returns>
virtual bool IsWifiAvailable() = 0;
/// <summary>
/// Gets the current network Wwan availability
/// </summary>
/// <returns>Wwan availability</returns>
virtual bool IsWwanAvailable() = 0;
};
} PAL_NS_END
#endif