qtmobility/src/bearer/qnetworksession_maemo_p.h
branchRCL_3
changeset 1 5822d84012fb
parent 0 cfcbf08528c4
child 3 eb34711bcc75
--- a/qtmobility/src/bearer/qnetworksession_maemo_p.h	Thu Apr 01 08:30:34 2010 +0300
+++ b/qtmobility/src/bearer/qnetworksession_maemo_p.h	Thu Apr 15 08:16:03 2010 +0300
@@ -58,10 +58,9 @@
 #include <qnetworksession.h>
 #include <QNetworkInterface>
 #include <QDateTime>
+#include <QTimer>
 
-#ifdef Q_WS_MAEMO_6
 #include <icd/dbus_api.h>
-#endif
 
 QTM_BEGIN_NAMESPACE
 
@@ -71,13 +70,11 @@
 public:
     QNetworkSessionPrivate() : 
         tx_data(0), rx_data(0), m_activeTime(0), isOpen(false),
-#ifdef Q_WS_MAEMO_6
         connectFlags(ICD_CONNECTION_FLAG_USER_EVENT),
-#else
-        connectFlags(0),
-#endif
         currentState(QNetworkSession::Invalid)
     {
+        m_stopTimer.setSingleShot(true);
+        connect(&m_stopTimer, SIGNAL(timeout()), this, SLOT(finishStopBySendingClosedSignal()));
     }
 
     ~QNetworkSessionPrivate()
@@ -121,8 +118,9 @@
 private Q_SLOTS:
     void do_open();
     void networkConfigurationsChanged();
-    void configurationChanged(const QNetworkConfiguration &config);
+    void iapStateChanged(const QString& iapid, uint icd_connection_state);
     void updateProxies(QNetworkSession::State newState);
+    void finishStopBySendingClosedSignal();
 
 private:
     QNetworkConfigurationManager manager;
@@ -145,7 +143,6 @@
 
     QNetworkConfiguration& copyConfig(QNetworkConfiguration &fromConfig, QNetworkConfiguration &toConfig, bool deepCopy = true);
     void clearConfiguration(QNetworkConfiguration &config);
-    void cleanupAnyConfiguration();
 
     QNetworkSession::State state;
     bool isOpen;
@@ -161,13 +158,15 @@
     QString currentNetworkInterface;
     friend class IcdListener;
     void updateState(QNetworkSession::State);
-    void updateIdentifier(QString &newId);
+    void updateIdentifier(const QString &newId);
     quint64 getStatistics(bool sent) const;
     void cleanupSession(void);
 
     void updateProxyInformation();
     void clearProxyInformation();
     QNetworkSession::State currentState;
+
+    QTimer m_stopTimer;
 };
 
 QTM_END_NAMESPACE