本文整理汇总了C++中CActiveScheduler类的典型用法代码示例。如果您正苦于以下问题:C++ CActiveScheduler类的具体用法?C++ CActiveScheduler怎么用?C++ CActiveScheduler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CActiveScheduler类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MainL
/**
MainL()
Description : This is the main function which installs the
active scheduler and creates an object of the Email server
@internalTechnology
@param none
@return none
@pre None
@post None
*/
LOCAL_C void MainL()
{
CActiveScheduler* sched = new (ELeave) CActiveScheduler;
CleanupStack::PushL(sched);
CActiveScheduler::Install(sched);
__UHEAP_MARK;
/*
// this registers the server with the active scheduler and calls SetActive
CT_LbsAGPSHAIAssDataServer* server = CT_LbsAGPSHAIAssDataServer::NewL();
*/
CTestServerBase* s = new (ELeave) CTestServerBase();
CleanupStack::PushL(s);
s->ConstructL();
// signal to the client that we are ready by
// rendevousing process
RProcess::Rendezvous(KErrNone);
// run the active scheduler
sched->Start();
CleanupStack::PopAndDestroy(s);
/*
// clean up
delete server;
*/
__UHEAP_MARKEND;
CleanupStack::PopAndDestroy(sched);
}
示例2: E32Main
GLDEF_C TInt E32Main()
{
__UHEAP_MARK;
CActiveScheduler* scheduler = new (ELeave) CActiveScheduler;
CActiveScheduler::Install(scheduler);
CTrapCleanup* cleanup = CTrapCleanup::New();
if (!cleanup)
{
return KErrNoMemory;
}
CTLbsNetworkGateway* networkGateway = 0;
TRAPD(err, networkGateway = CTLbsNetworkGateway::NewL());
if(!err)
{
// Sync with the client and enter the active scheduler
RProcess::Rendezvous(KErrNone);
scheduler->Start();
}
if (KErrNone == err)
{
delete networkGateway;
}
delete cleanup;
delete scheduler;
__UHEAP_MARKEND;
return err;
}
示例3: MainL
LOCAL_C void MainL ()
{
// For platform security
#if ( defined __DATA_CAGING__ )
RProcess ().DataCaging ( RProcess::EDataCagingOn );
RProcess ().SecureApi ( RProcess::ESecureApiOn );
#endif
CActiveScheduler* sched = NULL;
sched = new ( ELeave ) CActiveScheduler;
CActiveScheduler::Install ( sched );
CChunkMgrTestSuite* server = NULL;
// Create the test-server
TRAPD ( err, server = CChunkMgrTestSuite::NewL () );
if ( !err )
{
// Sync with the client and enter the active scheduler
RProcess::Rendezvous ( KErrNone );
sched->Start ();
}
delete server;
delete sched;
}
示例4: MainL
// Secure variants much simpler
// For EKA2, just an E32Main and a MainL()
LOCAL_C void MainL()
/**
* Secure variant
* Much simpler, uses the new Rendezvous() call to sync with the client
*/
{
// Leave the hooks in for platform security
#if (defined __DATA_CAGING__)
RProcess().DataCaging(RProcess::EDataCagingOn);
RProcess().DataCaging(RProcess::ESecureApiOn);
#endif
CActiveScheduler* sched = NULL;
sched = new(ELeave) CActiveScheduler;
CActiveScheduler::Install(sched);
CTestImpExvCardSuite* server = NULL;
// Create the CTestServer derived server
TRAPD(err,server = CTestImpExvCardSuite::NewL());
if(!err)
{
RProcess::Rendezvous(KErrNone);
sched->Start();
}
delete server;
delete sched;
}
示例5: new
// -----------------------------------------------------------------------------
// TMSCallServer::StartThreadL
//
// -----------------------------------------------------------------------------
//
void TMSCallServer::StartThreadL(TMSCallServerStartParam& aStart)
{
TRACE_PRN_FN_ENT;
CActiveScheduler* sched = new (ELeave) CActiveScheduler;
CleanupStack::PushL(sched);
CActiveScheduler::Install(sched);
TMSCallServer* server = TMSCallServer::NewL(aStart.iTMSServer);
CleanupStack::PushL(server);
//Rename tmscall server name
RThread tmscallServerThread;
TThreadId threadId;
TName name;
name.Append(KTMSCallServerName);
threadId = tmscallServerThread.Id();
name.AppendNum(threadId.Id(), EHex);
//We are ignoring the error code returned from User::RenameThread
//as it is not important here, may be for profiling
User::RenameThread(name);
aStart.iTMSCallServerHandle = server->Server();
// Sync with the client and enter the active scheduler
RThread::Rendezvous(KErrNone);
sched->Start();
CleanupStack::PopAndDestroy(server); // server
CleanupStack::PopAndDestroy(sched); // sched
TRACE_PRN_FN_EXT;
}
示例6: MainL
LOCAL_C void MainL()
{
// For platform security
#if (defined __DATA_CAGING__)
RProcess().DataCaging(RProcess::EDataCagingOn);
RProcess().SecureApi(RProcess::ESecureApiOn);
#endif
CActiveScheduler* sched = NULL;
sched = new(ELeave) CActiveScheduler;
CActiveScheduler::Install(sched);
CTestCalInterimApiInstanceSuiteServer* server = NULL;
// Create the test-server
TRAPD(err, server = CTestCalInterimApiInstanceSuiteServer::NewL());
if(!err)
{
// Sync with the client and enter the active scheduler
RProcess::Rendezvous(KErrNone);
#ifdef __WINS__
// To start the alarm server
server->StartAlarmAlertServer();
#endif
sched->Start();
}
delete server;
delete sched;
}
示例7: MainL
static void MainL()
{
CActiveScheduler* sched = new(ELeave) CActiveScheduler;
CleanupStack::PushL (sched);
CActiveScheduler::Install (sched);
CCmdTestServer* server = CCmdTestServer::NewLC( );
RProcess::Rendezvous (KErrNone );
sched->Start( );
CleanupStack::PopAndDestroy (server );
CleanupStack::PopAndDestroy (sched );
}
示例8: doTestStepPostambleL
TVerdict CSisRegistryWritableSessionStep::doTestStepPostambleL()
{
// Remove the installed active scheduler
CActiveScheduler* s = CActiveScheduler::Current();
s->Install(NULL);
delete s;
iSisRegistry.Close();
__UHEAP_MARKEND;
return TestStepResult();
}
示例9: MainL
void MainL()
{
CActiveScheduler* sched = new(ELeave) CActiveScheduler;
CleanupStack::PushL(sched);
CActiveScheduler::Install(sched);
// Create the CTestServer derived server, sync with the client and enter the active scheduler
CAppfwkDSCStoreTestServer* server = CAppfwkDSCStoreTestServer::NewL();
RProcess::Rendezvous(KErrNone);
sched->Start();
delete server;
CleanupStack::PopAndDestroy(sched);
}
示例10: StopTimerAndPrintResultL
TVerdict CSisRegistryWritableSessionStep::doTestStepPostambleL()
{
StopTimerAndPrintResultL();
// Remove the installed active scheduler
CActiveScheduler* s = CActiveScheduler::Current();
s->Install(NULL);
delete s;
INFO_PRINTF1(_L("Disconnecting to SisRegistry.."));
iSisRegistry.Close();
__UHEAP_MARKEND;
return TestStepResult();
}
示例11: new
/////////////////////////////////////////////////////////////////////
// CSisRegistryStep
/////////////////////////////////////////////////////////////////////
TVerdict CSisRegistryWritableSessionStep::doTestStepPreambleL()
{
__UHEAP_MARK;
// Install an active scheduler
CActiveScheduler* s = new (ELeave) CActiveScheduler;
s->Install(s);
INFO_PRINTF1(_L("Connecting to SisRegistry.."));
User::LeaveIfError(iSisRegistry.Connect());
INFO_PRINTF1(_L("Connected!"));
return TestStepResult();
}
示例12: MainL
static void MainL()
{
CActiveScheduler* sched = new(ELeave) CActiveScheduler;
CleanupStack::PushL(sched);
CActiveScheduler::Install(sched);
// Create the CTestServer derived server
CStartupPropertiesTestServer* server = CStartupPropertiesTestServer::NewLC();
RProcess::Rendezvous(KErrNone);
sched->Start();
CleanupStack::PopAndDestroy(server);
CleanupStack::PopAndDestroy(sched);
}
示例13: DoStartL
// ---------------------------------------------------------------------------
// DoStartL
// ---------------------------------------------------------------------------
//
void DoStartL()
{
// Create active scheduler (to run active objects)
CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
CleanupStack::PushL(scheduler);
CActiveScheduler::Install(scheduler);
CSpsBackupHelperMonitor* monitor = CSpsBackupHelperMonitor::NewL();
scheduler->Start();
delete monitor;
// Delete active scheduler
CleanupStack::PopAndDestroy(scheduler);
}
示例14: MainL
static void MainL()
{
CActiveScheduler* sched = new(ELeave) CActiveScheduler;
CleanupStack::PushL(sched);
CActiveScheduler::Install (sched);
CCLayerTestServerWithSsm* server = NULL;
server = CCLayerTestServerWithSsm::NewL();
if(server)
{
RProcess::Rendezvous (KErrNone);
sched->Start();
}
delete server;
CleanupStack::PopAndDestroy();// sched;
}
示例15: new
void CSwiEngine::ThreadFunctionL(CSwiTask* aTask)
{
CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
CleanupStack::PushL(scheduler);
CActiveScheduler::Install(scheduler);
// this will add some active objects to AS...
aTask->WrapTaskL();
// make it do the work
scheduler->Start();
// cleanup the worker thread
CleanupStack::PopAndDestroy(scheduler);
}