equal
deleted
inserted
replaced
127 // Second stage startup for the server thread. |
127 // Second stage startup for the server thread. |
128 // ----------------------------------------------------------------------------- |
128 // ----------------------------------------------------------------------------- |
129 // |
129 // |
130 void CHarvesterServer::ThreadFunctionL() |
130 void CHarvesterServer::ThreadFunctionL() |
131 { |
131 { |
|
132 //QCoreApplication installs one ActiveScheduler. So removing the Active scheduler install |
|
133 //from ThreadFunctionL |
|
134 |
132 // Construct active scheduler |
135 // Construct active scheduler |
133 CActiveScheduler* activeScheduler = new ( ELeave ) CActiveScheduler; |
136 //CActiveScheduler* activeScheduler = new ( ELeave ) CActiveScheduler; |
134 CleanupStack::PushL(activeScheduler); |
137 //CleanupStack::PushL(activeScheduler); |
135 |
138 |
136 // Install active scheduler |
139 // Install active scheduler |
137 CActiveScheduler::Install(activeScheduler); |
140 //CActiveScheduler::Install(activeScheduler); |
138 |
141 |
139 // Construct server |
142 // Construct server |
140 CHarvesterServer* server = CHarvesterServer::NewLC(); |
143 CHarvesterServer* server = CHarvesterServer::NewLC(); |
141 |
144 |
142 // Set thread priority |
145 // Set thread priority |
171 // Start handling requests |
174 // Start handling requests |
172 CActiveScheduler::Start(); |
175 CActiveScheduler::Start(); |
173 |
176 |
174 // Cleanup |
177 // Cleanup |
175 CleanupStack::PopAndDestroy( server ); |
178 CleanupStack::PopAndDestroy( server ); |
176 CleanupStack::PopAndDestroy( activeScheduler ); |
179 //CleanupStack::PopAndDestroy( activeScheduler ); |
177 } |
180 } |
178 |
181 |
179 // ----------------------------------------------------------------------------- |
182 // ----------------------------------------------------------------------------- |
180 // CHarvesterServer::ThreadFunction() |
183 // CHarvesterServer::ThreadFunction() |
181 // Main function for the server thread. |
184 // Main function for the server thread. |
205 // E32Main() |
208 // E32Main() |
206 // Provides the API for the operating system to start the executable. |
209 // Provides the API for the operating system to start the executable. |
207 // Returns the address of the function to be called. |
210 // Returns the address of the function to be called. |
208 // ----------------------------------------------------------------------------- |
211 // ----------------------------------------------------------------------------- |
209 // |
212 // |
210 TInt E32Main() |
213 //TInt E32Main() |
211 { |
214 // { |
212 CHarvesterServer::ThreadFunction(); |
215 // CHarvesterServer::ThreadFunction(); |
213 return KErrNone; |
216 // return KErrNone; |
214 } |
217 // } |
215 |
218 |
216 // End of File |
219 // End of File |