equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "T_BTSockAddrAPIServer.h" |
|
19 |
|
20 CT_BTSockAddrAPIServer* CT_BTSockAddrAPIServer::NewL() |
|
21 { |
|
22 CT_BTSockAddrAPIServer* server = new (ELeave) CT_BTSockAddrAPIServer(); |
|
23 CleanupStack::PushL(server); |
|
24 server->ConstructL(); |
|
25 CleanupStack::Pop(server); |
|
26 return server; |
|
27 } |
|
28 |
|
29 LOCAL_C void MainL() |
|
30 { |
|
31 #if (defined __DATA_CAGING__) |
|
32 RProcess().DataCaging(RProcess::EDataCagingOn); |
|
33 RProcess().SecureApi(RProcess::ESecureApiOn); |
|
34 #endif |
|
35 CActiveScheduler* sched=NULL; |
|
36 sched=new(ELeave) CActiveScheduler; |
|
37 CActiveScheduler::Install(sched); |
|
38 CT_BTSockAddrAPIServer* server = NULL; |
|
39 TRAPD(err, server = CT_BTSockAddrAPIServer::NewL()); |
|
40 if(!err) |
|
41 { |
|
42 RProcess::Rendezvous(KErrNone); |
|
43 sched->Start(); |
|
44 } |
|
45 delete server; |
|
46 delete sched; |
|
47 } |
|
48 |
|
49 GLDEF_C TInt E32Main() |
|
50 { |
|
51 CTrapCleanup* cleanup = CTrapCleanup::New(); |
|
52 if(cleanup == NULL) |
|
53 { |
|
54 return KErrNoMemory; |
|
55 } |
|
56 TRAP_IGNORE(MainL()); |
|
57 delete cleanup; |
|
58 return KErrNone; |
|
59 } |