multimediacommsengine/mmcesrv/mmcemediamanager/tsrc/ut_mediamanager/inc/UT_CMCEMediaManager.h
changeset 0 1bce908db942
child 8 2a28ef775f15
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_CMCEMEDIAMANAGER_H__
       
    22 #define __UT_CMCEMEDIAMANAGER_H__
       
    23 
       
    24 //  EXTERNAL INCLUDES
       
    25 #include <digia/eunit/ceunittestsuiteclass.h>
       
    26 #include "MceMediaManagerTestHelper.h"
       
    27 
       
    28 //  INTERNAL INCLUDES
       
    29 
       
    30 
       
    31 //  FORWARD DECLARATIONS
       
    32 class CMceMediaManager;
       
    33 class CMccControllerStub;
       
    34 
       
    35 //  CLASS DEFINITION
       
    36 /**
       
    37  *
       
    38  * EUnitWizard generated test class. 
       
    39  *
       
    40  */
       
    41 class UT_CMceMediaManager : public CEUnitTestSuiteClass
       
    42     {
       
    43     public:     // Constructors and destructors
       
    44 
       
    45         /**
       
    46          * Two phase construction
       
    47          */
       
    48         static UT_CMceMediaManager* NewL();
       
    49         static UT_CMceMediaManager* NewLC();
       
    50         /**
       
    51          * Destructor
       
    52          */
       
    53         ~UT_CMceMediaManager();
       
    54 
       
    55     private:    // Constructors and destructors
       
    56 
       
    57         UT_CMceMediaManager();
       
    58         void ConstructL();
       
    59 
       
    60 
       
    61     private:    // New methods
       
    62 
       
    63         void SetupL();
       
    64         void Setup_BasicL();
       
    65         void Teardown();
       
    66 
       
    67         /**
       
    68         * Basic
       
    69         */
       
    70         void UT_CMceMediaManager_BasicLL();
       
    71 
       
    72         /**
       
    73         * Tests
       
    74         *
       
    75         * CSdpDocument* EncodeL( CMceComSession& aSession );
       
    76         *
       
    77         */
       
    78         void UT_CMceMediaManager_EncodeLL();
       
    79         
       
    80 
       
    81         /**
       
    82         * Tests
       
    83         *
       
    84         * TMceSipWarningCode DecodeL( CMceComSession& aSession,
       
    85         *                             CSdpDocument& aSdpDocument );
       
    86         *
       
    87         */
       
    88         void UT_CMceMediaManager_DecodeLL();
       
    89 
       
    90         /**
       
    91         * Tests
       
    92         *
       
    93         * TMceReturnStatus UpdateL( CMceComSession& aSession );
       
    94         * (MO audio)
       
    95         *
       
    96         */
       
    97         void UT_CMceMediaManager_UpdateLL();
       
    98 
       
    99         /**
       
   100         * Tests
       
   101         *
       
   102         * TMceReturnStatus UpdateL( CMceComSession& aSession );
       
   103         * (MO live video)
       
   104         *
       
   105         */
       
   106         void UT_CMceMediaManager_UpdateL_1L();
       
   107 
       
   108         /**
       
   109         * Tests
       
   110         *
       
   111         * TMceReturnStatus UpdateL( CMceComSession& aSession );
       
   112         * (MT multimedia)
       
   113         *
       
   114         */
       
   115         void UT_CMceMediaManager_UpdateL_2L();
       
   116            
       
   117         /**
       
   118         * Tests
       
   119         *
       
   120         * TMceReturnStatus UpdateL( CMceComSession& aSession );
       
   121         * (session update with signalling )
       
   122         *
       
   123         */
       
   124         void UT_CMceMediaManager_UpdateL_3L();
       
   125         
       
   126         
       
   127         /*
       
   128         * Tests
       
   129         *
       
   130         * TMceReturnStatus UpdateL( CMceComSession& aSession )
       
   131         * (hold)
       
   132         *
       
   133         */
       
   134         void UT_CMceMediaManager_UpdateL_4L();
       
   135 
       
   136         /*
       
   137         * Tests
       
   138         *
       
   139         * TMceReturnStatus UpdateL( CMceComSession& aSession )
       
   140         * (hold, which fails )
       
   141         *
       
   142         */
       
   143         void UT_CMceMediaManager_UpdateL_4_1L();
       
   144          
       
   145         /**
       
   146         * Tests
       
   147         *
       
   148         * TMceReturnStatus UpdateL( CMceComSession& aSession )
       
   149         * (session update with no signalling )
       
   150         *
       
   151         */
       
   152         void UT_CMceMediaManager_UpdateL_5L();
       
   153 
       
   154         /**
       
   155         * Tests
       
   156         *
       
   157         * TMceReturnStatus UpdateL( CMceComSession& aSession )
       
   158         * (received session update )
       
   159         *
       
   160         */
       
   161         void UT_CMceMediaManager_UpdateL_6L();
       
   162 
       
   163 
       
   164         /**
       
   165         * Tests
       
   166         *
       
   167         * TMceReturnStatus UpdateL( CMceComSession& aSession )
       
   168         * (session received update with added and removed streams)
       
   169         *
       
   170         */
       
   171         void UT_CMceMediaManager_UpdateL_8L();
       
   172         
       
   173         /**
       
   174         * Tests
       
   175         *
       
   176         * TMceReturnStatus UpdateL( CMceComSession& aSession );
       
   177         * (MO POC audio)
       
   178         *
       
   179         */
       
   180         void UT_CMceMediaManager_UpdateL_9L();
       
   181         
       
   182         /**
       
   183         * Tests
       
   184         *
       
   185         * TMceReturnStatus ReserveL( CMceComSession& aSession, const TDesC8& aToken );
       
   186         *
       
   187         */
       
   188         void UT_CMceMediaManager_ReserveLL();
       
   189 
       
   190         /**
       
   191         * Tests
       
   192         *
       
   193         * TBool ReservationNeeded( CMceComSession& aSession );
       
   194         *
       
   195         */
       
   196         void UT_CMceMediaManager_ReservationNeededL();
       
   197 
       
   198         /**
       
   199         * Tests
       
   200         *
       
   201         * TBool NeedToNegotiate( CMceComSession& aSession );
       
   202         *
       
   203         */
       
   204         void UT_CMceMediaManager_NeedToNegotiateL();
       
   205 
       
   206         /**
       
   207         * Tests
       
   208         *
       
   209         * void CreateRejectedAnswer( CMceComSession& aSession );
       
   210         *
       
   211         */
       
   212         void UT_CMceMediaManager_CreateRejectedAnswerL();
       
   213         
       
   214         /**
       
   215         * Tests
       
   216         *
       
   217         * void PauseL( CMceComMediaSink& aSink );
       
   218         *
       
   219         */
       
   220         void UT_CMceMediaManager_PauseL_1L();
       
   221         
       
   222         /**
       
   223         * Tests
       
   224         *
       
   225         * void PauseL( CMceComMediaSource& aSource );
       
   226         *
       
   227         */
       
   228         void UT_CMceMediaManager_PauseL_2L();
       
   229         
       
   230         /**
       
   231         * Tests
       
   232         *
       
   233         * void ResumeL( CMceComMediaSink& aSink );
       
   234         *
       
   235         */
       
   236         void UT_CMceMediaManager_ResumeL_1L();
       
   237         
       
   238         /**
       
   239         * Tests
       
   240         *
       
   241         * void ResumeL( CMceComMediaSource& aSource );
       
   242         *
       
   243         */
       
   244         void UT_CMceMediaManager_ResumeL_2L();
       
   245         
       
   246         /**
       
   247         * Tests
       
   248         *
       
   249         * TInt CloseSession( CMceComSession& aSession );
       
   250         *
       
   251         */
       
   252         void UT_CMceMediaManager_CloseSessionL();
       
   253         
       
   254         /**
       
   255         * Tests
       
   256         *
       
   257         * TInt CloseSession( CMceComSession& aSession )
       
   258         * (merged)
       
   259         *
       
   260         */
       
   261         void UT_CMceMediaManager_CloseSession_1L();
       
   262         
       
   263         /**
       
   264         * Tests
       
   265         *
       
   266         * void StartInactivityTimerL( CMceComRtpSource& aRtpSource );
       
   267         *
       
   268         */
       
   269         void UT_CMceMediaManager_StartInactivityTimerLL();
       
   270 
       
   271         /**
       
   272         * Tests
       
   273         *
       
   274         * void StopInactivityTimerL( CMceComRtpSource& aRtpSource );
       
   275         *
       
   276         */
       
   277         void UT_CMceMediaManager_StopInactivityTimerLL();
       
   278         
       
   279         /**
       
   280         * Tests
       
   281         *
       
   282         * void SendRTCPAnyDataL( CMceComMediaStream& aMediaStream, const TDesC8& aData );
       
   283         *
       
   284         */
       
   285         void UT_CMceMediaManager_SendRTCPAnyDataLL();
       
   286 
       
   287         /**
       
   288         * Tests
       
   289         *
       
   290         * void SendRTCPReceiverReportL( CMceComMediaStream& aMediaStream );
       
   291         *
       
   292         */
       
   293         void UT_CMceMediaManager_SendRTCPReceiverReportLL();
       
   294 
       
   295         /**
       
   296         * Tests
       
   297         *
       
   298         * void SendRTCPSenderReportL( CMceComMediaStream& aMediaStream );
       
   299         *
       
   300         */
       
   301         void UT_CMceMediaManager_SendRTCPSenderReportLL();
       
   302 
       
   303         void UT_CMceMediaManager_TranscodeFileLL();
       
   304         void UT_CMceMediaManager_TranscodeFileLWithCodecL();
       
   305         void UT_CMceMediaManager_TranscodingSessionL();
       
   306         void UT_CMceMediaManager_TranscodingSession_2L();
       
   307         void UT_CMceMediaManager_CancelTranscodeFileLL();
       
   308         void UT_CMceMediaManager_ConfirmationNeededL();
       
   309         
       
   310         void UT_CMceMediaManager_SessionL();
       
   311         
       
   312         void UT_CMceMediaManager_InitializeMccStreamLL();
       
   313         void UT_CMceMediaManager_CreateMccLinkLL();
       
   314         void UT_CMceMediaManager_CreateMccStreamLL();
       
   315         void UT_CMceMediaManager_PrepareMccStreamLL();
       
   316         void UT_CMceMediaManager_StartMccStreamLL();
       
   317         void UT_CMceMediaManager_AdjustMccStreamLL();
       
   318         void UT_CMceMediaManager_ValidateMccStreamLL();
       
   319         void UT_CMceMediaManager_StopMccStreamL();
       
   320         void UT_CMceMediaManager_SynchronizeMccStreamLL();
       
   321         
       
   322         void UT_CMceMediaManager_CleanupLL();
       
   323         void UT_CMceMediaManager_DisposeMediaStreamLL();
       
   324         void UT_CMceMediaManager_DisposeCodecLL();
       
   325         void UT_CMceMediaManager_RequireSignallingLL();
       
   326         void UT_CMceMediaManager_CleanupSessionLL();
       
   327         
       
   328         /**
       
   329         * Tests
       
   330         *
       
   331         * TInt GetSupportedCodecs( RArray<TFourCC>& aCodecs );
       
   332         *
       
   333         */
       
   334         void UT_CMceMediaManager_GetSupportedCodecsL();
       
   335                                 
       
   336         /**
       
   337         * Tests
       
   338         *
       
   339         * void GetCapabilitiesL( RPointerArray<CMceComAudioCodec>& aCapabilities );
       
   340         *
       
   341         */
       
   342         void UT_CMceMediaManager_GetCapabilitiesL_1L();
       
   343 
       
   344         /**
       
   345         * Tests
       
   346         *
       
   347         * void GetCapabilitiesL( RPointerArray<CMceComVideoCodec>& aCapabilities );
       
   348         *
       
   349         */
       
   350         void UT_CMceMediaManager_GetCapabilitiesL_2L();
       
   351 
       
   352 
       
   353         /**
       
   354         * Tests
       
   355         *
       
   356         * void MccEventReceived( const TMccEvent& aEvent );
       
   357         *
       
   358         */
       
   359         void UT_CMceMediaManager_MccEventReceivedL();
       
   360         
       
   361 
       
   362         /**
       
   363         * Tests
       
   364         *
       
   365         * void MccMediaPrepared( TUint32 aSessionId,
       
   366         *                        TUint32 aLinkId,
       
   367         *                        TUint32 aStreamId,
       
   368         *                        TUint32 aSinkSourceId );
       
   369         *
       
   370         */
       
   371         void UT_CMceMediaManager_MccMediaPreparedL();
       
   372                                        
       
   373         /**
       
   374         * Tests
       
   375         *
       
   376         * void MccMediaStarted( TUint32 aSessionId,
       
   377         *                        TUint32 aLinkId,     
       
   378         *                        TUint32 aStreamId,
       
   379         *                        TUint32 aSinkSourceId );
       
   380         *
       
   381         */
       
   382         void UT_CMceMediaManager_MccMediaStartedL();
       
   383         
       
   384         /**
       
   385         * Tests
       
   386         *
       
   387         * void MccMediaStopped( TUint32 aSessionId,
       
   388         *                       TUint32 aLinkId,
       
   389         *                       TUint32 aStreamId,
       
   390         *                       TUint32 aSinkSourceId );
       
   391         *
       
   392         */
       
   393         void UT_CMceMediaManager_MccMediaStoppedL();
       
   394         
       
   395         /**
       
   396         * Tests
       
   397         *
       
   398         * void MccMediaPaused( TUint32 aSessionId,
       
   399         *                      TUint32 aLinkId,
       
   400         *                      TUint32 aStreamId,
       
   401         *                      TUint32 aSinkSourceId );
       
   402         *
       
   403         */
       
   404         void UT_CMceMediaManager_MccMediaPausedL();
       
   405 
       
   406         /**
       
   407         * Tests
       
   408         *
       
   409         * void MccMediaResumed( TUint32 aSessionId,
       
   410         *                       TUint32 aLinkId,
       
   411         *                       TUint32 aStreamId,
       
   412         *                       TUint32 aSinkSourceId );
       
   413         *
       
   414         */
       
   415         void UT_CMceMediaManager_MccMediaResumedL();
       
   416 
       
   417         /**
       
   418         * Tests
       
   419         *
       
   420         * void MccMediaInactive( TUint32 aSessionId,
       
   421         *                        TUint32 aLinkId,
       
   422         *                        TUint32 aStreamId,
       
   423         *                        TUint32 aSinkSourceId );
       
   424         *
       
   425         */
       
   426         void UT_CMceMediaManager_MccMediaInactiveL();
       
   427 
       
   428         /**
       
   429         * Tests
       
   430         *
       
   431         * void MccMediaActive( TUint32 aSessionId,
       
   432         *                      TUint32 aLinkId,
       
   433         *                      TUint32 aStreamId,
       
   434         *                      TUint32 aSinkSourceId );
       
   435         *
       
   436         */
       
   437         void UT_CMceMediaManager_MccMediaActiveL();
       
   438         
       
   439         /**
       
   440         * Tests
       
   441         *
       
   442         * void MccCtrlError( TInt aError );
       
   443         *
       
   444         */
       
   445         void UT_CMceMediaManager_MccCtrlError_1L();
       
   446 
       
   447         /**
       
   448         * Tests
       
   449         *
       
   450         * void MccCtrlError( TInt aError,
       
   451         *                    TUint32 aSessionId,
       
   452         *                    TUint32 aLinkId,
       
   453         *                    TUint32 aStreamId,
       
   454         *                    TUint32 aSinkSourceId );
       
   455         *
       
   456         */
       
   457         void UT_CMceMediaManager_MccCtrlError_2L();
       
   458 
       
   459         void UT_CMceMediaManager_MccTranscodeEventReceivedL();
       
   460         void UT_CMceMediaManager_PrackUpdateLL();
       
   461 
       
   462         /**
       
   463         * Tests media attribute setting & getting
       
   464         */
       
   465         void UT_CMceMediaManager_GetVolumeLL();
       
   466         void UT_CMceMediaManager_GetMaxVolumeLL();
       
   467         void UT_CMceMediaManager_SetVolumeLL();
       
   468         void UT_CMceMediaManager_SetBalanceLL();
       
   469         void UT_CMceMediaManager_GetGainLL();
       
   470         void UT_CMceMediaManager_GetMaxGainLL();
       
   471         void UT_CMceMediaManager_SetGainLL();
       
   472         
       
   473         void UT_CMceMediaManager_FillMceFileInfoLL();
       
   474         void UT_CMceMediaManager_GetDisplayRotationLL();
       
   475         void UT_CMceMediaManager_GetFileInfoLL();
       
   476         void UT_CMceMediaManager_GetFileInfoL_2L();
       
   477         void UT_CMceMediaManager_SetDisplayRotationLL();
       
   478         void UT_CMceMediaManager_FastForwardLL();
       
   479         void UT_CMceMediaManager_FastRewindLL();
       
   480         void UT_CMceMediaManager_GetAudioRoutingLL();
       
   481         void UT_CMceMediaManager_GetBrightnessLL();
       
   482         void UT_CMceMediaManager_GetCameraInfoLL();
       
   483         void UT_CMceMediaManager_GetCamerasAvailableLL();
       
   484         void UT_CMceMediaManager_GetContrastLL();
       
   485         void UT_CMceMediaManager_GetDigitalZoomFactorLL();
       
   486         void UT_CMceMediaManager_GetDisplayPriorityLL();
       
   487         void UT_CMceMediaManager_GetDisplayRectLL();
       
   488         void UT_CMceMediaManager_GetDisplaysAvailableLL();
       
   489         void UT_CMceMediaManager_GetExposureLL();
       
   490         void UT_CMceMediaManager_GetFilePositionLL();
       
   491         void UT_CMceMediaManager_GetWhiteBalanceLL();
       
   492         void UT_CMceMediaManager_GetZoomFactorLL();
       
   493         void UT_CMceMediaManager_SetAudioRoutingLL();
       
   494         void UT_CMceMediaManager_SetBrightnessLL();
       
   495         void UT_CMceMediaManager_SetCameraIndexLL();
       
   496         void UT_CMceMediaManager_SetContrastLL();
       
   497         void UT_CMceMediaManager_SetDigitalZoomFactorLL();
       
   498         void UT_CMceMediaManager_SetDisplayIndexLL();
       
   499         void UT_CMceMediaManager_SetDisplayPriorityLL();
       
   500         void UT_CMceMediaManager_SetDisplayRectLL();
       
   501         void UT_CMceMediaManager_SetExposureLL();
       
   502         void UT_CMceMediaManager_SetFileInfoLL();
       
   503         void UT_CMceMediaManager_SetFilePositionLL();
       
   504         void UT_CMceMediaManager_SetWhiteBalanceLL();
       
   505         void UT_CMceMediaManager_SetZoomFactorLL();
       
   506         void UT_CMceMediaManager_SetCNameLL();
       
   507         void UT_CMceMediaManager_SetRemoteAddressLL();
       
   508         void UT_CMceMediaManager_UpdateConfigKeyLL();
       
   509         
       
   510         /**
       
   511         * Tests
       
   512         *
       
   513         * CMceSdpSession* SdpSession( CMceComSession& aSession )
       
   514         *
       
   515         */
       
   516         void UT_CMceMediaManager_SdpSessionL();
       
   517         
       
   518     private:    // helpers
       
   519         
       
   520         void Reset();
       
   521         
       
   522     private:    // Data
       
   523 
       
   524 		EUNIT_DECLARE_TEST_TABLE; 
       
   525 
       
   526 		CMceMediaManager* iManager;
       
   527 		CMceComSession* iSession; // received from the session
       
   528 		CSdpDocument* iSdpDocument; // received from the session
       
   529 		CMceServerStub* iServer;
       
   530 		CMccControllerStub* iMcc;
       
   531 		CMceComSession* iUpdate; // received from the session
       
   532 		
       
   533     };
       
   534 
       
   535 #endif      //  __UT_CMCEMEDIAMANAGER_H__
       
   536 
       
   537 // End of file