browserutilities/feedsengine/FeedsServer/Server/src/FeedsServerMain.cpp
changeset 0 dd21522fd290
child 25 0ed94ceaa377
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     1 /*
       
     2 * Copyright (c) 2005 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:  The FeedsServer main server class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include <e32std.h>
       
    20 
       
    21 #include "FeedsServer.h"
       
    22 #include "LeakTracker.h"
       
    23 
       
    24 // -----------------------------------------------------------------------------
       
    25 // E32Main
       
    26 //
       
    27 // Main entry point.
       
    28 // -----------------------------------------------------------------------------
       
    29 //
       
    30 GLDEF_C TInt E32Main()
       
    31     {
       
    32 	
       
    33 	CTrapCleanup*  cleanup = CTrapCleanup::New();
       
    34 	TInt           r = KErrNoMemory;
       
    35 
       
    36 	if (cleanup != NULL)
       
    37 		{
       
    38 #ifdef TRACK_LEAKS
       
    39         // Create and use the LeakTracker instance.
       
    40         TRAP_IGNORE(gLeakTracker = CLeakTracker::NewL(_L("FeedsServer")));
       
    41 #endif
       
    42 		
       
    43 		// Run the server.
       
    44 		TRAP(r, CFeedsServer::RunServerL());
       
    45 
       
    46 #ifdef TRACK_LEAKS
       
    47         delete gLeakTracker;
       
    48         gLeakTracker = NULL;
       
    49 #endif
       
    50 		delete cleanup;
       
    51 		}
       
    52 	
       
    53 	return r;
       
    54     }