equal
deleted
inserted
replaced
221 // CFSMailBrand::IsMatching |
221 // CFSMailBrand::IsMatching |
222 // ----------------------------------------------------------------------------- |
222 // ----------------------------------------------------------------------------- |
223 TBool CFSMailBrand::IsMatching( const TDesC& aBrandId ) |
223 TBool CFSMailBrand::IsMatching( const TDesC& aBrandId ) |
224 { |
224 { |
225 FUNC_LOG; |
225 FUNC_LOG; |
226 |
226 const TChar KStar = '*'; |
|
227 TBool ret = EFalse; |
|
228 TInt intRet = 0; |
227 TInt count = iBrandMatchStrings.Count(); |
229 TInt count = iBrandMatchStrings.Count(); |
228 for(TInt i=0;i<count;i++) |
230 for( TInt i=0;i<count;i++ ) |
229 { |
231 { |
230 if ( aBrandId.MatchC( *iBrandMatchStrings[i] ) == KErrNone ) |
232 TPtrC brandMatchStringPtr = *iBrandMatchStrings[i]; |
231 { |
233 TInt matchPos = aBrandId.MatchC( *iBrandMatchStrings[i] ); |
232 return ETrue; |
234 if ( matchPos >= 0 ) |
233 } |
235 { |
234 } |
236 TPtrC rightPartPtr = aBrandId.Right( aBrandId.Length()-matchPos ); |
235 return EFalse; |
237 TChar isStar = brandMatchStringPtr[0]; |
|
238 TInt cut = 0; |
|
239 if ( isStar == KStar ) |
|
240 { |
|
241 cut = 1; |
|
242 } |
|
243 TPtrC matchString = brandMatchStringPtr.Right( brandMatchStringPtr.Length()-cut ); |
|
244 intRet = rightPartPtr.CompareC( matchString ); |
|
245 if ( intRet == 0 ) |
|
246 { |
|
247 ret = ETrue; |
|
248 } |
|
249 } |
|
250 } |
|
251 return ret; |
236 } |
252 } |
237 |
253 |
238 // ----------------------------------------------------------------------------- |
254 // ----------------------------------------------------------------------------- |
239 // CFSMailBrand::GetText |
255 // CFSMailBrand::GetText |
240 // ----------------------------------------------------------------------------- |
256 // ----------------------------------------------------------------------------- |