本文整理汇总了C++中TBuf8::Copy方法的典型用法代码示例。如果您正苦于以下问题:C++ TBuf8::Copy方法的具体用法?C++ TBuf8::Copy怎么用?C++ TBuf8::Copy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TBuf8
的用法示例。
在下文中一共展示了TBuf8::Copy方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ShowDisclaimerL
/*
-----------------------------------------------------------------------
-----------------------------------------------------------------------
*/
TBool CMovingBallAppUi::ShowDisclaimerL(void)
{
TBool OkToContinue(EFalse);
TFindFile AppFile(CCoeEnv::Static()->FsSession());
if(KErrNone != AppFile.FindByDir(KtxDisclaimerFileName, KNullDesC))
{
HBufC* Abbout = KtxDisclaimer().AllocLC();
TPtr Pointter(Abbout->Des());
CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL(Pointter);
dlg->PrepareLC(R_DDD_HEADING_PANE);
dlg->SetHeaderTextL(KtxDisclaimerTitle);
if(dlg->RunLD())
{
TFileName ShortFil;
#ifdef __SERIES60_3X__
if(KErrNone ==CCoeEnv::Static()->FsSession().PrivatePath(ShortFil))
{
TFindFile privFile(CCoeEnv::Static()->FsSession());
if(KErrNone == privFile.FindByDir(ShortFil, KNullDesC))
{
TParsePtrC hjelp(privFile.File());
ShortFil.Copy(hjelp.Drive());
ShortFil.Append(KtxDisclaimerFileName);
}
}
#else
TFindFile privFile(CCoeEnv::Static()->FsSession());
if(KErrNone == privFile.FindByDir(KtxApplicationFileName, KNullDesC))
{
TParsePtrC hjelp(privFile.File());
ShortFil.Copy(hjelp.Drive());
ShortFil.Append(KtxDisclaimerFileName);
}
#endif
BaflUtils::EnsurePathExistsL(CCoeEnv::Static()->FsSession(),ShortFil);
RFile MyFile;
if(KErrNone == MyFile.Create(CCoeEnv::Static()->FsSession(),ShortFil,EFileWrite))
{
TTime NowTime;
NowTime.HomeTime();
TBuf8<255> InfoLine;
InfoLine.Copy(_L8("Accepted on Date\t"));
InfoLine.AppendNum(NowTime.DateTime().Day() + 1);
InfoLine.Append(_L8("."));
InfoLine.AppendNum((NowTime.DateTime().Month() + 1));
InfoLine.Append(_L8("."));
InfoLine.AppendNum(NowTime.DateTime().Year());
InfoLine.Append(_L8(" "));
InfoLine.Append(_L8("--"));
InfoLine.AppendNum(NowTime.DateTime().Hour());
InfoLine.Append(_L8(":"));
TInt HelperInt = NowTime.DateTime().Minute();
if(HelperInt < 10)
InfoLine.AppendNum(0);
InfoLine.AppendNum(HelperInt);
InfoLine.Append(_L8(":"));
HelperInt = NowTime.DateTime().Second();
if(HelperInt < 10)
InfoLine.AppendNum(0);
InfoLine.AppendNum(HelperInt);
InfoLine.Append(_L8(" "));
MyFile.Write(InfoLine);
MyFile.Close();
}
OkToContinue = ETrue;
}
CleanupStack::PopAndDestroy(Abbout);
}
else
{
OkToContinue = ETrue;
}
return OkToContinue;
}