cmmanager/cmmgr/cmmserver/src/cmmanagerimpl.cpp
changeset 30 8dde790cab74
parent 20 9c97ad6591ae
child 40 c5b848e6c7d1
equal deleted inserted replaced
29:1f1fcd7e941c 30:8dde790cab74
   302         if ( !err )
   302         if ( !err )
   303             {
   303             {
   304             CleanupStack::PushL( plugin );
   304             CleanupStack::PushL( plugin );
   305 
   305 
   306             TBool inserted( EFalse );
   306             TBool inserted( EFalse );
   307             //TODO, Implement plugin sorting by priority later.
   307 
   308             /*
   308             TInt defaultPriority( CMManager::KDataMobilitySelectionPolicyPriorityWildCard );
   309             TInt defaultPriority( KDataMobilitySelectionPolicyPriorityWildCard );
   309 
   310 
   310             // No priority -> wildcard
   311             // No UI priority -> wildcard
   311             TRAP_IGNORE( defaultPriority = plugin->GetBearerInfoIntL(
   312             TRAP_IGNORE( defaultPriority = plugin->GetIntAttributeL( ECmDefaultUiPriority ) );
   312                     CMManager::ECmDefaultPriority ) );
   313 
   313 
   314             for ( TInt j( 0 ); j < iPlugins->Count(); ++j )
   314             for ( TInt j = 0; j < iPlugins->Count(); j++ )
   315                 {
   315                 {
   316                 if ( defaultPriority > (*iPlugins)[j]->GetIntAttributeL( ECmDefaultUiPriority ) )
   316                 TUint32 bearerToCompare = (*iPlugins)[j]->GetBearerInfoIntL(
       
   317                         CMManager::ECmDefaultPriority );
       
   318                 if ( defaultPriority > bearerToCompare )
   317                     {
   319                     {
   318                     continue;
   320                     continue;
   319                     }
   321                     }
   320                 else if ( defaultPriority == (*iPlugins)[j]->GetIntAttributeL( ECmDefaultUiPriority ) )
   322                 else if ( defaultPriority == bearerToCompare )
   321                     {
   323                     {
   322                     if ( plugin->GetIntAttributeL( ECmExtensionLevel ) >
   324                     if ( plugin->GetBearerInfoIntL( ECmExtensionLevel ) >
   323                         (*iPlugins)[j]->GetIntAttributeL( ECmExtensionLevel ) )
   325                             (*iPlugins)[j]->GetBearerInfoIntL( ECmExtensionLevel ) )
   324                         {
   326                         {
   325                         iPlugins->InsertL( j, plugin );
   327                         iPlugins->InsertL( j, plugin );
   326                         inserted = ETrue;
   328                         inserted = ETrue;
   327                         break;
   329                         break;
   328                         }
   330                         }
   331                     {
   333                     {
   332                     iPlugins->InsertL( j, plugin );
   334                     iPlugins->InsertL( j, plugin );
   333                     inserted = ETrue;
   335                     inserted = ETrue;
   334                     break;
   336                     break;
   335                     }
   337                     }
   336                 }*/
   338                 }
   337 
   339 
   338             if ( !inserted )
   340             if ( !inserted )
   339                 {
   341                 {
   340                 iPlugins->AppendL( plugin );
   342                 iPlugins->AppendL( plugin );
   341                 }
   343                 }