|
1 // Copyright (c) 2006-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 // Global entry point for the LBS Network Gateway executable |
|
15 // |
|
16 // |
|
17 |
|
18 #include <e32base.h> |
|
19 #include "claunchedprocess.h" |
|
20 #include "csecureprocessasbase.h" |
|
21 #include "lbsdevloggermacros.h" |
|
22 |
|
23 GLDEF_C TInt E32Main() |
|
24 { |
|
25 LBSLOG_BEGIN(); |
|
26 LBSLOG(ELogP3, "Network gateway start"); |
|
27 |
|
28 TInt r = KErrNone; |
|
29 // do we need to process any startline params? |
|
30 if(User::CommandLineLength()>0) |
|
31 { |
|
32 // yes, so assume these are TProcessStartParams that we understand |
|
33 TProcessStartParams params; |
|
34 TPtr ptr(reinterpret_cast<TText*>(¶ms), 0, sizeof(TProcessStartParams)/sizeof(TText16)); |
|
35 User::CommandLine(ptr); |
|
36 r = CLaunchedProcess::CompleteProcessLaunch(params); |
|
37 } |
|
38 else |
|
39 { |
|
40 // no - so somebody and this should ONLY be the test team!! - has passed |
|
41 // us a null command line, presumably by directly calling RProcess::Create() |
|
42 // NB in this case you have no way of determining directly that the process |
|
43 // creation has failed, or if the process is ready to start processing events! |
|
44 r = CLaunchedProcess::CompleteProcessLaunch(); |
|
45 } |
|
46 LBSLOG(ELogP3, "Network gateway stop"); |
|
47 return r; |
|
48 } |
|
49 |