equal
deleted
inserted
replaced
1 /**************************************************************************** |
1 /**************************************************************************** |
2 ** |
2 ** |
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 ** All rights reserved. |
4 ** All rights reserved. |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
6 ** |
6 ** |
7 ** This file is part of the Qt Mobility Components. |
7 ** This file is part of the Qt Mobility Components. |
8 ** |
8 ** |
53 // We mean it. |
53 // We mean it. |
54 // |
54 // |
55 |
55 |
56 #include <qnetworkconfigmanager.h> |
56 #include <qnetworkconfigmanager.h> |
57 #include <qnetworkconfiguration_s60_p.h> |
57 #include <qnetworkconfiguration_s60_p.h> |
|
58 #include <qnetworksession.h> |
58 |
59 |
59 #include <QHash> |
60 #include <QHash> |
60 #include <rconnmon.h> |
61 #include <rconnmon.h> |
61 #ifdef SNAP_FUNCTIONALITY_AVAILABLE |
62 #ifdef SNAP_FUNCTIONALITY_AVAILABLE |
62 #include <cmmanager.h> |
63 #include <cmmanager.h> |
63 #endif |
64 #endif |
|
65 |
|
66 // Uncomment and compile QtBearer to gain detailed state tracing |
|
67 // #define QT_BEARERMGMT_SYMBIAN_DEBUG |
64 |
68 |
65 class CCommsDatabase; |
69 class CCommsDatabase; |
66 class QEventLoop; |
70 class QEventLoop; |
67 |
71 |
68 QT_BEGIN_NAMESPACE |
72 QT_BEGIN_NAMESPACE |
89 void configurationAdded(const QNetworkConfiguration& config); |
93 void configurationAdded(const QNetworkConfiguration& config); |
90 void configurationRemoved(const QNetworkConfiguration& config); |
94 void configurationRemoved(const QNetworkConfiguration& config); |
91 void configurationUpdateComplete(); |
95 void configurationUpdateComplete(); |
92 void configurationChanged(const QNetworkConfiguration& config); |
96 void configurationChanged(const QNetworkConfiguration& config); |
93 void onlineStateChanged(bool isOnline); |
97 void onlineStateChanged(bool isOnline); |
|
98 |
|
99 void configurationStateChanged(TUint32 accessPointId, TUint32 connMonId, |
|
100 QNetworkSession::State newState); |
94 |
101 |
95 public Q_SLOTS: |
102 public Q_SLOTS: |
96 void updateConfigurations(); |
103 void updateConfigurations(); |
97 |
104 |
98 private: |
105 private: |
124 QNetworkConfiguration defaultConfigurationL(); |
131 QNetworkConfiguration defaultConfigurationL(); |
125 TBool GetS60PlatformVersion(TUint& aMajor, TUint& aMinor) const; |
132 TBool GetS60PlatformVersion(TUint& aMajor, TUint& aMinor) const; |
126 void startMonitoringIAPData(TUint32 aIapId); |
133 void startMonitoringIAPData(TUint32 aIapId); |
127 QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> dataByConnectionId(TUint aConnectionId); |
134 QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> dataByConnectionId(TUint aConnectionId); |
128 |
135 |
129 protected: // From CActive |
136 protected: |
|
137 // From CActive |
130 void RunL(); |
138 void RunL(); |
131 void DoCancel(); |
139 void DoCancel(); |
132 |
140 |
133 private: // MConnectionMonitorObserver |
141 private: |
|
142 // MConnectionMonitorObserver |
134 void EventL(const CConnMonEventBase& aEvent); |
143 void EventL(const CConnMonEventBase& aEvent); |
|
144 // For QNetworkSessionPrivate to indicate about state changes |
|
145 void configurationStateChangeReport(TUint32 accessPointId, |
|
146 QNetworkSession::State newState); |
135 |
147 |
136 public: // Data |
148 public: // Data |
137 //this table contains an up to date list of all configs at any time. |
149 //this table contains an up to date list of all configs at any time. |
138 //it must be updated if configurations change, are added/removed or |
150 //it must be updated if configurations change, are added/removed or |
139 //the members of ServiceNetworks change |
151 //the members of ServiceNetworks change |