equal
deleted
inserted
replaced
237 // CFSMailBrand::IsMatching |
237 // CFSMailBrand::IsMatching |
238 // ----------------------------------------------------------------------------- |
238 // ----------------------------------------------------------------------------- |
239 TBool CFSMailBrand::IsMatching( const TDesC& aBrandId ) |
239 TBool CFSMailBrand::IsMatching( const TDesC& aBrandId ) |
240 { |
240 { |
241 NM_FUNCTION; |
241 NM_FUNCTION; |
242 |
242 const TChar KStar = '*'; |
|
243 TBool ret = EFalse; |
|
244 TInt intRet = 0; |
243 TInt count = iBrandMatchStrings.Count(); |
245 TInt count = iBrandMatchStrings.Count(); |
244 for(TInt i=0;i<count;i++) |
246 for( TInt i=0;i<count;i++ ) |
245 { |
247 { |
246 if ( aBrandId.MatchC( *iBrandMatchStrings[i] ) == KErrNone ) |
248 TPtrC brandMatchStringPtr = *iBrandMatchStrings[i]; |
247 { |
249 TInt matchPos = aBrandId.MatchC( *iBrandMatchStrings[i] ); |
248 return ETrue; |
250 if ( matchPos >= 0 ) |
249 } |
251 { |
250 } |
252 TPtrC rightPartPtr = aBrandId.Right( aBrandId.Length()-matchPos ); |
251 return EFalse; |
253 TChar isStar = brandMatchStringPtr[0]; |
|
254 TInt cut = 0; |
|
255 if ( isStar == KStar ) |
|
256 { |
|
257 cut = 1; |
|
258 } |
|
259 TPtrC matchString = brandMatchStringPtr.Right( brandMatchStringPtr.Length()-cut ); |
|
260 intRet = rightPartPtr.CompareC( matchString ); |
|
261 if ( intRet == 0 ) |
|
262 { |
|
263 ret = ETrue; |
|
264 } |
|
265 } |
|
266 } |
|
267 return ret; |
252 } |
268 } |
253 |
269 |
254 // ----------------------------------------------------------------------------- |
270 // ----------------------------------------------------------------------------- |
255 // CFSMailBrand::GetText |
271 // CFSMailBrand::GetText |
256 // ----------------------------------------------------------------------------- |
272 // ----------------------------------------------------------------------------- |