283 // --------------------------------------------------------------------------- |
283 // --------------------------------------------------------------------------- |
284 // |
284 // |
285 EXPORT_C void CWsfWlanInfoArray::MatchL( const TDesC8& aSsid, |
285 EXPORT_C void CWsfWlanInfoArray::MatchL( const TDesC8& aSsid, |
286 CMManager::TWlanSecMode aSecMode, |
286 CMManager::TWlanSecMode aSecMode, |
287 CMManager::TWlanNetMode aNetMode, |
287 CMManager::TWlanNetMode aNetMode, |
|
288 TBool aUsesPreSharedKey, |
288 const TInt aPriorThis, |
289 const TInt aPriorThis, |
289 RPointerArray<TWsfWlanInfo>& aMatchArray ) |
290 RPointerArray<TWsfWlanInfo>& aMatchArray ) |
290 { |
291 { |
291 aMatchArray.Reset(); |
292 aMatchArray.Reset(); |
292 |
293 |
296 count = count < aPriorThis ? count: aPriorThis; |
297 count = count < aPriorThis ? count: aPriorThis; |
297 |
298 |
298 for( TInt i = 0; i < count ; i++ ) |
299 for( TInt i = 0; i < count ; i++ ) |
299 { |
300 { |
300 temp = ( *iInfoArray )[i]; |
301 temp = ( *iInfoArray )[i]; |
301 if( !temp->iSsid.Compare( aSsid ) && temp->iSecurityMode == aSecMode && temp->iNetMode == aNetMode) |
302 if( !temp->iSsid.Compare( aSsid ) && temp->iSecurityMode == aSecMode |
|
303 && temp->iNetMode == aNetMode ) |
302 { |
304 { |
303 aMatchArray.AppendL(temp); |
305 aMatchArray.AppendL(temp); |
|
306 } |
|
307 else if ( temp->iIapId && !temp->iSsid.Compare( aSsid ) |
|
308 && temp->SecurityMode() == CMManager::EWlanSecMode802_1x |
|
309 && temp->iNetMode == aNetMode ) |
|
310 { |
|
311 if ( aSecMode == CMManager::EWlanSecModeOpen ) |
|
312 { |
|
313 aMatchArray.AppendL(temp); |
|
314 } |
|
315 else if ( aSecMode == CMManager::EWlanSecModeWep ) |
|
316 { |
|
317 aMatchArray.AppendL(temp); |
|
318 } |
|
319 else if ( aSecMode == CMManager::EWlanSecModeWpa |
|
320 && !aUsesPreSharedKey ) |
|
321 { |
|
322 aMatchArray.AppendL(temp); |
|
323 } |
|
324 else if ( aSecMode == CMManager::EWlanSecMode802_1x ) |
|
325 { |
|
326 aMatchArray.AppendL(temp); |
|
327 } |
304 } |
328 } |
305 } |
329 } |
306 } |
330 } |
307 // --------------------------------------------------------------------------- |
331 // --------------------------------------------------------------------------- |
308 // CWsfWlanInfoArray::SerializeContentLC |
332 // CWsfWlanInfoArray::SerializeContentLC |