本文整理汇总了C++中TBuf8::FindC方法的典型用法代码示例。如果您正苦于以下问题:C++ TBuf8::FindC方法的具体用法?C++ TBuf8::FindC怎么用?C++ TBuf8::FindC使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TBuf8
的用法示例。
在下文中一共展示了TBuf8::FindC方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void CRawIP2Flow::StartFlowL()
/**
* Starts the Flow up. This process involves connecting to the BCA.
*
* Called in response to corresponding SCPR message.
*
* @return Allways KErrNone
*/
{
ASSERT(iStarting==EFalse);
iStarting = ETrue;
OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CRAWIP2FLOW_STARTFLOWL_1, "CRawIP2Flow %08x:\tStartFlowL()", this);
// If there were any errors during earlier processing of the ProvisionConfig message
// then send an Error message in response to the StartFlow (because ProvisionConfig
// does not have a response code).
if (iProvisionError != KErrNone)
{
User::Leave(iProvisionError);
}
// Retrieve Agent provisioned information only available at StartFlow time
DynamicProvisionConfigL();
InitialiseL();
// associate the binder object with the lowersender
iBinder->SetSender(&(iBcaController->Bca()->GetSender()));
//the name calculation should be done only if logging is enabled
#if (OST_TRACE_CATEGORY & OST_TRACE_CATEGORY_DEBUG)
const TUint KModemNameLen = KCommsDbSvrMaxColumnNameLength + 10; // need enough for ppp-XXX.txt - e.g. ppp-comm-1.txt, ppp-btcomm-10.txt etc
TBuf8<KModemNameLen> modemName;
_LIT8(KDoubleColon, "::");
modemName.Copy(iBCAProvisionConfig->GetPortName());
const TInt pos = modemName.FindC((const TDesC8&)KDoubleColon);
if(pos != KErrNotFound)
{
modemName.Delete(pos, 2);
}
//append time stamp
const TUint KTimeStampLen = 8;
TBuf8<KTimeStampLen> logFileName;
_LIT8(KTimeFormat, "%08X");
TUint32 counter = User::FastCounter();
logFileName.Format(KTimeFormat, counter);
const TUint KLogTextLen = KModemNameLen+KTimeStampLen+30;
TBuf8<KLogTextLen> logText;
_LIT8(KLogTimeText, "TcpDump log file time stamp:");
_LIT8(KLogModemText, " for modem:");
logText.Append(KLogTimeText);
logText.Append(logFileName);
logText.Append(KLogModemText);
logText.Append(modemName);
OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CRAWIP2FLOW_STARTFLOWL_3, logText);
#endif
}