summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/network/bearer/qnetworksessionengine_p.h19
-rw-r--r--src/plugins/bearer/corewlan/corewlan.pro3
-rw-r--r--src/plugins/bearer/corewlan/qcorewlanengine.h6
-rw-r--r--src/plugins/bearer/corewlan/qcorewlanengine.mm4
-rw-r--r--src/plugins/bearer/generic/generic.pro1
-rw-r--r--src/plugins/bearer/generic/qgenericengine.cpp14
-rw-r--r--src/plugins/bearer/generic/qgenericengine.h6
-rw-r--r--src/plugins/bearer/nativewifi/nativewifi.pro4
-rw-r--r--src/plugins/bearer/nativewifi/qnativewifiengine.cpp4
-rw-r--r--src/plugins/bearer/nativewifi/qnativewifiengine.h6
-rw-r--r--src/plugins/bearer/networkmanager/networkmanager.pro3
-rw-r--r--src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp4
-rw-r--r--src/plugins/bearer/networkmanager/qnetworkmanagerengine.h6
-rw-r--r--src/plugins/bearer/nla/nla.pro4
-rw-r--r--src/plugins/bearer/nla/qnlaengine.cpp4
-rw-r--r--src/plugins/bearer/nla/qnlaengine.h7
-rw-r--r--src/plugins/bearer/qnetworksession_impl.cpp34
-rw-r--r--src/plugins/bearer/qnetworksession_impl.h11
-rw-r--r--src/plugins/bearer/qnetworksessionengine_impl.h77
-rw-r--r--src/plugins/bearer/symbian/symbianengine.cpp24
-rw-r--r--src/plugins/bearer/symbian/symbianengine.h8
21 files changed, 137 insertions, 112 deletions
diff --git a/src/network/bearer/qnetworksessionengine_p.h b/src/network/bearer/qnetworksessionengine_p.h
index 029c2c5..39c3d17 100644
--- a/src/network/bearer/qnetworksessionengine_p.h
+++ b/src/network/bearer/qnetworksessionengine_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -73,28 +73,13 @@ class Q_NETWORK_EXPORT QNetworkSessionEngine : public QObject
Q_OBJECT
public:
- enum ConnectionError {
- InterfaceLookupError = 0,
- ConnectError,
- OperationNotSupported,
- DisconnectionError,
- };
-
QNetworkSessionEngine(QObject *parent = 0);
virtual ~QNetworkSessionEngine();
- virtual QString getInterfaceFromId(const QString &id) = 0;
virtual bool hasIdentifier(const QString &id) = 0;
- //virtual QString bearerName(const QString &id) = 0;
-
- virtual void connectToId(const QString &id) = 0;
- virtual void disconnectFromId(const QString &id) = 0;
-
virtual void requestUpdate() = 0;
- virtual QNetworkSession::State sessionStateForId(const QString &id) = 0;
-
virtual QNetworkConfigurationManager::Capabilities capabilities() const = 0;
virtual QNetworkSessionPrivate *createSessionBackend() = 0;
@@ -115,8 +100,6 @@ Q_SIGNALS:
void configurationChanged(QNetworkConfigurationPrivatePointer config);
void updateCompleted();
-
- void connectionError(const QString &id, QNetworkSessionEngine::ConnectionError error);
};
typedef QNetworkSessionEngine QBearerEngine;
diff --git a/src/plugins/bearer/corewlan/corewlan.pro b/src/plugins/bearer/corewlan/corewlan.pro
index 1660215..c59d602 100644
--- a/src/plugins/bearer/corewlan/corewlan.pro
+++ b/src/plugins/bearer/corewlan/corewlan.pro
@@ -12,7 +12,8 @@ contains(QT_CONFIG, corewlan) {
}
HEADERS += qcorewlanengine.h \
- ../qnetworksession_impl.h
+ ../qnetworksession_impl.h \
+ ../qnetworksessionengine_impl.h
SOURCES += main.cpp \
qcorewlanengine.mm \
diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.h b/src/plugins/bearer/corewlan/qcorewlanengine.h
index 61d80cf..7199ace 100644
--- a/src/plugins/bearer/corewlan/qcorewlanengine.h
+++ b/src/plugins/bearer/corewlan/qcorewlanengine.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -42,7 +42,7 @@
#ifndef QCOREWLANENGINE_H
#define QCOREWLANENGINE_H
-#include <QtNetwork/private/qnetworksessionengine_p.h>
+#include "../qnetworksessionengine_impl.h"
#include <QMap>
#include <QTimer>
@@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE
class QNetworkConfigurationPrivate;
-class QCoreWlanEngine : public QNetworkSessionEngine
+class QCoreWlanEngine : public QNetworkSessionEngineImpl
{
Q_OBJECT
diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm
index 2cbccb5..ca193ab 100644
--- a/src/plugins/bearer/corewlan/qcorewlanengine.mm
+++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -106,7 +106,7 @@ static QString qGetInterfaceType(const QString &interfaceString)
}
QCoreWlanEngine::QCoreWlanEngine(QObject *parent)
-: QNetworkSessionEngine(parent)
+: QNetworkSessionEngineImpl(parent)
{
connect(&pollTimer, SIGNAL(timeout()), this, SLOT(doRequestUpdate()));
pollTimer.setInterval(10000);
diff --git a/src/plugins/bearer/generic/generic.pro b/src/plugins/bearer/generic/generic.pro
index d039731..dbf96d1 100644
--- a/src/plugins/bearer/generic/generic.pro
+++ b/src/plugins/bearer/generic/generic.pro
@@ -5,6 +5,7 @@ QT += network
HEADERS += qgenericengine.h \
../qnetworksession_impl.h \
+ ../qnetworksessionengine_impl.h \
../platformdefs_win.h
SOURCES += qgenericengine.cpp \
../qnetworksession_impl.cpp \
diff --git a/src/plugins/bearer/generic/qgenericengine.cpp b/src/plugins/bearer/generic/qgenericengine.cpp
index 55d1ae4..dea820d 100644
--- a/src/plugins/bearer/generic/qgenericengine.cpp
+++ b/src/plugins/bearer/generic/qgenericengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -141,7 +141,7 @@ static QString qGetInterfaceType(const QString &interface)
}
QGenericEngine::QGenericEngine(QObject *parent)
-: QNetworkSessionEngine(parent)
+: QNetworkSessionEngineImpl(parent)
{
connect(&pollTimer, SIGNAL(timeout()), this, SLOT(doRequestUpdate()));
pollTimer.setInterval(10000);
@@ -162,16 +162,6 @@ bool QGenericEngine::hasIdentifier(const QString &id)
return configurationInterface.contains(id);
}
-/*QString QGenericEngine::bearerName(const QString &id)
-{
- QString interface = getInterfaceFromId(id);
-
- if (interface.isEmpty())
- return QLatin1String("Unknown");
-
- return qGetInterfaceType(interface);
-}*/
-
void QGenericEngine::connectToId(const QString &id)
{
emit connectionError(id, OperationNotSupported);
diff --git a/src/plugins/bearer/generic/qgenericengine.h b/src/plugins/bearer/generic/qgenericengine.h
index b44685b..d755228 100644
--- a/src/plugins/bearer/generic/qgenericengine.h
+++ b/src/plugins/bearer/generic/qgenericengine.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -42,7 +42,7 @@
#ifndef QGENERICENGINE_H
#define QGENERICENGINE_H
-#include <QtNetwork/private/qnetworksessionengine_p.h>
+#include "../qnetworksessionengine_impl.h"
#include <QMap>
#include <QTimer>
@@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE
class QNetworkConfigurationPrivate;
class QNetworkSessionPrivate;
-class QGenericEngine : public QNetworkSessionEngine
+class QGenericEngine : public QNetworkSessionEngineImpl
{
Q_OBJECT
diff --git a/src/plugins/bearer/nativewifi/nativewifi.pro b/src/plugins/bearer/nativewifi/nativewifi.pro
index 6e99c62..928d819 100644
--- a/src/plugins/bearer/nativewifi/nativewifi.pro
+++ b/src/plugins/bearer/nativewifi/nativewifi.pro
@@ -5,7 +5,9 @@ QT += network
HEADERS += qnativewifiengine.h \
platformdefs.h \
- ../qnetworksession_impl.h
+ ../qnetworksession_impl.h \
+ ../qnetworksessionengine_impl.h
+
SOURCES += main.cpp \
qnativewifiengine.cpp \
../qnetworksession_impl.cpp
diff --git a/src/plugins/bearer/nativewifi/qnativewifiengine.cpp b/src/plugins/bearer/nativewifi/qnativewifiengine.cpp
index af538a8..9f0d4c0 100644
--- a/src/plugins/bearer/nativewifi/qnativewifiengine.cpp
+++ b/src/plugins/bearer/nativewifi/qnativewifiengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -77,7 +77,7 @@ void qNotificationCallback(WLAN_NOTIFICATION_DATA *data, QNativeWifiEngine *d)
}
QNativeWifiEngine::QNativeWifiEngine(QObject *parent)
-: QNetworkSessionEngine(parent), handle(0)
+: QNetworkSessionEngineImpl(parent), handle(0)
{
DWORD clientVersion;
diff --git a/src/plugins/bearer/nativewifi/qnativewifiengine.h b/src/plugins/bearer/nativewifi/qnativewifiengine.h
index 83d9e2c..41217e2 100644
--- a/src/plugins/bearer/nativewifi/qnativewifiengine.h
+++ b/src/plugins/bearer/nativewifi/qnativewifiengine.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -53,7 +53,7 @@
// We mean it.
//
-#include <QtNetwork/private/qnetworksessionengine_p.h>
+#include "../qnetworksessionengine_impl.h"
#include <QtCore/qtimer.h>
@@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE
class QNetworkConfigurationPrivate;
struct WLAN_NOTIFICATION_DATA;
-class QNativeWifiEngine : public QNetworkSessionEngine
+class QNativeWifiEngine : public QNetworkSessionEngineImpl
{
Q_OBJECT
diff --git a/src/plugins/bearer/networkmanager/networkmanager.pro b/src/plugins/bearer/networkmanager/networkmanager.pro
index 2050125..6f271c6 100644
--- a/src/plugins/bearer/networkmanager/networkmanager.pro
+++ b/src/plugins/bearer/networkmanager/networkmanager.pro
@@ -8,7 +8,8 @@ DEFINES += BACKEND_NM
HEADERS += qnmdbushelper.h \
qnetworkmanagerservice.h \
qnetworkmanagerengine.h \
- ../qnetworksession_impl.h
+ ../qnetworksession_impl.h \
+ ../qnetworksessionengine_impl.h
SOURCES += main.cpp \
qnmdbushelper.cpp \
diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
index 439772a..129f7d2 100644
--- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
+++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -60,7 +60,7 @@
QT_BEGIN_NAMESPACE
QNetworkManagerEngine::QNetworkManagerEngine(QObject *parent)
-: QNetworkSessionEngine(parent),
+: QNetworkSessionEngineImpl(parent),
interface(new QNetworkManagerInterface(this)),
systemSettings(new QNetworkManagerSettings(NM_DBUS_SERVICE_SYSTEM_SETTINGS, this)),
userSettings(new QNetworkManagerSettings(NM_DBUS_SERVICE_USER_SETTINGS, this))
diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h
index 5f8110c..f454628 100644
--- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h
+++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -53,7 +53,7 @@
// We mean it.
//
-#include <QtNetwork/private/qnetworksessionengine_p.h>
+#include "../qnetworksessionengine_impl.h"
#include "qnetworkmanagerservice.h"
@@ -62,7 +62,7 @@
QT_BEGIN_NAMESPACE
-class QNetworkManagerEngine : public QNetworkSessionEngine
+class QNetworkManagerEngine : public QNetworkSessionEngineImpl
{
Q_OBJECT
diff --git a/src/plugins/bearer/nla/nla.pro b/src/plugins/bearer/nla/nla.pro
index 9bd3526..4c5e492 100644
--- a/src/plugins/bearer/nla/nla.pro
+++ b/src/plugins/bearer/nla/nla.pro
@@ -11,7 +11,9 @@ QT += network
HEADERS += qnlaengine.h \
../platformdefs_win.h \
- ../qnetworksession_impl.h
+ ../qnetworksession_impl.h \
+ ../qnetworksessionengine_impl.h
+
SOURCES += main.cpp \
qnlaengine.cpp \
../qnetworksession_impl.cpp
diff --git a/src/plugins/bearer/nla/qnlaengine.cpp b/src/plugins/bearer/nla/qnlaengine.cpp
index 0ed62e3..ed802c0 100644
--- a/src/plugins/bearer/nla/qnlaengine.cpp
+++ b/src/plugins/bearer/nla/qnlaengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -506,7 +506,7 @@ void QNlaThread::fetchConfigurations()
}
QNlaEngine::QNlaEngine(QObject *parent)
-: QNetworkSessionEngine(parent), nlaThread(0)
+: QNetworkSessionEngineImpl(parent), nlaThread(0)
{
nlaThread = new QNlaThread(this);
connect(nlaThread, SIGNAL(networksChanged()),
diff --git a/src/plugins/bearer/nla/qnlaengine.h b/src/plugins/bearer/nla/qnlaengine.h
index 515a13c..fa010b9 100644
--- a/src/plugins/bearer/nla/qnlaengine.h
+++ b/src/plugins/bearer/nla/qnlaengine.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -53,7 +53,8 @@
// We mean it.
//
-#include <QtNetwork/private/qnetworksessionengine_p.h>
+#include "../qnetworksessionengine_impl.h"
+
#include <QtNetwork/private/qnativesocketengine_p.h>
#include <QMap>
@@ -71,7 +72,7 @@ public:
int version;
};
-class QNlaEngine : public QNetworkSessionEngine
+class QNlaEngine : public QNetworkSessionEngineImpl
{
Q_OBJECT
diff --git a/src/plugins/bearer/qnetworksession_impl.cpp b/src/plugins/bearer/qnetworksession_impl.cpp
index a826fd6..6de3423 100644
--- a/src/plugins/bearer/qnetworksession_impl.cpp
+++ b/src/plugins/bearer/qnetworksession_impl.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -40,9 +40,9 @@
****************************************************************************/
#include "qnetworksession_impl.h"
+#include "qnetworksessionengine_impl.h"
#include <QtNetwork/qnetworksession.h>
-#include <QtNetwork/private/qnetworksessionengine_p.h>
#include <QtNetwork/private/qnetworkconfigmanager_p.h>
#include <QtCore/qstringlist.h>
@@ -53,13 +53,14 @@
QT_BEGIN_NAMESPACE
-static QNetworkSessionEngine *getEngineFromId(const QString &id)
+static QNetworkSessionEngineImpl *getEngineFromId(const QString &id)
{
QNetworkConfigurationManagerPrivate *priv = qNetworkConfigurationManagerPrivate();
foreach (QNetworkSessionEngine *engine, priv->sessionEngines) {
- if (engine->hasIdentifier(id))
- return engine;
+ QNetworkSessionEngineImpl *engineImpl = qobject_cast<QNetworkSessionEngineImpl *>(engine);
+ if (engineImpl && engineImpl->hasIdentifier(id))
+ return engineImpl;
}
return 0;
@@ -110,8 +111,8 @@ void QNetworkSessionPrivateImpl::syncStateWithInterface()
state = QNetworkSession::Invalid;
lastError = QNetworkSession::UnknownSessionError;
- qRegisterMetaType<QNetworkSessionEngine::ConnectionError>
- ("QNetworkSessionEngine::ConnectionError");
+ qRegisterMetaType<QNetworkSessionEngineImpl::ConnectionError>
+ ("QNetworkSessionEngineImpl::ConnectionError");
switch (publicConfig.type()) {
case QNetworkConfiguration::InternetAccessPoint:
@@ -239,14 +240,6 @@ void QNetworkSessionPrivateImpl::setSessionProperty(const QString& /*key*/, cons
{
}
-/*QString QNetworkSessionPrivateImpl::bearerName() const
-{
- if (!publicConfig.isValid() || !engine)
- return QString();
-
- return engine->bearerName(activeConfig.identifier());
-}*/
-
QString QNetworkSessionPrivateImpl::errorString() const
{
switch (lastError) {
@@ -414,18 +407,19 @@ void QNetworkSessionPrivateImpl::forcedSessionClose(const QNetworkConfiguration
}
}
-void QNetworkSessionPrivateImpl::connectionError(const QString &id, QNetworkSessionEngine::ConnectionError error)
+void QNetworkSessionPrivateImpl::connectionError(const QString &id,
+ QNetworkSessionEngineImpl::ConnectionError error)
{
if (activeConfig.identifier() == id) {
networkConfigurationsChanged();
switch (error) {
- case QNetworkSessionEngine::OperationNotSupported:
+ case QNetworkSessionEngineImpl::OperationNotSupported:
lastError = QNetworkSession::OperationNotSupportedError;
opened = false;
break;
- case QNetworkSessionEngine::InterfaceLookupError:
- case QNetworkSessionEngine::ConnectError:
- case QNetworkSessionEngine::DisconnectionError:
+ case QNetworkSessionEngineImpl::InterfaceLookupError:
+ case QNetworkSessionEngineImpl::ConnectError:
+ case QNetworkSessionEngineImpl::DisconnectionError:
default:
lastError = QNetworkSession::UnknownSessionError;
}
diff --git a/src/plugins/bearer/qnetworksession_impl.h b/src/plugins/bearer/qnetworksession_impl.h
index 104d1f0..1fd97d3 100644
--- a/src/plugins/bearer/qnetworksession_impl.h
+++ b/src/plugins/bearer/qnetworksession_impl.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -53,15 +53,16 @@
// We mean it.
//
+#include "qnetworksessionengine_impl.h"
+
#include <QtNetwork/private/qnetworkconfigmanager_p.h>
-#include <QtNetwork/private/qnetworksessionengine_p.h>
#include <QtNetwork/private/qnetworksession_p.h>
#include <QtCore/qdatetime.h>
QT_BEGIN_NAMESPACE
-class QNetworkSessionEngine;
+class QNetworkSessionEngineImpl;
class QNetworkSessionPrivateImpl : public QNetworkSessionPrivate
{
@@ -109,7 +110,7 @@ private Q_SLOTS:
void networkConfigurationsChanged();
void configurationChanged(const QNetworkConfiguration &config);
void forcedSessionClose(const QNetworkConfiguration &config);
- void connectionError(const QString &id, QNetworkSessionEngine::ConnectionError error);
+ void connectionError(const QString &id, QNetworkSessionEngineImpl::ConnectionError error);
private:
QNetworkConfigurationManager manager;
@@ -120,7 +121,7 @@ private:
bool opened;
- QNetworkSessionEngine *engine;
+ QNetworkSessionEngineImpl *engine;
QNetworkSession::SessionError lastError;
diff --git a/src/plugins/bearer/qnetworksessionengine_impl.h b/src/plugins/bearer/qnetworksessionengine_impl.h
new file mode 100644
index 0000000..1294cc5
--- /dev/null
+++ b/src/plugins/bearer/qnetworksessionengine_impl.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QNETWORKSESSIONENGINE_IMPL_H
+#define QNETWORKSESSIONENGINE_IMPL_H
+
+#include <QtNetwork/private/qnetworksessionengine_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QNetworkSessionEngineImpl : public QNetworkSessionEngine
+{
+ Q_OBJECT
+
+public:
+ enum ConnectionError {
+ InterfaceLookupError = 0,
+ ConnectError,
+ OperationNotSupported,
+ DisconnectionError,
+ };
+
+ QNetworkSessionEngineImpl(QObject *parent = 0) : QNetworkSessionEngine(parent) { }
+ ~QNetworkSessionEngineImpl() { }
+
+ virtual void connectToId(const QString &id) = 0;
+ virtual void disconnectFromId(const QString &id) = 0;
+
+ virtual QString getInterfaceFromId(const QString &id) = 0;
+
+ virtual QNetworkSession::State sessionStateForId(const QString &id) = 0;
+
+Q_SIGNALS:
+ void connectionError(const QString &id, ConnectionError error);
+};
+
+QT_END_NAMESPACE
+
+#endif // QNETWORKSESSIONENGINE_IMPL_H
diff --git a/src/plugins/bearer/symbian/symbianengine.cpp b/src/plugins/bearer/symbian/symbianengine.cpp
index f5c5007..3d0ec0f 100644
--- a/src/plugins/bearer/symbian/symbianengine.cpp
+++ b/src/plugins/bearer/symbian/symbianengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -156,12 +156,6 @@ SymbianEngine::~SymbianEngine()
delete ipCommsDB;
}
-QString SymbianEngine::getInterfaceFromId(const QString &id)
-{
- qFatal("getInterfaceFromId(%s) not implemented\n", qPrintable(id));
- return QString();
-}
-
bool SymbianEngine::hasIdentifier(const QString &id)
{
return accessPointConfigurations.contains(id) ||
@@ -169,22 +163,6 @@ bool SymbianEngine::hasIdentifier(const QString &id)
userChoiceConfigurations.contains(id);
}
-void SymbianEngine::connectToId(const QString &id)
-{
- qFatal("connectToId(%s) not implemented\n", qPrintable(id));
-}
-
-void SymbianEngine::disconnectFromId(const QString &id)
-{
- qFatal("disconnectFromId(%s) not implemented\n", qPrintable(id));
-}
-
-QNetworkSession::State SymbianEngine::sessionStateForId(const QString &id)
-{
- qFatal("sessionStateForId(%s) not implemented\n", qPrintable(id));
- return QNetworkSession::Invalid;
-}
-
QNetworkConfigurationManager::Capabilities SymbianEngine::capabilities() const
{
QNetworkConfigurationManager::Capabilities capFlags;
diff --git a/src/plugins/bearer/symbian/symbianengine.h b/src/plugins/bearer/symbian/symbianengine.h
index cd5aa43..4a4a8c1 100644
--- a/src/plugins/bearer/symbian/symbianengine.h
+++ b/src/plugins/bearer/symbian/symbianengine.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -106,16 +106,10 @@ public:
SymbianEngine(QObject *parent = 0);
virtual ~SymbianEngine();
- QString getInterfaceFromId(const QString &id);
bool hasIdentifier(const QString &id);
- void connectToId(const QString &id);
- void disconnectFromId(const QString &id);
-
void requestUpdate();
- QNetworkSession::State sessionStateForId(const QString &id);
-
QNetworkConfigurationManager::Capabilities capabilities() const;
QNetworkSessionPrivate *createSessionBackend();