multimediacommscontroller/tsrc/TestConsoles/McpSubThreads/ClientTests/Inc/TestConsole.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2004 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:    Class definition for CTestAppConsole
       
    15 **
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __TESTAPPCONSOLE_H
       
    21 #define __TESTAPPCONSOLE_H
       
    22 
       
    23 #include <e32cons.h>
       
    24 
       
    25 #include "TestConsole.hrh"
       
    26 #include "TestConsoleDef.h"
       
    27 #include "rtpapi.h"
       
    28 #include "rtpdef.h"
       
    29 #include "mccdef.h"
       
    30 #include "mccinternaldef.h"
       
    31 
       
    32 class TTimeIntervalMicroSeconds32;
       
    33 class CMccSymSubthreadClient;
       
    34 class MDataSource;
       
    35 class MDataSink;
       
    36 class CMccUlDlClient;
       
    37 
       
    38 class CTestAppConsole : public CActive,
       
    39     public MRtpErrNotify, public MMccEventHandler
       
    40     {
       
    41 public:
       
    42 	static CTestAppConsole* NewL();
       
    43     virtual ~CTestAppConsole();
       
    44 	
       
    45 	void StartTesting();
       
    46  	void DisplayMsg(const TDesC& aMsg);
       
    47 
       
    48     virtual void ErrorNotify(TInt aError);
       
    49 
       
    50     virtual TInt SendMccEventToClient( TMccEvent& aEvent );
       
    51     virtual void ErrorOccured( TInt aError,
       
    52                                TUint32 aSessionId,
       
    53                                TUint32 aLinkId,
       
    54     	                       TUint32 aStreamId, 
       
    55     	                       TUint32 aEndpointId );
       
    56     virtual void StateChange( TInt aState, TUint32 aLink );
       
    57     
       
    58 private:	
       
    59     CTestAppConsole( );	
       
    60     void ConstructL(); 
       
    61 	
       
    62     void RunL();	
       
    63     void DoCancel();
       
    64 	
       
    65     void ProcessMainInput();
       
    66 
       
    67 	// create console menus
       
    68 	void DisplayConsoleMenu(const TDesC& aInstructions);
       
    69 	TKeyCode GetStringFromConsole(TDes& aAddr);
       
    70 	
       
    71 	void DoRead();
       
    72 
       
    73     //Test functions
       
    74     void RunTest1();
       
    75     void RunTest3();
       
    76     void RunTest4();
       
    77     void RunTest5();
       
    78 
       
    79     void RunTest6();
       
    80 
       
    81     void TestOpen(CMccSymSubthreadClient* aUlclient, CMccSymSubthreadClient* aDlclient);
       
    82     void TestPrepare(CMccSymSubthreadClient* aUlclient, CMccSymSubthreadClient* aDlclient);
       
    83     void TestControls(CMccSymSubthreadClient* aUlclient, CMccSymSubthreadClient* aDlclient);
       
    84     void TestParameters(CMccSymSubthreadClient* aUlclient, CMccSymSubthreadClient* aDlclient);
       
    85 
       
    86     void ConstructUlSinkSource();
       
    87     void ConstructDlSinkSource();
       
    88     void DestructSinksSources();
       
    89     void SetUpRtpStack();
       
    90 
       
    91 private:
       
    92     CConsoleBase* iConsole; 
       
    93 	HBufC* iInstruct;
       
    94 
       
    95     TBool iKeepgoingUL;
       
    96     TBool iKeepgoingDL;
       
    97 
       
    98     TInt iUlError;
       
    99     TInt iDlError;
       
   100 
       
   101     MDataSink* iUlsink;
       
   102     MDataSink* iDlsink;
       
   103     MDataSource* iUlsource;
       
   104     MDataSource* iDlsource;
       
   105 
       
   106     TRtpId iSessionID;
       
   107 
       
   108     TUint iIapid;
       
   109     TUint iPort;
       
   110     TInetAddr iRemoteAddr;
       
   111 
       
   112     CMccUlDlClient* iClient;
       
   113     
       
   114     TUint32 iLinkId;
       
   115     };
       
   116 
       
   117 
       
   118 #endif __TESTAPPCONSOLE_H