equal
deleted
inserted
replaced
314 |
314 |
315 // ----------------------------------------------------------------------------- |
315 // ----------------------------------------------------------------------------- |
316 // CAccSrvServerModel::RemovePhysicalConnectionL |
316 // CAccSrvServerModel::RemovePhysicalConnectionL |
317 // ----------------------------------------------------------------------------- |
317 // ----------------------------------------------------------------------------- |
318 // |
318 // |
319 void CAccSrvServerModel::RemovePhysicalConnection( const TAccPolGenericID& aGenericID ) |
319 TInt CAccSrvServerModel::RemovePhysicalConnection( const TAccPolGenericID& aGenericID ) |
320 { |
320 { |
321 COM_TRACE_( "[AccFW:AccServer] CAccSrvServerModel::RemovePhysicalConnection()" ); |
321 COM_TRACE_( "[AccFW:AccServer] CAccSrvServerModel::RemovePhysicalConnection()" ); |
322 |
322 |
323 TInt index( FindGID( aGenericID, iPhysicalConnectionArray ) ); |
323 TInt index( FindGID( aGenericID, iPhysicalConnectionArray ) ); |
324 |
324 |
327 if ( KErrNotFound != index ) |
327 if ( KErrNotFound != index ) |
328 { |
328 { |
329 iPhysicalConnectionArray.Remove( index ); |
329 iPhysicalConnectionArray.Remove( index ); |
330 } |
330 } |
331 |
331 |
332 COM_TRACE_( "[AccFW:AccServer] CAccSrvServerModel::RemovePhysicalConnection - return void" ); |
332 COM_TRACE_1( "[AccFW:AccServer] CAccSrvServerModel::RemovePhysicalConnection - return %d", index ); |
|
333 |
|
334 return index; |
333 } |
335 } |
334 |
336 |
335 // ----------------------------------------------------------------------------- |
337 // ----------------------------------------------------------------------------- |
336 // CAccSrvServerModel::RemoveConnectionL |
338 // CAccSrvServerModel::RemoveConnectionL |
337 // |
339 // |
499 User::Leave( KErrGeneral ); |
501 User::Leave( KErrGeneral ); |
500 } |
502 } |
501 |
503 |
502 COM_TRACE_( "[AccFW:AccServer] CAccSrvServerModel::GetLastConnectedAccessoryL - return" ); |
504 COM_TRACE_( "[AccFW:AccServer] CAccSrvServerModel::GetLastConnectedAccessoryL - return" ); |
503 } |
505 } |
|
506 |
|
507 // ----------------------------------------------------------------------------- |
|
508 // CAccSrvServerModel::GetLastConnectedWiredAccessory |
|
509 // |
|
510 // Last connected wired accessory is to be searched in the iConnectionArray |
|
511 // ----------------------------------------------------------------------------- |
|
512 // |
|
513 TBool CAccSrvServerModel::GetLastConnectedWiredAccessory( TAccPolGenericID& aGenericID ) const |
|
514 { |
|
515 COM_TRACE_( "[AccFW:AccServer] CAccSrvServerModel::GetLastConnectedWiredAccessoryL()" ); |
|
516 |
|
517 TInt arrCount = 0; |
|
518 |
|
519 if ( (arrCount = iConnectionArray.Count()) != 0 ) |
|
520 { |
|
521 TUint arrIndex = 0; |
|
522 TAccPolGenericID iGenericID; |
|
523 |
|
524 while(arrIndex < arrCount) |
|
525 { |
|
526 iGenericID = iConnectionArray[arrIndex]; |
|
527 |
|
528 if( iGenericID.PhysicalConnectionCaps(KPCWired) ) |
|
529 { |
|
530 aGenericID = iGenericID; |
|
531 return ETrue; |
|
532 } |
|
533 arrIndex++; |
|
534 } |
|
535 } |
|
536 |
|
537 COM_TRACE_( "[AccFW:AccServer] CAccSrvServerModel::GetLastConnectedWiredAccessory - return" ); |
|
538 |
|
539 return EFalse; |
|
540 |
|
541 } |
|
542 |
504 |
543 |
505 // ----------------------------------------------------------------------------- |
544 // ----------------------------------------------------------------------------- |
506 // CAccSrvServerModel::SetAccessoryMode |
545 // CAccSrvServerModel::SetAccessoryMode |
507 // ----------------------------------------------------------------------------- |
546 // ----------------------------------------------------------------------------- |
508 // |
547 // |