equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
21 */ |
21 */ |
22 |
22 |
23 #include <e32base.h> |
23 #include <e32base.h> |
24 #include "fdfserver.h" |
24 #include "fdfserver.h" |
25 #include <usb/usblogger.h> |
25 #include <usb/usblogger.h> |
26 #include "OstTraceDefinitions.h" |
|
27 #ifdef OST_TRACE_COMPILER_IN_USE |
|
28 #include "mainTraces.h" |
|
29 #endif |
|
30 |
|
31 |
26 |
32 static void RunFdfL(); |
27 static void RunFdfL(); |
33 |
28 |
|
29 #ifdef __FLOG_ACTIVE |
|
30 _LIT8(KLogComponent, "fdf "); |
|
31 #endif |
34 |
32 |
35 GLDEF_C TInt E32Main() |
33 GLDEF_C TInt E32Main() |
36 { |
34 { |
37 OstTrace0( TRACE_NORMAL, FDF_SERVER_SRC_E32MAIN, ">>E32Main" ); |
35 LOGTEXT(_L8(">>E32Main")); |
38 |
36 |
39 TInt ret = KErrNoMemory; |
37 TInt ret = KErrNoMemory; |
40 |
38 |
41 __UHEAP_MARK; |
39 __UHEAP_MARK; |
42 |
40 |
43 CTrapCleanup* cleanup = CTrapCleanup::New(); |
41 CTrapCleanup* cleanup = CTrapCleanup::New(); |
44 |
42 |
45 if ( cleanup ) |
43 if ( cleanup ) |
46 { |
44 { |
47 // Create the logger object |
45 // Create the logger object |
|
46 #ifdef __FLOG_ACTIVE |
|
47 (void)CUsbLog::Connect(); |
|
48 #endif |
48 |
49 |
49 TRAP(ret, RunFdfL()); |
50 TRAP(ret, RunFdfL()); |
50 |
51 |
|
52 #ifdef __FLOG_ACTIVE |
|
53 CUsbLog::Close(); |
|
54 #endif |
51 |
55 |
52 delete cleanup; |
56 delete cleanup; |
53 } |
57 } |
54 |
58 |
55 __UHEAP_MARKEND; |
59 __UHEAP_MARKEND; |
56 |
60 |
57 OstTrace1( TRACE_NORMAL, FDF_SERVER_SRC_E32MAIN_DUP1, |
61 LOGTEXT2(_L8("<<E32Main ret = %d"), ret); |
58 "<<E32Main ret = %d", ret ); |
|
59 return ret; |
62 return ret; |
60 } |
63 } |
61 |
64 |
62 static void RunFdfL() |
65 static void RunFdfL() |
63 { |
66 { |