// --------------------------------------------------------------------------------- // CUpnpTmFilteredAppList::IconLookUp // Performs the icon look up // Checks if the requested icon and given icon matches // @param aIcon Reference to the Terminal Mode Icon object // @return Returns boolean value(true or false) // --------------------------------------------------------------------------------- // TBool CUpnpTmFilteredAppList::IconLookUp( CUpnpTerminalModeIcon& aIcon ) { OstTraceFunctionEntry0( CUPNPTMFILTEREDAPPLIST_ICONLOOKUP_ENTRY ); TBool matchFound(EFalse); const TDesC8& filterMimeType = iFilterInfo->MimeType(); const TDesC8& filterWidth = iFilterInfo->Width(); const TDesC8& filterHeight = iFilterInfo->Height(); const TDesC8& filterDepth = iFilterInfo->Depth(); // Check whether the icon is meant to be used only at launch time TBuf8<UpnpString::KShortStringLength> widthBuf; widthBuf.Num(aIcon.Width()); TBuf8<UpnpString::KShortStringLength> heightBuf; heightBuf.Num(aIcon.Height()); TBuf8<UpnpString::KShortStringLength> depthBuf; depthBuf.Num(aIcon.Depth()); /* Check if the icon in provided in the input filter string, and if so then does it match with the desired icon ( type and dimension ) */ if ( (( filterMimeType.Length() == 0 ) ||( (aIcon.MimeType()).MatchC(filterMimeType) != KErrNotFound)) && (( filterWidth.Length() == 0 ) ||( widthBuf.MatchC(filterWidth) != KErrNotFound)) && (( filterHeight.Length() == 0 ) ||( heightBuf.MatchC(filterHeight) != KErrNotFound)) && (( filterDepth.Length() == 0 ) ||( depthBuf.MatchC(filterDepth) != KErrNotFound))) { matchFound = ETrue; } OstTraceFunctionExit0( CUPNPTMFILTEREDAPPLIST_ICONLOOKUP_EXIT ); return matchFound; }