class Delegate

Defined at line 67 of file ../../src/connectivity/weave/adaptation/connectivity_manager_impl.h

Delegate class to handle platform-specific implementation of the

ConnectivityManager API surface. This enables tests to swap out the

implementation of the static ConnectivityManager instance.

Protected Members

ConnectivityManagerImpl * impl_
uint16_t flags_
ServiceTunnelMode service_tunnel_mode_

Public Methods

WEAVE_ERROR Init ()

Initializes delegate state.

bool IsServiceTunnelConnected ()

Returns whether the service tunnel is currently connected.

bool IsServiceTunnelRestricted ()

Returns whether the service tunnel is operating in restricted mode.

void OnPlatformEvent (const WeaveDeviceEvent * event)

Handles platform events generated by OpenWeave.

bool HaveIPv4InternetConnectivity ()

Returns whether the device currently has IPv4 connectivity.

Defined at line 67 of file ../../src/connectivity/weave/adaptation/connectivity_manager_impl.cpp

void ~Delegate ()

Defined at line 69 of file ../../src/connectivity/weave/adaptation/connectivity_manager_impl.h

bool HaveIPv6InternetConnectivity ()

Returns whether the device currently has IPv6 connectivity.

Defined at line 71 of file ../../src/connectivity/weave/adaptation/connectivity_manager_impl.cpp

ServiceTunnelMode GetServiceTunnelMode ()

Returns the current service tunnel mode.

Defined at line 63 of file ../../src/connectivity/weave/adaptation/connectivity_manager_impl.cpp

std::optional<std::string> GetWiFiInterfaceName ()

Gets the wifi interface name, if available.

ThreadMode GetThreadMode ()

Gets the mode of the Thread radio.

fuchsia::net::interfaces::admin::ControlSyncPtr * GetTunInterfaceControlSyncPtr ()

Returns a pointer to the Tun Interface's

`fuchsia.net.interfaces.admin/Control` handle.

void SetConnectivityManagerImpl (ConnectivityManagerImpl * impl)

Provides a handle to ConnectivityManagerImpl object that this delegate

was attached to. This allows the delegate to invoke functions on

GenericConnectivityManagerImpl if required.

Defined at line 74 of file ../../src/connectivity/weave/adaptation/connectivity_manager_impl.h

Enumerations

enum Flags
Name Value
kFlag_HaveIPv4InternetConnectivity 0x0001
kFlag_HaveIPv6InternetConnectivity 0x0002
kFlag_ServiceTunnelStarted 0x0004
kFlag_ServiceTunnelUp 0x0008
kFlag_AwaitingConnectivity 0x0010

Defined at line 101 of file ../../src/connectivity/weave/adaptation/connectivity_manager_impl.h