usbmgmt/usbmgrtest/t_ncm/inc/tcpcommand.h
branchRCL_3
changeset 16 012cc2ee6408
parent 15 f92a4f87e424
equal deleted inserted replaced
15:f92a4f87e424 16:012cc2ee6408
     1 /*
       
     2 * Copyright (c) 2002-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 /** @file
       
    19  @internalComponent
       
    20  @test
       
    21  */
       
    22 
       
    23 #ifndef TCPCOMMAND_H
       
    24 #define TCPCOMMAND_H
       
    25 
       
    26 #include "commandengine.h"
       
    27 
       
    28 //The max count of tcp test in a same time
       
    29 const static TInt KMaxTcpTestCount = 5;
       
    30 
       
    31 class CTcpTestConsole;
       
    32 
       
    33 NONSHARABLE_CLASS(CTcpCommand) : public CNcmCommandBase
       
    34 /**
       
    35 Make TCP test: Create a tcp connection and tansfer data on it.
       
    36 */
       
    37 	{
       
    38 public:
       
    39 	static CTcpCommand* NewL(CUsbNcmConsole& aUsb, TUint aKey, TBool aIsTcp, TBool aIsServer);
       
    40 	~CTcpCommand();
       
    41 
       
    42 public:
       
    43 	//From CNcmCommandBase
       
    44 	void DoCommandL();
       
    45 
       
    46 public:
       
    47 	void CloseTcpTest(TInt aIndex);
       
    48 	
       
    49 private:
       
    50 	CTcpCommand(CUsbNcmConsole& aUsb, TUint aKey, TBool aIsTcp, TBool aIsServer);
       
    51 	void ConstructL();
       
    52 	
       
    53 private:
       
    54 	//Indicate the tcp type: ETrue - as TCP server; EFalse - as TCP client
       
    55 	TBool iIsServer;
       
    56 	TBool iIsTcp;
       
    57 	//Store the instances of tcp test console
       
    58 	CTcpTestConsole* iTestArray[KMaxTcpTestCount];
       
    59 	};
       
    60 
       
    61 #endif // TCPCOMMAND_H