summaryrefslogtreecommitdiff
path: root/src/plugins/bearer
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@accenture.com>2011-02-17 13:27:45 +0000
committerShane Kearns <shane.kearns@accenture.com>2011-02-17 13:39:08 +0000
commit44ef44bc3826c78a10bcf02d3357bf6332c6c3ed (patch)
tree53053bdacc56009825ab24d3ed313390a9a40d4f /src/plugins/bearer
parent42adaaa0dffa9df387a145181bc97ee3bb9a4c7b (diff)
downloadqt4-tools-44ef44bc3826c78a10bcf02d3357bf6332c6c3ed.tar.gz
Explicit network session for QNetworkAccessManager
Implemented a tunnel to get the QNetworkSession from QNetworkAccessManager down to the socket engine. This is currently a private API for QNAM. This patch only implements the FTP backend - the other backends are to follow. On Symbian, the native socket engine will extract the native session (RConnection) from the QNetworkSession implementation, and use that to open sockets using the explicitly specified session. When no session is specified on the socket (default for networking usage outside of QNAM) then the socket is opened with no RConnection specified, which allows the IP stack to find any route via an open interface. The QFtp autotest is enhanced to test QFtp with an explicit session as well as implicit connectivity (where a QNetworkSession is opened by the user, and then QFtp is used without a specified connection). This autotest gives better coverage than the FTP test cases in QNetworkReply. Reviewed-by: Markus Goetz
Diffstat (limited to 'src/plugins/bearer')
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.cpp5
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.h3
2 files changed, 7 insertions, 1 deletions
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.cpp b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
index 2167dbbc14..e35c01aff6 100644
--- a/src/plugins/bearer/symbian/qnetworksession_impl.cpp
+++ b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
@@ -1535,6 +1535,11 @@ bool QNetworkSessionPrivateImpl::easyWlanTrueIapId(TUint32 &trueIapId) const
}
#endif
+RConnection* QNetworkSessionPrivateImpl::nativeSession()
+{
+ return &iConnection;
+}
+
ConnectionProgressNotifier::ConnectionProgressNotifier(QNetworkSessionPrivateImpl& owner, RConnection& connection)
: CActive(CActive::EPriorityUserInput), iOwner(owner), iConnection(connection)
{
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.h b/src/plugins/bearer/symbian/qnetworksession_impl.h
index a0e7a2a01c..f2a8a4540f 100644
--- a/src/plugins/bearer/symbian/qnetworksession_impl.h
+++ b/src/plugins/bearer/symbian/qnetworksession_impl.h
@@ -111,7 +111,8 @@ public:
quint64 bytesWritten() const;
quint64 bytesReceived() const;
quint64 activeTime() const;
-
+
+ RConnection* nativeSession();
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
public: // From MMobilityProtocolResp
void PreferredCarrierAvailable(TAccessPointInfo aOldAPInfo,