equal
deleted
inserted
replaced
|
1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #include "CCntServer.h" |
|
17 |
|
18 LOCAL_C void MainL() |
|
19 { |
|
20 __UHEAP_MARK; |
|
21 CActiveScheduler* sched=NULL; |
|
22 sched=new(ELeave) CActiveScheduler; |
|
23 CActiveScheduler::Install(sched); |
|
24 CCntServer* server = NULL; |
|
25 TRAPD(err,server = CCntServer::NewL()); |
|
26 if(!err) |
|
27 { |
|
28 // Sync with the client and enter the active scheduler |
|
29 RProcess::Rendezvous(KErrNone); |
|
30 sched->Start(); |
|
31 } |
|
32 delete server; |
|
33 delete sched; |
|
34 __UHEAP_MARKEND; |
|
35 } |
|
36 |
|
37 GLDEF_C TInt E32Main() |
|
38 /** |
|
39 * @return - Standard Epoc error code on exit |
|
40 */ |
|
41 { |
|
42 CTrapCleanup* cleanup = CTrapCleanup::New(); |
|
43 if(cleanup == NULL) |
|
44 { |
|
45 return KErrNoMemory; |
|
46 } |
|
47 TRAP_IGNORE(MainL()); |
|
48 delete cleanup; |
|
49 return KErrNone; |
|
50 } |