本文整理汇总了C++中TApaTask::KillTask方法的典型用法代码示例。如果您正苦于以下问题:C++ TApaTask::KillTask方法的具体用法?C++ TApaTask::KillTask怎么用?C++ TApaTask::KillTask使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TApaTask
的用法示例。
在下文中一共展示了TApaTask::KillTask方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: KillApplicationL
EXPORT_C void KillApplicationL(RWsSession& aWs, TUid aUid, TInt aRetryInterval )
{
TTime wait_until; wait_until.HomeTime();
wait_until+=TTimeIntervalSeconds(15);
TApaTaskList taskList( aWs );
for(;;) {
TApaTask task = taskList.FindApp(aUid);
if(! task.Exists()) {
break;
}
TTime now; now.HomeTime();
if (now < wait_until) {
task.EndTask();
//DebugMsg(_L("waiting..."), aDebugLog);
User::After(TTimeIntervalMicroSeconds32(aRetryInterval*1000) );
} else {
break;
}
}
TApaTask task = taskList.FindApp(aUid);
if( task.Exists()) {
#ifdef __S60V3__
task.KillTask();
#else
RThread t;
if (t.Open(task.ThreadId())==KErrNone) {
//DebugMsg(_L("killing"), aDebugLog);
t.Kill(2003);
t.Close();
}
#endif
}
}
示例2: killMP
void MpFetcherTestAppView::killMP()
{
TApaTaskList taskList(CEikonEnv::Static()->WsSession());
TApaTask task = taskList.FindApp(TUid::Uid(270564450));
if (task.Exists()) {
task.KillTask();
} else {
qCritical("Cannot bring to forward task %08x", 270564450);
}
}
示例3: TestStartAndForgetL
void CApStartTestStep::TestStartAndForgetL(RWsSession& aWsSession)
{
INFO_PRINTF1(_L("Entering test case: APPFWK-APSTART-0001"));
TApaTask task = TestStartL(NULL, aWsSession);
if(task.Exists())
{
task.KillTask();
INFO_PRINTF1(_L("Leaving test case: APPFWK-APSTART-0001\n"));
}
else
{
ERR_PRINTF1(_L("APPFWK-APSTART-0001 failed\n"));
}
}
示例4: TestStartAndFollowUpL
void CApStartTestStep::TestStartAndFollowUpL(RWsSession& aWsSession)
{
INFO_PRINTF1(_L("Entering test case: APPFWK-APSTART-0002"));
TRequestStatus status;
TApaTask task = TestStartL(&status, aWsSession);
TESTE(KErrNone == status.Int(), status.Int());
if(task.Exists())
{
task.KillTask();
INFO_PRINTF1(_L("Leaving test case: APPFWK-APSTART-0002\n"));
}
else
{
ERR_PRINTF1(_L("APPFWK-APSTART-0002 failed\n"));
}
}
示例5: KillTasks
/*
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
*/
TInt CExPolicy_Server::KillTasks(TUid& aUid)
{
TInt RetErr(KErrNone);
RWsSession wsSession;
RetErr= wsSession.Connect();
if(RetErr == KErrNone)
{
TApaTaskList taskList( wsSession );
TApaTask task = taskList.FindApp(aUid);
if( task.Exists() )
{
task.KillTask();
}
}
wsSession.Close();
return RetErr;
}