locationmgmt/networklocationmgr/src/lbsnetlocmanmain.cpp
changeset 0 9cfd9a3ee49c
equal deleted inserted replaced
-1:000000000000 0:9cfd9a3ee49c
       
     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 //
       
    15 	
       
    16 #include "e32base.h"
       
    17 #include "csecureasbase.h"
       
    18 #include "tprocessstartparams.h"
       
    19 #include "claunchedprocess.h"
       
    20 
       
    21 
       
    22 // E32Main for Network Location Manager
       
    23 TInt E32Main()
       
    24 	{
       
    25 	TInt r = KErrNone;
       
    26 	// do we need to process any startline params?
       
    27 	if(User::CommandLineLength()>0)
       
    28 		{
       
    29 		// yes, so assume these are TProcessStartParams that we understand
       
    30 		TProcessStartParams params;
       
    31 		TPtr ptr(reinterpret_cast<TText*>(&params), 0, sizeof(TProcessStartParams)/sizeof(TText16));
       
    32 		User::CommandLine(ptr);
       
    33 		r = CLaunchedProcess::CompleteProcessLaunch(params);
       
    34 		}
       
    35 	else
       
    36 		{
       
    37 		// no - so somebody and this should ONLY be the test team!! - has passed
       
    38 		// us a null command line, presumably by directly calling RProcess::Create()
       
    39 		// NB in this case you have no way of determining directly that the process
       
    40 		// creation has failed, or if the process is ready to start processing events!
       
    41 		r = CLaunchedProcess::CompleteProcessLaunch();
       
    42 		}
       
    43 	return r;
       
    44 	}