1 /* |
1 /* |
2 * Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
267 CompleteMessage( rc ); |
267 CompleteMessage( rc ); |
268 break; |
268 break; |
269 |
269 |
270 case EReqSetBoolAttribute: |
270 case EReqSetBoolAttribute: |
271 rc = SetBoolAttribute(); |
271 rc = SetBoolAttribute(); |
|
272 CompleteMessage( rc ); |
|
273 break; |
|
274 |
|
275 case EReqSetAsyncBoolAttribute: |
|
276 rc = SetAsyncBoolAttributeL(); |
272 CompleteMessage( rc ); |
277 CompleteMessage( rc ); |
273 break; |
278 break; |
274 |
279 |
275 case EReqSetStringAttribute: |
280 case EReqSetStringAttribute: |
276 rc = SetStringAttributeL(); |
281 rc = SetStringAttributeL(); |
1405 |
1410 |
1406 LOGEXITFN1("CConnMonSession::SetBoolAttribute()", err) |
1411 LOGEXITFN1("CConnMonSession::SetBoolAttribute()", err) |
1407 return err; |
1412 return err; |
1408 } |
1413 } |
1409 |
1414 |
|
1415 // ----------------------------------------------------------------------------- |
|
1416 // CConnMonSession::SetAsyncBoolAttributeL |
|
1417 // ----------------------------------------------------------------------------- |
|
1418 // |
|
1419 TInt CConnMonSession::SetAsyncBoolAttributeL() |
|
1420 { |
|
1421 LOGENTRFN("CConnMonSession::SetAsyncBoolAttributeL()") |
|
1422 TInt err( KErrNotSupported ); |
|
1423 TUint attribute( Message().Int2() ); |
|
1424 LOGIT3("SERVER: EReqSetAsyncBoolAttribute IN: id %d, attr %d, value %d", |
|
1425 Message().Int0(), attribute, Message().Int3()) |
|
1426 |
|
1427 if ( attribute == KConnectionStop ) |
|
1428 { |
|
1429 // Will check connection id validity first, then bool attribute value. |
|
1430 err = iCmServer->Iap()->AsyncConnectionStopL( Message() ); |
|
1431 } |
|
1432 else if ( attribute == KConnectionStopAll ) |
|
1433 { |
|
1434 // Connection id is ignored. Will check bool attribute value. |
|
1435 err = iCmServer->Iap()->AsyncConnectionStopAllL( Message() ); |
|
1436 } |
|
1437 else |
|
1438 { |
|
1439 // No plugin support |
|
1440 err = KErrNotSupported; |
|
1441 } |
|
1442 |
|
1443 LOGEXITFN1("CConnMonSession::SetAsyncBoolAttributeL()", err) |
|
1444 return err; |
|
1445 } |
1410 |
1446 |
1411 // ----------------------------------------------------------------------------- |
1447 // ----------------------------------------------------------------------------- |
1412 // CConnMonSession::SetStringAttribute |
1448 // CConnMonSession::SetStringAttribute |
1413 // ----------------------------------------------------------------------------- |
1449 // ----------------------------------------------------------------------------- |
1414 // |
1450 // |
1515 // Complete all pending activity requests with status 'KErrCancel' |
1551 // Complete all pending activity requests with status 'KErrCancel' |
1516 for ( TInt i = 0; i < iConnParams.Count(); i++ ) |
1552 for ( TInt i = 0; i < iConnParams.Count(); i++ ) |
1517 { |
1553 { |
1518 CompleteActivityRequests( iConnParams[i].iConnectionId, EFalse, KErrCancel ); |
1554 CompleteActivityRequests( iConnParams[i].iConnectionId, EFalse, KErrCancel ); |
1519 } |
1555 } |
|
1556 } |
|
1557 else if ( EConnMonSetBoolAttribute == requestToCancel ) |
|
1558 { |
|
1559 // Complete all pending asynchronous connection stop requests with status 'KErrCancel' |
|
1560 iCmServer->Iap()->CancelAsyncStopReqs( Message().Session() ); |
1520 } |
1561 } |
1521 |
1562 |
1522 // Complete all pending plugin requests (of type Message().Int0()) with 'KErrCancel' |
1563 // Complete all pending plugin requests (of type Message().Int0()) with 'KErrCancel' |
1523 RThread clientThread; |
1564 RThread clientThread; |
1524 |
1565 |