multimediacommscontroller/mmccrtpsourcesink/tsrc/ut_rtpsourcesink/inc/UT_CMccRtpDataSink.h
changeset 0 1bce908db942
child 32 f2ed1fc4c163
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:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __UT_CMccRTPDATASINK_H__
       
    22 #define __UT_CMccRTPDATASINK_H__
       
    23 
       
    24 //  EXTERNAL INCLUDES
       
    25 #include <digia/eunit/ceunittestsuiteclass.h>
       
    26 #include <mmf/common/mmfcontrollerframework.h>
       
    27 #include "rtpdef.h"
       
    28 #include "rtpapi.h"
       
    29 
       
    30 //  INTERNAL INCLUDES
       
    31 #include "mccinternaldef.h"
       
    32 #include "mccinternalevents.h"
       
    33 //  FORWARD DECLARATIONS
       
    34 class CMccRtpDataSink;
       
    35 class CMccRtpKeepaliveContainer;
       
    36 class TMccInternalEvent;
       
    37 //  CLASS DEFINITION
       
    38 /**
       
    39  *
       
    40  * EUnitWizard generated test class. 
       
    41  *
       
    42  */
       
    43 class UT_CMccRtpDataSink
       
    44      : public CEUnitTestSuiteClass,
       
    45        public MRtpErrNotify,
       
    46        public MMccEventHandler,
       
    47        public MAsyncEventHandler
       
    48     {
       
    49     public:     // Constructors and destructors
       
    50 
       
    51         /**
       
    52          * Two phase construction
       
    53          */
       
    54         static UT_CMccRtpDataSink* NewL();
       
    55         static UT_CMccRtpDataSink* NewLC();
       
    56         /**
       
    57          * Destructor
       
    58          */
       
    59         ~UT_CMccRtpDataSink();
       
    60 
       
    61     private:    // Constructors and destructors
       
    62 
       
    63         UT_CMccRtpDataSink();
       
    64         void ConstructL();
       
    65 
       
    66 	public: 	// From observer interface
       
    67 		
       
    68     public: // From MRtpErrNotify
       
    69         void ErrorNotify( TInt aErrCode );
       
    70 
       
    71     public: // From MMccEventHandler
       
    72         TInt SendMccEventToClient( TMccEvent& /*aEvent*/ )
       
    73             {
       
    74             return KErrNone;
       
    75             }
       
    76 
       
    77     	void StateChange( TInt /*aState*/, TUint32 /*aLink*/ ) {};
       
    78 
       
    79         void ErrorOccured( TInt /*aError*/, TUint32 /*aSession*/, TUint32 /*aLink*/,
       
    80 	                       TUint32 /*aStreamId*/, TUint32 /*aEndpointId*/ ) {};
       
    81 
       
    82     public: // From MAsyncEventHandler
       
    83         TInt SendEventToClient( const TMMFEvent& /*aEvent*/ )
       
    84             {
       
    85             iEventType = KMccMasterKeyStaled;
       
    86             
       
    87             return KErrNone;
       
    88             }
       
    89 
       
    90     private:    // New methods
       
    91 
       
    92          void SetupL();
       
    93         
       
    94          void Teardown();
       
    95         
       
    96          void InitializeStreamL();
       
    97         
       
    98          void UT_CMccRtpDataSink_MuteL();
       
    99          
       
   100          void UT_CMccRtpDataSink_SendMediaSignallingLL();
       
   101         
       
   102         
       
   103          void UT_CMccRtpDataSink_EmptyBufferLL();
       
   104         
       
   105         
       
   106          void UT_CMccRtpDataSink_SinkThreadLogonL();
       
   107         
       
   108         
       
   109          void UT_CMccRtpDataSink_SinkThreadLogoffL();
       
   110         
       
   111         
       
   112          void UT_CMccRtpDataSink_SinkDataTypeCodeL();
       
   113         
       
   114         
       
   115          void UT_CMccRtpDataSink_SetSinkDataTypeCodeL();
       
   116         
       
   117         
       
   118          void UT_CMccRtpDataSink_BufferFilledLL();
       
   119         
       
   120         
       
   121          void UT_CMccRtpDataSink_CanCreateSinkBufferL();
       
   122         
       
   123         
       
   124          void UT_CMccRtpDataSink_CreateSinkBufferLL();
       
   125         
       
   126         
       
   127          void UT_CMccRtpDataSink_SinkPrimeLL();
       
   128         
       
   129         
       
   130          void UT_CMccRtpDataSink_SinkPlayLL();
       
   131         
       
   132         
       
   133          void UT_CMccRtpDataSink_SinkPauseLL();
       
   134         
       
   135         
       
   136          void UT_CMccRtpDataSink_SinkStopLL();
       
   137         
       
   138         
       
   139          void UT_CMccRtpDataSink_EmptyBufferL_1L();
       
   140         
       
   141          void UT_CMccRtpDataSink_EmptyBufferL_2L();
       
   142          
       
   143          void UT_CMccRtpDataSink_SendRTCPReceiverReportL();
       
   144         
       
   145         
       
   146          void UT_CMccRtpDataSink_SendRTCPSenderReportL();
       
   147 
       
   148 
       
   149          void UT_CMccRtpDataSink_SendRTCPDataLL();
       
   150 
       
   151 
       
   152          void UT_CMccRtpDataSink_ConstructSinkLL();
       
   153 
       
   154 		 void UT_CMccRtpDataSink_SRTPMasterKeyStaleEvent1L();
       
   155          
       
   156          void UT_CMccRtpDataSink_SRTPMasterKeyStaleEvent2L();
       
   157 
       
   158 
       
   159     // From CMccRtpInterface
       
   160         
       
   161          void UT_CMccRtpDataSink_AddRtpStackReferenceL();
       
   162         
       
   163         
       
   164          void UT_CMccRtpDataSink_RemoveRtpStackReferenceL();
       
   165         
       
   166         
       
   167          void UT_CMccRtpDataSink_PrepareLL();
       
   168         
       
   169         
       
   170          void UT_CMccRtpDataSink_CreateStreamLL();
       
   171         
       
   172         
       
   173          void UT_CMccRtpDataSink_RemoveStreamLL();
       
   174         
       
   175         
       
   176          void UT_CMccRtpDataSink_PlayStreamLL();
       
   177         
       
   178         
       
   179          void UT_CMccRtpDataSink_PauseStreamLL();
       
   180         
       
   181         
       
   182          void UT_CMccRtpDataSink_StopStreamLL();
       
   183         
       
   184         
       
   185          void UT_CMccRtpDataSink_StartInactivityTimerLL();
       
   186 
       
   187 
       
   188          void UT_CMccRtpDataSink_StopInactivityTimerLL();
       
   189 
       
   190 
       
   191          void UT_CMccRtpDataSink_SetSessionParamsLL();
       
   192 
       
   193 		 
       
   194 
       
   195 
       
   196     private:    // Data
       
   197 
       
   198 		EUNIT_DECLARE_TEST_TABLE; 
       
   199 
       
   200         TUint32 iSession;
       
   201         CRtpAPI* iRtpApi;
       
   202         CMccRtpDataSink* iSink;
       
   203         CMccRtpKeepaliveContainer* iRtpKeepaliveMechanism;
       
   204         CSRTPSession* iSecSession;
       
   205         TUint iEventType;
       
   206 		
       
   207     };
       
   208 
       
   209 #endif      //  __UT_CMccRTPDATASINK_H__
       
   210 
       
   211 // End of file