zeroconf/server/src/mdns.cpp
changeset 14 da856f45b798
equal deleted inserted replaced
12:78fbd574edf4 14:da856f45b798
       
     1 // Copyright (c) 2008-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 // mdns.cpp
       
    15 // 
       
    16 //
       
    17 /**
       
    18 @file
       
    19 @internalTechnology
       
    20 */
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <f32file.h>
       
    24 #include "mdnsserver.h"
       
    25 
       
    26 void MainL()
       
    27     {
       
    28         
       
    29     CActiveScheduler* sched = new (ELeave) CActiveScheduler;
       
    30     CleanupStack::PushL(sched);
       
    31     CActiveScheduler::Install(sched);
       
    32     	
       
    33     CMdnsServer::NewLC();
       
    34     RProcess::Rendezvous(KErrNone);
       
    35  	CActiveScheduler::Start();
       
    36  	
       
    37 
       
    38     
       
    39     CleanupStack::PopAndDestroy(); 
       
    40     CleanupStack::PopAndDestroy();
       
    41     
       
    42 	}
       
    43 
       
    44 TInt E32Main()
       
    45 	{
       
    46 	// --------- check memory leak -------------
       
    47 	__UHEAP_MARK;
       
    48 	CTrapCleanup* cleanup = CTrapCleanup::New();
       
    49 	TInt err = KErrNone;
       
    50 	if (cleanup)
       
    51 		{
       
    52 		TRAPD(err, MainL());
       
    53 		delete cleanup;
       
    54 		}
       
    55 	__UHEAP_MARKEND;
       
    56 	return err;
       
    57 	}