23#ifndef NETWORKMANAGER_H_
24#define NETWORKMANAGER_H_
26#include <QNetworkSession>
29#include "SyncCommonDefs.h"
31class QNetworkConfigurationManager;
93 void statusChanged(
bool aConnected, Sync::InternetConnectionType aType);
104 static bool m_isSessionActive;
105 static int m_refCount;
107 QNetworkConfigurationManager *m_networkConfigManager;
108 QNetworkSession *m_networkSession;
111 QTimer *m_sessionTimer;
112 Sync::InternetConnectionType m_connectionType;
113 QTimer m_idleRefreshTimer;
116 void slotSessionState(QNetworkSession::State status);
117 void slotSessionError(QNetworkSession::SessionError error);
118 void sessionConnectionTimeout();
119 void slotConfigurationChanged();
bool isOnline()
Returns if the device is currently online, i.e, a data sessions is possible.
Definition NetworkManager.cpp:129
void connectionSuccess()
This signal is emitted when a network session gets connected.
NetworkManager(QObject *parent=nullptr)
Constructor.
Definition NetworkManager.cpp:71
~NetworkManager()
Destructor.
Definition NetworkManager.cpp:119
Sync::InternetConnectionType connectionType() const
Returns the type of connection used by the device.
Definition NetworkManager.cpp:135
void connectionError()
This signal is emitted when opening a network session fails.
void disconnectSession()
Disconnects an open session.
Definition NetworkManager.cpp:222
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:140
void statusChanged(bool aConnected, Sync::InternetConnectionType aType)
This signal is emitted when the device's online status changes.