18 #ifndef LOCATION_SERVICE_COM_UBUNTU_LOCATION_CONNECTIVITY_MANAGER_H_
19 #define LOCATION_SERVICE_COM_UBUNTU_LOCATION_CONNECTIVITY_MANAGER_H_
24 #include <core/property.h>
36 namespace connectivity
109 :
std::runtime_error(
110 "Underlying platform does not provide support for connectivity mgmt.")
127 virtual const core::Property<State>&
state()
const = 0;
233 #endif // LOCATION_SERVICE_COM_UBUNTU_LOCATION_CONNECTIVITY_MANAGER_H_
bool operator==(const RadioCell::Gsm &lhs, const RadioCell::Gsm &rhs)
Returns true iff lhs equals rhs.
virtual void enumerate_visible_wireless_networks(const std::function< void(const WirelessNetwork::Ptr &)> &) const =0
Enumerates all wireless networks visible to the device.
Network connections are being cleaned up.
The connection goes via a roaming mobile-broadband connection.
virtual const core::Signal & wireless_network_scan_finished() const =0
wireless_network_scan_finished is emitted when a scan for wireless networks ends. ...
virtual void enumerate_connected_radio_cells(const std::function< void(const RadioCell::Ptr &)> &) const =0
Enumerates all radio cells that the device is connected to.
virtual void request_scan_for_wireless_networks()=0
request_scan_for_wireless_networks schedules a scan for visible wireless networks.
std::shared_ptr< WirelessNetwork > Ptr
virtual const core::Property< bool > & is_wifi_hardware_enabled() const =0
Returns a getable/observable boolean property that indicates the state of the wifi hardware...
virtual const core::Signal< WirelessNetwork::Ptr > & wireless_network_added() const =0
wireless_network_added is emitted whenever a new wifi becomes visible.
const std::shared_ptr< Manager > & platform_default_manager()
Provides access to a platform-specific implementation/instance of a connectivity manager.
A network device is connecting to a network and there is no other available network connection...
Characteristics operator|(Characteristics l, Characteristics r)
Bitwise or operator for Characteristics flags.
virtual const core::Property< bool > & is_wifi_enabled() const =0
Returns a getable/observable boolean property that indicates the state of the wifi subsystem...
There is no active network connection.
virtual const core::Property< Characteristics > & active_connection_characteristics() const =0
Returns a getable/observable property that describes the characteristics of the active network connec...
The connection has monetary costs. No data should be transfered.
virtual const core::Property< bool > & is_wwan_hardware_enabled() const =0
Returns a getable/observable boolean property that indicates the state of the wwan hardware...
virtual const core::Property< bool > & is_wwan_enabled() const =0
Returns a getable/observable boolean property that indicates the state of the wwan subsystem...
virtual const core::Signal< WirelessNetwork::Ptr > & wireless_network_removed() const =0
wireless_network_removed is emitted whenever a wifi disappears.
A network device is connected, with global network connectivity.
ConnectivityManagementNotSupported()
the connection is bandwidth limited. Large transfer should be postponed.
A network device is connected, but there is only link-local connectivity.
Characteristics
Summarizes characteristics of network connections.
virtual const core::Signal< RadioCell::Ptr > & connected_cell_added() const =0
connected_cell_added is emitted whenever the underlying modem connects to a new cell.
The connection goes via a mobile-broadband connection.
std::ostream & operator<<(std::ostream &out, State state)
Pretty prints the given state to the given output stream.
Characteristics operator&(Characteristics l, Characteristics r)
Bitwise and operator for Characteristics flags.
Nothing special about the characteristics.
virtual const core::Signal< RadioCell::Ptr > & connected_cell_removed() const =0
connected_cell_removed is emitted whenever the underlying modem disconnects from a cell...
The ConnectivityManagementNotSupported struct is thrown if the underlying platform does not provide s...
The connection goes via wifi.
State
Enumerates all known system connectivity states.
virtual const core::Property< State > & state() const =0
Returns the getable/observable connectivity state of the system.
The connection is volume limited. No large files should be transfered.
Networking is inactive and all devices are disabled.
A network device is connected, but there is only site-local connectivity.
The Manager class encapsulates access to network/radio information.