harvester/harvesterserver/src/charvesterserver.cpp
changeset 13 fcb2a58c181b
parent 8 6547bf8ca13a
child 23 d4d56f5e7c55
equal deleted inserted replaced
11:7c6f43cd91cf 13:fcb2a58c181b
    42 // Two-phased constructor.
    42 // Two-phased constructor.
    43 // -----------------------------------------------------------------------------
    43 // -----------------------------------------------------------------------------
    44 //
    44 //
    45 CHarvesterServer* CHarvesterServer::NewLC()
    45 CHarvesterServer* CHarvesterServer::NewLC()
    46 	{
    46 	{
    47 	CHarvesterServer* HarvesterServer = new ( ELeave ) CHarvesterServer( EPriorityNormal );
    47 	CHarvesterServer* HarvesterServer = new ( ELeave ) CHarvesterServer( CActive::EPriorityStandard );
    48 	CleanupStack::PushL(HarvesterServer);
    48 	CleanupStack::PushL(HarvesterServer);
    49 	HarvesterServer->ConstructL();
    49 	HarvesterServer->ConstructL();
    50 	return HarvesterServer;
    50 	return HarvesterServer;
    51 	}
    51 	}
    52 
    52 
    55 // Symbian 2nd phase constructor can leave.
    55 // Symbian 2nd phase constructor can leave.
    56 // -----------------------------------------------------------------------------
    56 // -----------------------------------------------------------------------------
    57 //
    57 //
    58 void CHarvesterServer::ConstructL()
    58 void CHarvesterServer::ConstructL()
    59 	{
    59 	{
       
    60     RProcess process;
       
    61     process.SetPriority( EPriorityBackground );
       
    62     process.Close();
    60 	iIndexingManager = CIndexingManager::NewL();
    63 	iIndexingManager = CIndexingManager::NewL();
    61 	StartL(KHarvesterServerName);
    64 	StartL(KHarvesterServerName);
    62 	}
    65 	}
    63 
    66 
    64 // -----------------------------------------------------------------------------
    67 // -----------------------------------------------------------------------------
   141 		
   144 		
   142 	// Construct server
   145 	// Construct server
   143 	CHarvesterServer* server = CHarvesterServer::NewLC();
   146 	CHarvesterServer* server = CHarvesterServer::NewLC();
   144 	
   147 	
   145 	// Set thread priority
   148 	// Set thread priority
   146 	RProcess().SetPriority(EPriorityBackground);
   149 	//RProcess().SetPriority(EPriorityBackground);
   147 	
   150 	
   148     // Rename the thread.
   151     // Rename the thread.
   149     User::RenameThread(KHarvesterServerName);        
   152     User::RenameThread(KHarvesterServerName);        
   150     RProcess::Rendezvous(KErrNone);           
   153     RProcess::Rendezvous(KErrNone);           
   151 
   154