23 #ifndef NETWORKMANAGER_H_
24 #define NETWORKMANAGER_H_
26 #include <QNetworkSession>
28 #include "SyncCommonDefs.h"
30 class QNetworkConfigurationManager;
92 void statusChanged(
bool aConnected, Sync::InternetConnectionType aType);
103 static bool m_isSessionActive;
104 static int m_refCount;
106 QNetworkConfigurationManager *m_networkConfigManager;
107 QNetworkSession *m_networkSession;
110 QTimer *m_sessionTimer;
111 Sync::InternetConnectionType m_connectionType;
112 QTimer m_idleRefreshTimer;
115 void slotSessionState(QNetworkSession::State status);
116 void slotSessionError(QNetworkSession::SessionError error);
117 void sessionConnectionTimeout();
118 void slotConfigurationChanged();
Class for managing network sessions.
Definition: NetworkManager.h:43
bool isOnline()
Returns if the device is currently online, i.e, a data sessions is possible.
Definition: NetworkManager.cpp:127
void connectionSuccess()
This signal is emitted when a network session gets connected.
Definition: moc_NetworkManager.cpp:213
~NetworkManager()
Destructor.
Definition: NetworkManager.cpp:118
Sync::InternetConnectionType connectionType() const
Returns the type of connection used by the device.
Definition: NetworkManager.cpp:133
void connectionError()
This signal is emitted when opening a network session fails.
Definition: moc_NetworkManager.cpp:219
void disconnectSession()
Disconnects an open session.
Definition: NetworkManager.cpp:218
void connectSession(bool connectInBackground=false)
Connects a new network session. If a session was already open, the signal connectionSuccess will be e...
Definition: NetworkManager.cpp:138
void statusChanged(bool aConnected, Sync::InternetConnectionType aType)
This signal is emitted when the device's online status changes.
Definition: moc_NetworkManager.cpp:206
NetworkManager(QObject *parent=0)
Constructor.
Definition: NetworkManager.cpp:70