summaryrefslogtreecommitdiffstats
path: root/src/network/bearer/qnetworksession.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2011-04-20 10:52:58 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2011-04-20 10:52:58 (GMT)
commit40a2129c60f21ea6f146d405ebcadb25628db273 (patch)
tree1a61e8ab7cc90c698c4def62439a2acc0cec6bad /src/network/bearer/qnetworksession.cpp
parent8485052e3991aebf7c823b3e80fc06ccf9f08991 (diff)
parent7a9ed6a1983e318bfb14f0b2db41b3a4e1415529 (diff)
downloadQt-40a2129c60f21ea6f146d405ebcadb25628db273.zip
Qt-40a2129c60f21ea6f146d405ebcadb25628db273.tar.gz
Qt-40a2129c60f21ea6f146d405ebcadb25628db273.tar.bz2
Merge remote-tracking branch 'earth-team/master' into earth-staging-master
Diffstat (limited to 'src/network/bearer/qnetworksession.cpp')
-rw-r--r--src/network/bearer/qnetworksession.cpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/network/bearer/qnetworksession.cpp b/src/network/bearer/qnetworksession.cpp
index af60a43..21e64d9 100644
--- a/src/network/bearer/qnetworksession.cpp
+++ b/src/network/bearer/qnetworksession.cpp
@@ -44,10 +44,16 @@
#include <QEventLoop>
#include <QTimer>
+#include <QThread>
#include "qnetworkconfigmanager_p.h"
#include "qnetworksession_p.h"
+#ifdef Q_OS_SYMBIAN
+#include <es_sock.h>
+#include <private/qcore_symbian_p.h>
+#endif
+
#ifndef QT_NO_BEARERMANAGEMENT
QT_BEGIN_NAMESPACE
@@ -705,6 +711,40 @@ void QNetworkSession::disconnectNotify(const char *signal)
d->setALREnabled(false);
}
+#ifdef Q_OS_SYMBIAN
+RConnection* QNetworkSessionPrivate::nativeSession(QNetworkSession &s)
+{
+ if (!s.d)
+ return 0;
+ if (s.thread() != QThread::currentThread())
+ qWarning("QNetworkSessionPrivate::nativeSession called in wrong thread");
+ return s.d->nativeSession();
+}
+
+TInt QNetworkSessionPrivate::nativeOpenSocket(QNetworkSession& s, RSocket& sock, TUint family, TUint type, TUint protocol)
+{
+ if (!s.d)
+ return 0;
+ QMutexLocker lock(&(s.d->mutex));
+ RConnection *con = s.d->nativeSession();
+ if (!con || !con->SubSessionHandle())
+ return KErrNotReady;
+ return sock.Open(qt_symbianGetSocketServer(), family, type, protocol, *con);
+}
+
+TInt QNetworkSessionPrivate::nativeOpenHostResolver(QNetworkSession& s, RHostResolver& resolver, TUint family, TUint protocol)
+{
+ if (!s.d)
+ return 0;
+ QMutexLocker lock(&(s.d->mutex));
+ RConnection *con = s.d->nativeSession();
+ if (!con || !con->SubSessionHandle())
+ return KErrNotReady;
+ return resolver.Open(qt_symbianGetSocketServer(), family, protocol, *con);
+}
+
+#endif
+
#include "moc_qnetworksession.cpp"
QT_END_NAMESPACE