PECengine/StorageManager2/ServerSrc/ServerEntryPoint.cpp
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 2002 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:  Dll entry points for server exe.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include <e32base.h>
       
    20 
       
    21 #include "CPEngStorageServer.h"
       
    22 #include "PEngStorageServerCommon.h"
       
    23 #include "TPEngServerParams.h"
       
    24 #include "PresenceDebugPrint.h"
       
    25 
       
    26 TInt DoMain( TPEngServerParams& aParams )
       
    27     {
       
    28     CTrapCleanup* tc = CTrapCleanup::New();
       
    29     if ( !tc )
       
    30         {
       
    31         return KErrNoMemory;
       
    32         }
       
    33     TRAPD( err, CPEngStorageServer::ExecuteServerL( aParams ) );
       
    34     delete tc;
       
    35 
       
    36 #if _BullseyeCoverage
       
    37     cov_write();
       
    38 #endif
       
    39 
       
    40     return err;
       
    41     }
       
    42 
       
    43 GLDEF_C TInt E32Main()
       
    44     {
       
    45     __UHEAP_MARK;
       
    46     PENG_DP( D_PENG_LIT( "PresenceStorageServer::E32Main() start" ) );
       
    47 
       
    48 
       
    49     TPEngServerParams params;
       
    50     params.InitFromCmdLine();
       
    51     TInt err = DoMain( params );
       
    52 
       
    53 
       
    54     PENG_DP( D_PENG_LIT( "PresenceStorageServer - E32Main() end" ) );
       
    55     __UHEAP_MARKEND;
       
    56     return err;
       
    57     }
       
    58