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


C++ CActiveScheduler::Start方法代码示例

本文整理汇总了C++中CActiveScheduler::Start方法的典型用法代码示例。如果您正苦于以下问题:C++ CActiveScheduler::Start方法的具体用法?C++ CActiveScheduler::Start怎么用?C++ CActiveScheduler::Start使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CActiveScheduler的用法示例。


在下文中一共展示了CActiveScheduler::Start方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: StartThreadL

// -----------------------------------------------------------------------------
// 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

示例2: new

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

/**
  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

示例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: 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

示例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: 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

示例9: 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

示例10: 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

示例11: 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

示例12: ThreadFunctionL

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

示例13: MainL

/**
MainL - uses the new Rendezvous() call to sync with the client
*/
LOCAL_C void MainL()
	{
	// Active scheduler only for this thread. Test need to create own active scheduler	
	CActiveScheduler* scheduler = new(ELeave) CActiveScheduler;
	CActiveScheduler::Install(scheduler);

	CTe_graphicsperformanceSuite* server = NULL;

	// Create the CTestServer derived server
	TRAPD(err,server = CTe_graphicsperformanceSuite::NewL());
	if(!err)
		{
		// Sync with the client and enter the active scheduler
		RProcess::Rendezvous(KErrNone);
		scheduler->Start();
		}
	delete server;
	delete scheduler;
	}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:22,代码来源:te_graphicsperformanceSuiteServer.cpp

示例14: MainL

/*
   Function to create and start the CTestServer derived server.
   Secure variant.Much simpler, uses the new Rendezvous() call to sync with the client
   @param  None
   @return None
*/
LOCAL_C void MainL()
	{
	// Leave the hooks in for platform security
	RProcess().DataCaging(RProcess::EDataCagingOn);
	RProcess().DataCaging(RProcess::ESecureApiOn);
	CActiveScheduler* sched = new(ELeave) CActiveScheduler;
	CActiveScheduler::Install(sched);
	CTestPnP*	server = NULL;
	// Create the CTestServer derived server
	TRAPD(err,server = CTestPnP::NewL());
	if(err == KErrNone)
		{
		// Sync with the client and enter the active scheduler
		RProcess::Rendezvous(KErrNone);
		sched->Start();
		}
	delete server;
	delete sched;
	}
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:25,代码来源:testpnp.cpp

示例15: DriveEngineL

void DriveEngineL()
	{

	//initialization for COMM port 
	CommInitL();
	
	// Setup Active Scheduler
	CActiveScheduler* myActiveScheduler = new(ELeave) CActiveScheduler;
	CleanupStack::PushL(myActiveScheduler);
	CActiveScheduler::Install(myActiveScheduler);

	// Create Tiny Telnet
	CTinyTelnet* aTinyTelnet = CTinyTelnet::NewLC(console);
	//.. and post request to object
	aTinyTelnet->RequestCharacter();

	myActiveScheduler->Start();

	CleanupStack::PopAndDestroy(2); //aTinyTelnet, myActiveScheduler	
	}
开发者ID:kuailexs,项目名称:symbiandump-mw2,代码行数:20,代码来源:TTELNET.CPP


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