当前位置: 首页>>代码示例>>C++>>正文


C++ CActiveScheduler类代码示例

本文整理汇总了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);
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:41,代码来源:ctlbsagpshaiassdataserver.cpp

示例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;
    }
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:35,代码来源:t_lbsnetworkgateway.cpp

示例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;
}
开发者ID:kuailexs,项目名称:symbiandump-mw4,代码行数:25,代码来源:testsuitechunkmgr.cpp

示例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;
	}
开发者ID:Esclapion,项目名称:qt-mobility,代码行数:28,代码来源:testimpexvcardsuiteserver.cpp

示例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;
    }
开发者ID:kuailexs,项目名称:symbiandump-mw2,代码行数:37,代码来源:tmscallsrvrstart.cpp

示例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;	
	}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:30,代码来源:TestCalInterimApiInstanceSuite.cpp

示例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 );
	}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:13,代码来源:tcustomcmd_server.cpp

示例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();
	}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:13,代码来源:writablesessionstep.cpp

示例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);
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:14,代码来源:tdscstore_server.cpp

示例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();
	}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:14,代码来源:writablesessionstep.cpp

示例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();
	}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:17,代码来源:writablesessionstep.cpp

示例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);
	}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:14,代码来源:tstartupproperties_server.cpp

示例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);
    }
开发者ID:kuailexs,项目名称:symbiandump-mw2,代码行数:19,代码来源:spsbackuphelpermain.cpp

示例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;
	}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:16,代码来源:tclayer_serverwithssm.cpp

示例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);
	}
开发者ID:fedor4ever,项目名称:packaging,代码行数:17,代码来源:SwiEngine.cpp


注:本文中的CActiveScheduler类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。