equal
deleted
inserted
replaced
|
1 // Copyright (c) 2008-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 <e32test.h> |
|
17 #include <e32std.h> |
|
18 #include "Baksrv.h" |
|
19 #include "backup_std.h" |
|
20 #include "BASCHED.H" |
|
21 |
|
22 void LaunchBackupServerL() |
|
23 { |
|
24 CBaServBackupScheduler* scheduler = new (ELeave) CBaServBackupScheduler; |
|
25 CleanupStack::PushL(scheduler); |
|
26 CActiveScheduler::Install(scheduler); |
|
27 |
|
28 CBaBackupServer* server = CBaBackupServer::NewL(); |
|
29 |
|
30 CleanupStack::PushL(server); |
|
31 server->ConstructL(); |
|
32 |
|
33 RProcess::Rendezvous(KErrNone); |
|
34 |
|
35 CActiveScheduler::Start(); |
|
36 |
|
37 CleanupStack::PopAndDestroy(server); |
|
38 CleanupStack::PopAndDestroy(scheduler); |
|
39 |
|
40 } |
|
41 |
|
42 GLDEF_C TInt E32Main () |
|
43 { |
|
44 CTrapCleanup* cleanup=CTrapCleanup::New(); |
|
45 TInt err = KErrNoMemory; |
|
46 |
|
47 if (cleanup) |
|
48 { |
|
49 TRAP(err, LaunchBackupServerL()); |
|
50 delete cleanup; |
|
51 } |
|
52 |
|
53 return err; |
|
54 } |
|
55 |