本文整理汇总了C++中TPtr8::CompareF方法的典型用法代码示例。如果您正苦于以下问题:C++ TPtr8::CompareF方法的具体用法?C++ TPtr8::CompareF怎么用?C++ TPtr8::CompareF使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TPtr8
的用法示例。
在下文中一共展示了TPtr8::CompareF方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DoL
void TSendSearchResponse::DoL ( )
{
if ( !iContext.Node ( ).RootDevicePublished ( ) )
{
return;
}
TUpnpMessage::TUPnPSearchRequest& reqMsg = message_cast< TUpnpMessage::TUPnPSearchRequest > ( iContext.iMessage );
RMemCell* mBuf = reqMsg.iSsdpInfo.iSearchTarget.First ( );
TPtr8 stPtr ( mBuf->Ptr( ), mBuf->Length( ), mBuf->Length( ) );
CUPnPPublishInfoElement* publishInfo = iContext.Node ( ).PublishInfo ( );
if ( stPtr.CompareF ( publishInfo->SearchTarget ( ) ) == 0 )
{
// Search Response for upnp:rootdevice::uuid:device-UUID
SendSearchResponseL ( publishInfo->SearchTarget ( ), iContext.Node ( ).RootDeviceUsn ( ), publishInfo->CacheControl ( ) );
}
else if ( stPtr.CompareF ( publishInfo->Uuid ( ) ) == 0 )
{
// Search Response for uuid:device-UUID
SendSearchResponseL ( publishInfo->Uuid ( ), publishInfo->Uuid ( ), publishInfo->CacheControl ( ) );
}
else
{
// Search Response for uuid:device-UUID::urn:domain-name-device:deviceType:v
SendSearchResponseL ( stPtr, publishInfo->Usn ( ), publishInfo->CacheControl ( ) );
}
reqMsg.iSsdpInfo.iSearchTarget.Free ( );
}
示例2: DoParseIniFileL
void CIniFileParser::DoParseIniFileL(TDesC& aIniFile)
/*
*
* The force flush state is only updated if it is not already set to something other
* than ENoValue. If force flush option is not found in ini file, force flush is set
* to off.
*/
{
TInt fileLength;
TInt ret = KErrNone;
RFile iniFile;
// Open file
User::LeaveIfError(iniFile.Open(iFs, aIniFile, EFileShareAny));
CleanupClosePushL(iniFile);
// as we have been able to open the file, set the media to default.
// If the ini file is parsed correctly, this then gets overwritten.
// Otherwise the caller should pass thru a mesg to get the default enabled.
if (iLoggingMediaString.Length() == 0)
{
iLoggingMediaString = KDefaultMedia;
}
User::LeaveIfError(iniFile.Size(fileLength));
HBufC8* iniContents = HBufC8::NewLC(fileLength);
TPtr8 hbufPtr = iniContents->Des();
User::LeaveIfError(iniFile.Read(hbufPtr));
TLex8 lex(*iniContents);
//OK, file is open and ready for parsing. Make a tempory array and if there is a
//problem in the ini file leave settings as they were, leave, and
//the error will get picked up.
delete iIniSettings;
iIniSettings = NULL;
CIniLoggingPairs* iniSettings = CIniLoggingPairs::NewL();
CleanupStack::PushL(iniSettings);
TNameTag tempTag;
TNameTag tempTag2;
TChar tempChar;
FOREVER
{
ret = GetNextTokenAndCheck(lex,hbufPtr);
if (ret != KErrNone)
{
break;
}
if (hbufPtr.Find(KCommentKeyword)!=KErrNotFound) //found a Comment
{
tempChar = lex.Get();
while (!lex.Eos() && TUint(tempChar) != KCarriageReturn && TUint(tempChar) != KLineFeed)
{
tempChar = lex.Get();
}
}
else if (hbufPtr.CompareF(KMediaKeyword)==0) //MediaSetting
{
User::LeaveIfError(GetNextTokenAndCheck(lex,hbufPtr));
if (hbufPtr.Length()>KMaxMediaStringLength)
{
User::Leave(KErrGeneral);
}
iLoggingMediaString = hbufPtr;
}
else if (hbufPtr.CompareF(KLogKeyword)==0) //LOG
{
User::LeaveIfError(GetNextTokenAndCheck(lex,hbufPtr));
if (hbufPtr.Length()>KMaxTagLength)
{
tempTag = hbufPtr.Left(KMaxTagLength);
}
else
{
tempTag = hbufPtr;
}
User::LeaveIfError(GetNextTokenAndCheck(lex,hbufPtr));
if (hbufPtr.Length()>KMaxTagLength)
{
tempTag2 = hbufPtr.Left(KMaxTagLength);
}
else
{
tempTag2 = hbufPtr;
}
iniSettings->AddSettingL(tempTag, tempTag2);
}
else if (hbufPtr.CompareF(KForceFlushKeyword)==0) //ForceFlush
{
if (iForceFlushState == ENoValue)
{
iForceFlushState = EFlushOn;
}
//.........这里部分代码省略.........