91 EXPORT_C TUid CMTPConnectionMgr::TransportUid() |
91 EXPORT_C TUid CMTPConnectionMgr::TransportUid() |
92 { |
92 { |
93 return iTransportUid; |
93 return iTransportUid; |
94 } |
94 } |
95 |
95 |
|
96 void CMTPConnectionMgr::ConnectionCloseComplete(const TUint& /*aConnUid*/) |
|
97 { |
|
98 if (iIsTransportStopping) |
|
99 { |
|
100 iIsTransportStopping = EFalse; |
|
101 ResumeSuspendedTransport(); |
|
102 } |
|
103 } |
|
104 |
96 EXPORT_C void CMTPConnectionMgr::StartTransportL(TUid aTransport) |
105 EXPORT_C void CMTPConnectionMgr::StartTransportL(TUid aTransport) |
97 { |
106 { |
98 StartTransportL( aTransport, NULL ); |
107 StartTransportL( aTransport, NULL ); |
99 } |
108 } |
100 |
109 |
225 EXPORT_C TInt CMTPConnectionMgr::TransportCount() const |
234 EXPORT_C TInt CMTPConnectionMgr::TransportCount() const |
226 { |
235 { |
227 return iTransportCount; |
236 return iTransportCount; |
228 } |
237 } |
229 |
238 |
230 void CMTPConnectionMgr::ConnectionClosed(MMTPTransportConnection& aTransportConnection) |
239 TBool CMTPConnectionMgr::ConnectionClosed(MMTPTransportConnection& aTransportConnection) |
231 { |
240 { |
232 __FLOG(_L8("ConnectionClosed - Entry")); |
241 __FLOG(_L8("ConnectionClosed - Entry")); |
233 |
242 |
234 TInt idx(ConnectionFind(aTransportConnection.BoundProtocolLayer().ConnectionId())); |
243 TInt idx(ConnectionFind(aTransportConnection.BoundProtocolLayer().ConnectionId())); |
235 __FLOG_VA((_L8("idx is %d "), idx)); |
244 __FLOG_VA((_L8("idx is %d "), idx)); |
236 __ASSERT_DEBUG((idx != KErrNotFound), User::Invariant()); |
245 __ASSERT_DEBUG((idx != KErrNotFound), User::Invariant()); |
237 |
246 |
238 CMTPConnection* connection(iConnections[idx]); |
247 CMTPConnection* connection(iConnections[idx]); |
239 connection->ConnectionSuspended(); |
|
240 |
|
241 ResumeSuspendedTransport(); |
|
242 |
248 |
243 __FLOG(_L8("ConnectionClosed - Exit")); |
249 __FLOG(_L8("ConnectionClosed - Exit")); |
|
250 return connection->ConnectionSuspended(); |
244 } |
251 } |
245 |
252 |
246 void CMTPConnectionMgr::ConnectionOpenedL(MMTPTransportConnection& aTransportConnection) |
253 void CMTPConnectionMgr::ConnectionOpenedL(MMTPTransportConnection& aTransportConnection) |
247 { |
254 { |
248 __FLOG(_L8("ConnectionOpenedL - Entry")); |
255 __FLOG(_L8("ConnectionOpenedL - Entry")); |
265 connection->ConnectionResumedL(aTransportConnection); |
272 connection->ConnectionResumedL(aTransportConnection); |
266 |
273 |
267 __FLOG(_L8("ConnectionOpenedL - Exit")); |
274 __FLOG(_L8("ConnectionOpenedL - Exit")); |
268 } |
275 } |
269 |
276 |
270 TBool CMTPConnectionMgr::DeleteConnection(TUint aConnectionId) |
|
271 { |
|
272 __FLOG(_L8("DeleteConnection - Entry")); |
|
273 |
|
274 TBool ret = EFalse; |
|
275 TInt idx = ConnectionFind(aConnectionId); |
|
276 |
|
277 if (idx != KErrNotFound) |
|
278 { |
|
279 CMTPConnection* connection(iConnections[idx]); |
|
280 iConnections.Remove(idx); |
|
281 delete connection; |
|
282 ret = ETrue; |
|
283 } |
|
284 |
|
285 __FLOG(_L8("DeleteConnection - Entry")); |
|
286 |
|
287 return ret; |
|
288 } |
|
289 |
|
290 EXPORT_C TUid CMTPConnectionMgr::ClientSId() |
277 EXPORT_C TUid CMTPConnectionMgr::ClientSId() |
291 { |
278 { |
292 return iSecureId; |
279 return iSecureId; |
293 } |
280 } |
294 /** |
281 /** |
295 Constructor. |
282 Constructor. |
296 */ |
283 */ |
297 CMTPConnectionMgr::CMTPConnectionMgr() : |
284 CMTPConnectionMgr::CMTPConnectionMgr() : |
298 iConnectionOrder(ConnectionOrderCompare), |
285 iConnectionOrder(ConnectionOrderCompare), |
299 iShutdownConnectionIdx(KErrNotFound), |
286 iShutdownConnectionIdx(KErrNotFound), |
300 iTransportUid(KNullUid) |
287 iTransportUid(KNullUid), |
|
288 iIsTransportStopping(EFalse) |
301 { |
289 { |
302 __FLOG_OPEN(KMTPSubsystem, KComponent); |
290 __FLOG_OPEN(KMTPSubsystem, KComponent); |
303 } |
291 } |
304 |
292 |
305 /** |
293 /** |