using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; using Tango.Core.Commands; namespace Tango.PPC.Common.Connectivity { /// /// Represents an internet connection manager. /// public interface IConnectivityProvider { /// /// Occurs when the connectivity provider state has changed (e.g network connected/disconnected). /// event EventHandler ConnectionStateChanged; /// /// Gets a value indicating whether there is a WiFi connection. /// bool IsConnected { get; } /// /// Gets a value indicating whether there is LAN connection. /// bool IsLanConnected { get; } /// /// Gets the available WiFi networks. /// ObservableCollection AvailableWiFiNetworks { get; } /// /// Gets the available WiFi networks as a sorted view source by signal strength. /// ICollectionView AvailableWiFiNetworksViewSource { get; set; } /// /// Gets the available WiFi networks. /// /// Task> GetAvailableWiFiNetworks(); /// /// Resets the available WiFi networks collection. /// Task RefreshAvailableWiFiNetworks(); /// /// Checks the Internet connection. /// /// Task CheckInternetConnection(); /// /// Gets the connect to WiFi command. /// RelayCommand ConnectToWiFiCommand { get; } /// /// Gets the disconnect from WiFi command. /// RelayCommand DisconnectFromWiFiCommand { get; } /// /// Gets or sets the refresh available WiFi networks command. /// RelayCommand RefreshAvailableWiFiNetworksCommand { get; set; } /// /// Connects the specified network. /// /// The network. /// Task Connect(WiFiNetwork network, String password = null); /// /// Disconnects the specified network. /// /// The network. /// void Disconnect(WiFiNetwork network); } }