You.i Engine
CYINetworkInformationBridge Class Referenceabstract

Detailed Description

CYINetworkInformationBridge contains functions relating to device network state.

#include <network/YiNetworkInformationBridge.h>

Public Types

enum  NetworkType {
  NetworkType::NoConnection = 0,
enum  MobileNetworkType {
  MobileNetworkType::NotApplicable = 0,

Public Member Functions

virtual ~CYINetworkInformationBridge ()
virtual void StartNetworkStateListener ()=0
virtual void StopNetworkStateListener ()=0
virtual NetworkType GetNetworkType ()=0
virtual void SetNetworkType (NetworkType networkType)=0
virtual MobileNetworkType GetMobileNetworkType () const =0
virtual void RefreshNetworkState ()=0
virtual CYIConnectivityGetConnectivity ()=0
virtual void SetNetworkActivityIndicatorOn ()=0
virtual void SetNetworkActivityIndicatorOff ()=0
virtual bool HasNetworkStateListenerStarted ()=0
virtual bool HasCellularNetworkSupport ()=0

Public Attributes

CYISignal< const CYINetworkInformationBridge::NetworkType, const CYINetworkInformationBridge::NetworkTypeNetworkStateChanged
CYISignal< const CYINetworkInformationBridge::MobileNetworkType, const CYINetworkInformationBridge::MobileNetworkTypeMobileNetworkTypeChanged

Member Enumeration Documentation

◆ MobileNetworkType


The mobile network speed does not apply to the current connection type.


The mobile network speed is 2G.


The mobile network speed is 3G.


The mobile network speed is 4G.


The mobile network speed is unknown.

◆ NetworkType

The type of network connection reported by the device.


There is no network connection.


The current network connection is wifi.


The current network connection is mobile, such as a 3G or 4G network.


The current network connection is wired, such as an ethernet connection.


There is a network connection but the exact type cannot be determined.


The network type is unknown.

Constructor & Destructor Documentation

◆ ~CYINetworkInformationBridge()

virtual CYINetworkInformationBridge::~CYINetworkInformationBridge ( )

Member Function Documentation

◆ GetConnectivity()

virtual CYIConnectivity& CYINetworkInformationBridge::GetConnectivity ( )
pure virtual

Returns an object that can be used to actively check network connectivity.

The CYIHTTPService must be started for the connectivity class to function properly.

◆ GetMobileNetworkType()

virtual MobileNetworkType CYINetworkInformationBridge::GetMobileNetworkType ( ) const
pure virtual

◆ GetNetworkType()

virtual NetworkType CYINetworkInformationBridge::GetNetworkType ( )
pure virtual

◆ HasCellularNetworkSupport()

virtual bool CYINetworkInformationBridge::HasCellularNetworkSupport ( )
pure virtual

Returns true if the device supports a cellular network and false otherwise.

Only indicates if the device has the capability to support cellular communications and not that it has a valid cellular network connection (meaning, a valid SIM card inserted)

◆ HasNetworkStateListenerStarted()

virtual bool CYINetworkInformationBridge::HasNetworkStateListenerStarted ( )
pure virtual

Returns true if the network state listener has started and false otherwise.

◆ RefreshNetworkState()

virtual void CYINetworkInformationBridge::RefreshNetworkState ( )
pure virtual

Refreshes the network state using the current network state.

◆ SetNetworkActivityIndicatorOff()

virtual void CYINetworkInformationBridge::SetNetworkActivityIndicatorOff ( )
pure virtual

Set Network Activity indicator off.

Not supported on all platforms.

◆ SetNetworkActivityIndicatorOn()

virtual void CYINetworkInformationBridge::SetNetworkActivityIndicatorOn ( )
pure virtual

Set Network Activity indicator on.

Not supported on all platforms.

◆ SetNetworkType()

virtual void CYINetworkInformationBridge::SetNetworkType ( NetworkType  networkType)
pure virtual

◆ StartNetworkStateListener()

virtual void CYINetworkInformationBridge::StartNetworkStateListener ( )
pure virtual

Starts the network state listener.

◆ StopNetworkStateListener()

virtual void CYINetworkInformationBridge::StopNetworkStateListener ( )
pure virtual

Stops the network state listener.

Member Data Documentation

◆ MobileNetworkTypeChanged

CYISignal<const CYINetworkInformationBridge::MobileNetworkType , const CYINetworkInformationBridge::MobileNetworkType > CYINetworkInformationBridge::MobileNetworkTypeChanged

Signals a change in mobile network state. The first parameter is the new state and the second parameter is the old state.

◆ NetworkStateChanged

CYISignal<const CYINetworkInformationBridge::NetworkType , const CYINetworkInformationBridge::NetworkType > CYINetworkInformationBridge::NetworkStateChanged

Signals a change in network state. The first parameter is the new state and the second parameter is the old state.

The documentation for this class was generated from the following file: