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;
134 virtual const core::Property<bool>& is_wifi_enabled()
const = 0;
141 virtual const core::Property<bool>& is_wwan_enabled()
const = 0;
148 virtual const core::Property<bool>& is_wifi_hardware_enabled()
const = 0;
155 virtual const core::Property<bool>& is_wwan_hardware_enabled()
const = 0;
162 virtual const core::Property<Characteristics>& active_connection_characteristics()
const = 0;
177 virtual void request_scan_for_wireless_networks() = 0;
186 virtual const core::Signal<>& wireless_network_scan_finished()
const = 0;
191 virtual const core::Signal<WirelessNetwork::Ptr>& wireless_network_added()
const = 0;
196 virtual const core::Signal<WirelessNetwork::Ptr>& wireless_network_removed()
const = 0;
201 virtual void enumerate_visible_wireless_networks(
const std::function<
void(
const WirelessNetwork::Ptr&)>&)
const = 0;
206 virtual const core::Signal<RadioCell::Ptr>& connected_cell_added()
const = 0;
211 virtual const core::Signal<RadioCell::Ptr>& connected_cell_removed()
const = 0;
216 virtual void enumerate_connected_radio_cells(
const std::function<
void(
const RadioCell::Ptr&)>&)
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.
Network connections are being cleaned up.
The connection goes via a roaming mobile-broadband connection.
std::shared_ptr< WirelessNetwork > Ptr
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.
There is no active network connection.
The connection has monetary costs. No data should be transfered.
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.
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.
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.
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.