networksecurity/tls/ts_tls/COMINIT.CPP
changeset 0 af10295192d8
child 21 abbed5a4b42a
equal deleted inserted replaced
-1:000000000000 0:af10295192d8
       
     1 // Copyright (c) 1997-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 "testenv.h"
       
    17 #include <e32hal.h>
       
    18 #include <c32comm.h>
       
    19 
       
    20 #if defined (__WINS__)
       
    21 #define PDD_NAME		_L("ECDRV")
       
    22 #define LDD_NAME		_L("ECOMM")
       
    23 #define LDD_FNAME		_L("ECOMM")
       
    24 #else
       
    25 #define PDD_NAME		_L("EUART1")
       
    26 #define PDD2_NAME		_L("EUART2")
       
    27 #define LDD_NAME		_L("ECOMM")
       
    28 #define LDD_FNAME		_L("FCOMM")
       
    29 #endif
       
    30 
       
    31 GLDEF_C void CommInitL()
       
    32 	{
       
    33 	TInt err;
       
    34  	// When bootstrapping C32 we have to avoid the PhBkSyncServer being started, since
       
    35  	// it needs a different CommDB
       
    36  	_LIT(KPhbkSyncCMI, "phbsync.cmi");
       
    37     err = StartC32WithCMISuppressions(KPhbkSyncCMI);
       
    38 	if (err!=KErrNone && err!=KErrAlreadyExists)
       
    39 		{
       
    40 		User::Leave(err);
       
    41 		}
       
    42 	err=User::LoadPhysicalDevice(PDD_NAME);
       
    43 	if (err!=KErrNone && err!=KErrAlreadyExists)
       
    44 		User::Leave(err);
       
    45 //#if defined PDD2_NAME
       
    46 //# if defined (__EPOC32__)
       
    47 //	TMachineInfoV1Buf info;
       
    48 //	User::LeaveIfError(UserHal::MachineInfo(info));
       
    49 //	if (info().iMachineName.Compare(_L("PROTEA_RACKC"))==0
       
    50 //		|| info().iMachineName.Compare(_L("PROTEA_RACKD"))==0)
       
    51 //		{
       
    52 //# endif
       
    53 //		err = User::LoadPhysicalDevice(PDD2_NAME);
       
    54 //		if (err!=KErrNone && err!=KErrAlreadyExists)
       
    55 //			User::Leave(err);
       
    56 //# if defined (__EPOC32__)
       
    57 //		}
       
    58 //# endif
       
    59 //#endif
       
    60 	err=User::LoadLogicalDevice(LDD_NAME);
       
    61 	if (err!=KErrNone && err!=KErrAlreadyExists)
       
    62 		User::Leave(err);
       
    63 	}
       
    64