equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 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: Entry point for ssmdiskreserver process. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <e32base.h> |
|
20 #include "ssmdiskreserver.h" |
|
21 #include "trace.h" |
|
22 |
|
23 _LIT( KThreadName, "ssmdiskreserver" ); |
|
24 |
|
25 // --------------------------------------------------------------------------- |
|
26 // Entry point for the executable. |
|
27 // --------------------------------------------------------------------------- |
|
28 // |
|
29 TInt E32Main() |
|
30 { |
|
31 FUNC_LOG; |
|
32 __UHEAP_MARK; |
|
33 |
|
34 User::RenameThread( KThreadName ); |
|
35 CTrapCleanup* cleanup = CTrapCleanup::New(); |
|
36 |
|
37 TInt err = KErrNoMemory; |
|
38 if ( cleanup ) |
|
39 { |
|
40 CSsmDiskReserver *reserver = NULL; |
|
41 TRAP( err, reserver = CSsmDiskReserver::NewL() ); |
|
42 ERROR( err, "Leave in CSsmDiskReserver::NewL" ); |
|
43 if( err == KErrNone ) |
|
44 { |
|
45 reserver->WaitStartupFinished(); |
|
46 delete reserver; |
|
47 } |
|
48 delete cleanup; |
|
49 } |
|
50 |
|
51 __UHEAP_MARKEND; |
|
52 return err; |
|
53 } |