equal
deleted
inserted
replaced
64 #endif |
64 #endif |
65 |
65 |
66 // Uncomment and compile QtBearer to gain detailed state tracing |
66 // Uncomment and compile QtBearer to gain detailed state tracing |
67 // #define QT_BEARERMGMT_SYMBIAN_DEBUG |
67 // #define QT_BEARERMGMT_SYMBIAN_DEBUG |
68 |
68 |
|
69 #define QT_BEARERMGMT_CONFIGURATION_SNAP_PREFIX "S_" |
|
70 #define QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX "I_" |
|
71 |
69 class CCommsDatabase; |
72 class CCommsDatabase; |
70 class QEventLoop; |
73 class QEventLoop; |
71 |
74 |
72 QT_BEGIN_NAMESPACE |
75 QT_BEGIN_NAMESPACE |
73 class QTimer; |
76 class QTimer; |
99 void configurationStateChanged(TUint32 accessPointId, TUint32 connMonId, |
102 void configurationStateChanged(TUint32 accessPointId, TUint32 connMonId, |
100 QNetworkSession::State newState); |
103 QNetworkSession::State newState); |
101 |
104 |
102 public Q_SLOTS: |
105 public Q_SLOTS: |
103 void updateConfigurations(); |
106 void updateConfigurations(); |
|
107 void delayedConfigurationUpdate(); |
104 |
108 |
105 private: |
109 private: |
106 void registerPlatformCapabilities(); |
110 void registerPlatformCapabilities(); |
107 void updateStatesToSnaps(); |
111 void updateStatesToSnaps(); |
108 bool changeConfigurationStateTo(QExplicitlySharedDataPointer<QNetworkConfigurationPrivate>& sharedData, |
112 bool changeConfigurationStateTo(QExplicitlySharedDataPointer<QNetworkConfigurationPrivate>& sharedData, |
110 bool changeConfigurationStateAtMinTo(QExplicitlySharedDataPointer<QNetworkConfigurationPrivate>& sharedData, |
114 bool changeConfigurationStateAtMinTo(QExplicitlySharedDataPointer<QNetworkConfigurationPrivate>& sharedData, |
111 QNetworkConfiguration::StateFlags newState); |
115 QNetworkConfiguration::StateFlags newState); |
112 bool changeConfigurationStateAtMaxTo(QExplicitlySharedDataPointer<QNetworkConfigurationPrivate>& sharedData, |
116 bool changeConfigurationStateAtMaxTo(QExplicitlySharedDataPointer<QNetworkConfigurationPrivate>& sharedData, |
113 QNetworkConfiguration::StateFlags newState); |
117 QNetworkConfiguration::StateFlags newState); |
114 #ifdef SNAP_FUNCTIONALITY_AVAILABLE |
118 #ifdef SNAP_FUNCTIONALITY_AVAILABLE |
|
119 void updateMobileBearerToConfigs(TConnMonBearerInfo bearerInfo); |
115 QNetworkConfigurationPrivate* configFromConnectionMethodL(RCmConnectionMethod& connectionMethod); |
120 QNetworkConfigurationPrivate* configFromConnectionMethodL(RCmConnectionMethod& connectionMethod); |
116 #else |
121 #else |
117 bool readNetworkConfigurationValuesFromCommsDb( |
122 bool readNetworkConfigurationValuesFromCommsDb( |
118 TUint32 aApId, QNetworkConfigurationPrivate* apNetworkConfiguration); |
123 TUint32 aApId, QNetworkConfigurationPrivate* apNetworkConfiguration); |
119 void readNetworkConfigurationValuesFromCommsDbL( |
124 void readNetworkConfigurationValuesFromCommsDbL( |
124 void updateActiveAccessPoints(); |
129 void updateActiveAccessPoints(); |
125 void updateAvailableAccessPoints(); |
130 void updateAvailableAccessPoints(); |
126 void accessPointScanningReady(TBool scanSuccessful, TConnMonIapInfo iapInfo); |
131 void accessPointScanningReady(TBool scanSuccessful, TConnMonIapInfo iapInfo); |
127 void startCommsDatabaseNotifications(); |
132 void startCommsDatabaseNotifications(); |
128 void stopCommsDatabaseNotifications(); |
133 void stopCommsDatabaseNotifications(); |
129 void waitRandomTime(); |
134 void updateConfigurationsAfterRandomTime(); |
130 |
135 |
131 QNetworkConfiguration defaultConfigurationL(); |
136 QNetworkConfiguration defaultConfigurationL(); |
132 TBool GetS60PlatformVersion(TUint& aMajor, TUint& aMinor) const; |
137 TBool GetS60PlatformVersion(TUint& aMajor, TUint& aMinor) const; |
133 void startMonitoringIAPData(TUint32 aIapId); |
138 void startMonitoringIAPData(TUint32 aIapId); |
134 QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> dataByConnectionId(TUint aConnectionId); |
139 QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> dataByConnectionId(TUint aConnectionId); |
142 // MConnectionMonitorObserver |
147 // MConnectionMonitorObserver |
143 void EventL(const CConnMonEventBase& aEvent); |
148 void EventL(const CConnMonEventBase& aEvent); |
144 // For QNetworkSessionPrivate to indicate about state changes |
149 // For QNetworkSessionPrivate to indicate about state changes |
145 void configurationStateChangeReport(TUint32 accessPointId, |
150 void configurationStateChangeReport(TUint32 accessPointId, |
146 QNetworkSession::State newState); |
151 QNetworkSession::State newState); |
|
152 #ifdef OCC_FUNCTIONALITY_AVAILABLE |
|
153 QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> configurationFromEasyWlan(TUint32 apId, TUint connectionId); |
|
154 #endif |
147 |
155 |
148 public: // Data |
156 public: // Data |
149 //this table contains an up to date list of all configs at any time. |
157 //this table contains an up to date list of all configs at any time. |
150 //it must be updated if configurations change, are added/removed or |
158 //it must be updated if configurations change, are added/removed or |
151 //the members of ServiceNetworks change |
159 //the members of ServiceNetworks change |
161 |
169 |
162 TBool iWaitingCommsDatabaseNotifications; |
170 TBool iWaitingCommsDatabaseNotifications; |
163 TBool iOnline; |
171 TBool iOnline; |
164 TBool iInitOk; |
172 TBool iInitOk; |
165 TBool iUpdateGoingOn; |
173 TBool iUpdateGoingOn; |
166 TBool iIgnoringUpdates; |
174 TBool iUpdatePending; |
167 TUint iTimeToWait; |
175 TUint iTimeToWait; |
168 QEventLoop* iIgnoreEventLoop; |
|
169 |
176 |
170 AccessPointsAvailabilityScanner* ipAccessPointsAvailabilityScanner; |
177 AccessPointsAvailabilityScanner* ipAccessPointsAvailabilityScanner; |
171 |
178 |
172 friend class QNetworkSessionPrivate; |
179 friend class QNetworkSessionPrivate; |
173 friend class AccessPointsAvailabilityScanner; |
180 friend class AccessPointsAvailabilityScanner; |