Class for managing network sessions.
More...
#include <NetworkManager.h>
|
void | statusChanged (bool aConnected, Sync::InternetConnectionType aType) |
| This signal is emitted when the device's online status changes. More...
|
|
void | connectionSuccess () |
| This signal is emitted when a network session gets connected. More...
|
|
void | connectionError () |
| This signal is emitted when opening a network session fails. More...
|
|
|
| NetworkManager (QObject *parent=0) |
| Constructor. More...
|
|
| ~NetworkManager () |
| Destructor. More...
|
|
bool | isOnline () |
| Returns if the device is currently online, i.e, a data sessions is possible. More...
|
|
Sync::InternetConnectionType | connectionType () const |
| Returns the type of connection used by the device. More...
|
|
void | connectSession (bool connectInBackground=false) |
| Connects a new network session. If a session was already open, the signal connectionSuccess will be emitted immediately, else the function will return and the signal connectionSuccess or connectionError will be emitted accordingly. The caller can choose whether to show the network connectivity dialog, or just open the default network configuration in the background using the parameter connetInBackground. More...
|
|
void | disconnectSession () |
| Disconnects an open session. More...
|
|
Class for managing network sessions.
This class provides APIs to open and close network sessions. It internally uses QNetworkSession set of classes to manage network sessions. The user while creating a new session can choose whether to pop-up the internet connectivity dialog or not. The class also signals about online status of the device.
NetworkManager::NetworkManager |
( |
QObject * |
parent = 0 | ) |
|
NetworkManager::~NetworkManager |
( |
| ) |
|
void Buteo::NetworkManager::connectionError |
( |
| ) |
|
|
signal |
This signal is emitted when opening a network session fails.
void Buteo::NetworkManager::connectionSuccess |
( |
| ) |
|
|
signal |
This signal is emitted when a network session gets connected.
Sync::InternetConnectionType NetworkManager::connectionType |
( |
| ) |
const |
Returns the type of connection used by the device.
- Returns
- Sync::InternetConnectionType the type of connection.
void NetworkManager::connectSession |
( |
bool |
connectInBackground = false | ) |
|
Connects a new network session. If a session was already open, the signal connectionSuccess will be emitted immediately, else the function will return and the signal connectionSuccess or connectionError will be emitted accordingly. The caller can choose whether to show the network connectivity dialog, or just open the default network configuration in the background using the parameter connetInBackground.
- Parameters
-
connectInBackground | If true, the connection is opened without popping up the connetion dialog |
void NetworkManager::disconnectSession |
( |
| ) |
|
Disconnects an open session.
bool NetworkManager::isOnline |
( |
| ) |
|
Returns if the device is currently online, i.e, a data sessions is possible.
- Returns
- True if device is online, false if not
void Buteo::NetworkManager::statusChanged |
( |
bool |
aConnected, |
|
|
Sync::InternetConnectionType |
aType |
|
) |
| |
|
signal |
This signal is emitted when the device's online status changes.
- Parameters
-
aConnected | If true, the device is online |
The documentation for this class was generated from the following files: