summaryrefslogtreecommitdiffstats
path: root/src/plugins/bearer/symbian/qnetworksession_impl.h
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@accenture.com>2011-02-18 17:22:32 (GMT)
committerShane Kearns <shane.kearns@accenture.com>2011-02-21 13:11:18 (GMT)
commit5a6365f14006ab50854e41a5927645c7e9966756 (patch)
treef8cefc1fb5bee3932e6c0472e2d74d1f7477b516 /src/plugins/bearer/symbian/qnetworksession_impl.h
parentf5e7b6c64caa67bf11fa9754114d686da73b22d6 (diff)
downloadQt-5a6365f14006ab50854e41a5927645c7e9966756.zip
Qt-5a6365f14006ab50854e41a5927645c7e9966756.tar.gz
Qt-5a6365f14006ab50854e41a5927645c7e9966756.tar.bz2
Refactor dangerous multiple inheritance
QObject and CBase both expect to be the root class of the object hierarchy so it can cause problems if they are used in multiple inheritance. Refactored the CActive used for starting RConnection into a helper class. Reviewed-by: Markus Goetz
Diffstat (limited to 'src/plugins/bearer/symbian/qnetworksession_impl.h')
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.h29
1 files changed, 25 insertions, 4 deletions
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.h b/src/plugins/bearer/symbian/qnetworksession_impl.h
index 13980e9..2dda456 100644
--- a/src/plugins/bearer/symbian/qnetworksession_impl.h
+++ b/src/plugins/bearer/symbian/qnetworksession_impl.h
@@ -68,11 +68,12 @@
QT_BEGIN_NAMESPACE
class ConnectionProgressNotifier;
+class ConnectionStarter;
class SymbianEngine;
typedef void (*TOpenCUnSetdefaultifFunction)();
-class QNetworkSessionPrivateImpl : public QNetworkSessionPrivate, public CActive
+class QNetworkSessionPrivateImpl : public QNetworkSessionPrivate
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
, public MMobilityProtocolResp
#endif
@@ -126,7 +127,7 @@ public: // From MMobilityProtocolResp
#endif
protected: // From CActive
- void RunL();
+ void ConnectionStartComplete(TInt statusCode);
void DoCancel();
private Q_SLOTS:
@@ -165,12 +166,13 @@ private: // data
mutable RConnection iConnection;
mutable RConnectionMonitor iConnectionMonitor;
ConnectionProgressNotifier* ipConnectionNotifier;
-
+ ConnectionStarter* ipConnectionStarter;
+
bool iHandleStateNotificationsFromManager;
bool iFirstSync;
bool iStoppedByUser;
bool iClosedByUser;
-
+
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
CActiveCommsMobilityApiExt* iMobility;
#endif
@@ -188,6 +190,7 @@ private: // data
bool isOpening;
friend class ConnectionProgressNotifier;
+ friend class ConnectionStarter;
};
class ConnectionProgressNotifier : public CActive
@@ -210,6 +213,24 @@ private: // Data
};
+class ConnectionStarter : public CActive
+{
+public:
+ ConnectionStarter(QNetworkSessionPrivateImpl &owner, RConnection &connection);
+ ~ConnectionStarter();
+
+ void Start();
+ void Start(TConnPref &pref);
+protected:
+ void RunL();
+ TInt RunError(TInt err);
+ void DoCancel();
+
+private: // Data
+ QNetworkSessionPrivateImpl &iOwner;
+ RConnection& iConnection;
+};
+
QT_END_NAMESPACE
#endif //QNETWORKSESSION_IMPL_H