commsinfrastructureapitest/commsinfrastructuresvs/suite/common/inc/T_DataCommsBase.h
changeset 0 dfb7c4ff071f
equal deleted inserted replaced
-1:000000000000 0:dfb7c4ff071f
       
     1 /*
       
     2 * Copyright (c) 2005-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 "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 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __T_DATA_COMMS_BASE_H__
       
    20 #define __T_DATA_COMMS_BASE_H__
       
    21 
       
    22 // User includes
       
    23 #include "DataWrapperBase.h"
       
    24 
       
    25 // Epoc includes
       
    26 #include <es_enum.h>
       
    27 
       
    28 const	TInt	KMaxConnectDataLength		= 255;
       
    29 const	TInt	KMaxOptionNameLength		= 128;
       
    30 
       
    31 typedef TBuf<KMaxTestExecuteCommandLength>	TTempBuf;
       
    32 
       
    33 class CT_DataCommsBase : public CDataWrapperBase
       
    34 	{
       
    35 public:
       
    36 	/**
       
    37 	* Public destructor
       
    38 	*/
       
    39 	~CT_DataCommsBase();
       
    40 
       
    41 protected:
       
    42 	/**
       
    43 	* Protected constructor.
       
    44 	*/
       
    45 	CT_DataCommsBase();
       
    46 
       
    47 private:
       
    48 	//	MActiveCallback implementation
       
    49 	virtual void					RunL(CActive* aActive, TInt aIndex);
       
    50 	virtual void					DoCancel(CActive* aActive, TInt aIndex);
       
    51 
       
    52 protected:
       
    53 	void							MissingParamError( const TDesC& aParamName );
       
    54 	TConnInterfaceState				InterfaceNotificationState( const TDesC& aState );
       
    55 	TConnectionType					ConnectionType( const TDesC& aConnectionTypeName );
       
    56 	RConnection::TConnStopType		ConnectionStopType( const TDesC& aConnectionStopType );
       
    57 	RConnection::TConnAttachType	ConnectionAttachType( const TDesC& aConnectionAttachType );
       
    58 	TUint							ProgressNotificationExpectedStage( const TDesC& aStage );
       
    59 	TBool							GetSockType( const TDesC& aSockTypeStr, TUint& aSockType );
       
    60 	TBool							GetProtocol( const TDesC& aProtocolStr, TUint& aProtocol );
       
    61 	TBool							GetAddrFamily( const TDesC& aAddrFamilyStr, TUint& aAddrFamily );
       
    62 	TBool							GetCapability( const TDesC& aCapabilityStr, TCapability& aCapability );
       
    63 	TBool							GetIntValue(const TDesC& aConstantName, TInt& aValue);
       
    64 	TUint32							GetLinkStateNotifierBits(const TDesC& aConstantName);
       
    65 	TBool							GetTShutdown(const TDesC& aConstantName, RSocket::TShutdown& aShutdown);
       
    66 	TInt							GetTBTPacketType(const TDesC& aConstantName);
       
    67 	TUint32							GetLowPowerMode(const TDesC& aConstantName);
       
    68 	TBool 							SubConnectionType( const TDesC& aSubConnTypeStr, RSubConnection::TSubConnType& aSubConnType);
       
    69 	TBool 							GetEventGroupUid(const TDesC& aEventGroupUidStr, TInt32& aEventGroupUid);
       
    70 	TBool							GetEventMaskBits( const TDesC& aConstantName, TUint32& aEventMask );
       
    71 	TBool							ParameterSetType( const TDesC& aParameterSetTypeStr, CSubConParameterFamily::TParameterSetType& aParameterSetType );
       
    72 	void							ConvertWhiteSpace( const TDesC& inputData, TDes& convertedData );
       
    73 	void 							PrintProtocol( const TDesC&, const TProtocolDesc& aProtocol, TBool aShowServiceInfoFlags = EFalse );
       
    74 	TBool							CompareProtocolInfo( TProtocolDesc& aLhs, TProtocolDesc& aRhs );
       
    75 	TInt 							GetStringAsInt( const TDesC& aEntry, const TDesC& aStrParameter );
       
    76 	
       
    77 	};
       
    78 
       
    79 #endif /* __T_DATA_COMMS_BASE_H__ */