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 } |