installationservices/swcomponentregistry/source/server/startup.cpp
branchRCL_3
changeset 26 8b7f4e561641
parent 25 7333d7932ef7
child 27 e8965914fac7
equal deleted inserted replaced
25:7333d7932ef7 26:8b7f4e561641
     1 /*
       
     2 * Copyright (c) 2008-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 the License "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: 
       
    15 * Executable entrypoint and server object factory function. The latter
       
    16 * is supplied to the SCS boilerplate code which starts up the server.
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 /**
       
    22  @file
       
    23  @internalComponent
       
    24  @released
       
    25 */
       
    26 
       
    27 #include "scrserver.h"
       
    28 
       
    29 using namespace Usif;
       
    30 
       
    31 static CScsServer* NewScrServerLC()
       
    32 /**
       
    33 	This factory function is called by SCS framework.  It allocates
       
    34 	the Scr Server object and leaves it on the cleanup stack.
       
    35 
       
    36 	@return		New initialized instance of CScrServer.
       
    37 				On return this is on the cleanup stack.
       
    38  */
       
    39 	{
       
    40 	return Usif::CScrServer::NewLC();
       
    41 	}
       
    42 
       
    43 
       
    44 GLDEF_C TInt E32Main()
       
    45 /**
       
    46 	Executable entrypoint. Calls the SCS boilerplate code which starts the SCR server
       
    47 	and does not return until the server shuts down.
       
    48 
       
    49 	@return	Symbian OS error code where KErrNone indicates success 
       
    50 			and any other value indicates failure.
       
    51  */
       
    52 	{
       
    53 	return StartScsServer(NewScrServerLC);
       
    54 	}