--- a/browsercore/core/network/WebNetworkConnectionManager.h Fri May 14 15:40:36 2010 +0300
+++ b/browsercore/core/network/WebNetworkConnectionManager.h Tue Jun 29 00:46:29 2010 -0400
@@ -1,55 +1,78 @@
/*
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License for more details.
*
-* Contributors:
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program. If not,
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
*
-* Description:
+* Description:
*
*/
-
#ifndef WEBNETWORKCONNECTIONMANAGER_H_
#define WEBNETWORKCONNECTIONMANAGER_H_
-
+#include "brtglobal.h"
#include <qnetworkconfigmanager.h>
#include <qnetworksession.h>
-#include "WebNetworkSession.h"
+#ifdef QT_MOBILITY_SYSINFO
+#include <qsysteminfo.h>
+#endif // QT_MOBILITY_SYSINFO
QTM_USE_NAMESPACE
namespace WRT {
+
+class WebNetworkSession;
-class WebNetworkConnectionManager : public QObject
+class WRT_BROWSER_EXPORT WebNetworkConnectionManager : public QObject
{
Q_OBJECT
public:
WebNetworkConnectionManager(QObject *parent = 0);
virtual ~WebNetworkConnectionManager();
+
void updateConfigurations();
QNetworkConfiguration defaultConfiguration() const;
void createSession(QNetworkConfiguration config);
void deleteSession();
-
-private Q_SLOTS:
- void configurationUpdateCompleted();
- void configurationAdded(const QNetworkConfiguration& config);
- void configurationRemoved(const QNetworkConfiguration& config);
- void onlineStateChanged(bool isOnline);
- void configurationChanged(const QNetworkConfiguration& config);
+ bool isOfflined() const { return m_offlined; }
+
+#ifdef QT_MOBILITY_SYSINFO
+Q_SIGNALS:
+ void networkOnlineStateChanged(bool isOnline);
+ void networkSessionNameChanged(QSystemNetworkInfo::NetworkMode mode, const QString &netName);
+#endif // QT_MOBILITY_SYSINFO
+
+protected Q_SLOTS:
+ virtual void handleConfigurationUpdateCompleted();
+ virtual void handleConfigurationAdded(const QNetworkConfiguration& config);
+ virtual void handleConfigurationRemoved(const QNetworkConfiguration& config);
+ virtual void handleOnlineStateChanged(bool isOnline);
+ virtual void handleConfigurationChanged(const QNetworkConfiguration& config);
+ virtual void handleSessionConfigurationChanged(const QNetworkConfiguration &config);
private:
+#ifdef QT_MOBILITY_SYSINFO
+ void initializeMapString(void);
+
+ QMap<QString, QSystemNetworkInfo::NetworkMode> m_mapStringNetworkMode;
+#endif // QT_MOBILITY_SYSINFO
+
QNetworkConfigurationManager m_NetworkConfigurationManager;
WebNetworkSession *m_WebNetworkSession;
+ bool m_offlined;
};
-}
+} // namesspace WRT
#endif /* WEBNETWORKCONNECTIONMANAGER_H_ */