本文整理汇总了C++中TBuf8::MatchC方法的典型用法代码示例。如果您正苦于以下问题:C++ TBuf8::MatchC方法的具体用法?C++ TBuf8::MatchC怎么用?C++ TBuf8::MatchC使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TBuf8
的用法示例。
在下文中一共展示了TBuf8::MatchC方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: IconLookUp
// ---------------------------------------------------------------------------------
// 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;
}