23 #ifndef NETWORKMANAGER_H_
24 #define NETWORKMANAGER_H_
26 #include <QNetworkSession>
28 #include "SyncCommonDefs.h"
30 class QNetworkConfigurationManager;
95 void statusChanged(
bool aConnected, Sync::InternetConnectionType aType);
109 QNetworkConfigurationManager *m_networkConfigManager;
110 QNetworkSession *m_networkSession;
111 static bool m_isSessionActive;
113 static int m_refCount;
115 QTimer *m_sessionTimer;
116 Sync::InternetConnectionType m_connectionType;
117 QTimer m_idleRefreshTimer;
120 void slotSessionState(QNetworkSession::State status);
121 void slotSessionError(QNetworkSession::SessionError error);
122 void sessionConnectionTimeout();
123 void slotConfigurationChanged();
128 #endif//NETWORKMANAGER_H_
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:111
~NetworkManager()
Destructor.
Definition: NetworkManager.cpp:85
Definition: AccountsHelper.h:31
Sync::InternetConnectionType connectionType() const
Returns the type of connection used by the device.
Definition: NetworkManager.cpp:106
void connectionSuccess()
This signal is emitted when a network session gets connected.
Definition: moc_NetworkManager.cpp:204
void connectionError()
This signal is emitted when opening a network session fails.
Definition: moc_NetworkManager.cpp:210
bool isOnline()
Returns if the device is currently online, i.e, a data sessions is possible.
Definition: NetworkManager.cpp:100
Class for managing network sessions.
Definition: NetworkManager.h:43
void statusChanged(bool aConnected, Sync::InternetConnectionType aType)
This signal is emitted when the device's online status changes.
Definition: moc_NetworkManager.cpp:197
NetworkManager(QObject *parent=0)
Constructor.
Definition: NetworkManager.cpp:36
void disconnectSession()
Disconnects an open session.
Definition: NetworkManager.cpp:199