1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef NSQTNETWORKMANAGER_H_
6 #define NSQTNETWORKMANAGER_H_
8 #include <QNetworkConfigurationManager>
11 #include <QNetworkConfiguration>
12 #include <QNetworkSession>
15 class nsQtNetworkManager
;
19 class nsQtNetworkManager
: public QObject
24 static void destroy();
25 virtual ~nsQtNetworkManager();
27 static nsQtNetworkManager
* get() { return gQtNetworkManager
; }
29 static bool IsConnected();
30 static bool GetLinkStatusKnown();
31 static void enableInstance();
32 bool openConnection(const QString
&);
35 void openConnectionSignal();
39 void onlineStateChanged(bool);
45 explicit nsQtNetworkManager(QObject
* parent
= 0);
47 static nsQtNetworkManager
* gQtNetworkManager
;
48 QNetworkSession
* networkSession
;
49 QNetworkConfiguration networkConfiguration
;
50 QNetworkConfigurationManager networkConfigurationManager
;
55 #endif /* NSQTNETWORKMANAGER_H_ */