mmsharing/mmshengine/tsrc/ut_engine/src/musengstubs.cpp
branchRCL_3
changeset 33 bc78a40cd63c
parent 32 73a1feb507fb
equal deleted inserted replaced
32:73a1feb507fb 33:bc78a40cd63c
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 
    19 
    20 #include "musengstubs.h"
    20 #include "musengstubs.h"
    21 #include "musengtestdefs.h"
       
    22 #include <sipprofilealrcontroller.h>
    21 #include <sipprofilealrcontroller.h>
    23 
    22 
    24 
    23 
    25 // ---- MEMBER FUNCTIONS OF CMusEngObserverStub --------------------------------
    24 // ---- MEMBER FUNCTIONS OF CMusEngObserverStub --------------------------------
    26 
    25 
    32 CMusEngObserverStub::CMusEngObserverStub()
    31 CMusEngObserverStub::CMusEngObserverStub()
    33     {
    32     {
    34     Reset();
    33     Reset();
    35     }
    34     }
    36         
    35         
       
    36 
    37 // -----------------------------------------------------------------------------
    37 // -----------------------------------------------------------------------------
    38 // 
    38 // 
    39 // -----------------------------------------------------------------------------
    39 // -----------------------------------------------------------------------------
    40 //
    40 //
    41 CMusEngObserverStub::~CMusEngObserverStub()
    41 CMusEngObserverStub::~CMusEngObserverStub()
    42     {
    42     {
    43     }
    43     delete iIncomingSessionOriginator;
    44 
    44     }
    45 // -----------------------------------------------------------------------------
    45 
    46 // From MMusEngSessionDurationTimerObserver
    46 
       
    47 // -------- Functions from MMusEngSessionDurationTimerObserver -----------------
       
    48 
       
    49 
       
    50 // -----------------------------------------------------------------------------
       
    51 // 
    47 // -----------------------------------------------------------------------------
    52 // -----------------------------------------------------------------------------
    48 //
    53 //
    49 void CMusEngObserverStub::UpdateTimerEvent()
    54 void CMusEngObserverStub::UpdateTimerEvent()
    50     {
    55     {
    51     iUpdateTimerEventCalled = ETrue;
    56     iUpdateTimerEventCalled = ETrue;
    52     }
    57     }
    53 
    58 
    54 // -----------------------------------------------------------------------------
    59 
    55 // From MMusEngAudioRoutingObserver
    60 // ----------- Functions from MusEngSessionObserver ----------------------------
    56 // -----------------------------------------------------------------------------
    61 
    57 //	
    62 
    58 void CMusEngObserverStub::AudioRoutingChanged()
    63 
       
    64 
       
    65 // -----------------------------------------------------------------------------
       
    66 // 
       
    67 // -----------------------------------------------------------------------------
       
    68 //	
       
    69 void CMusEngObserverStub::SessionEstablished()
       
    70     {
       
    71     iSessionEstablishedCalled = ETrue;
       
    72     }
       
    73 
       
    74 
       
    75 // -----------------------------------------------------------------------------
       
    76 //
       
    77 // -----------------------------------------------------------------------------
       
    78 //
       
    79 void CMusEngObserverStub::SessionTerminated()
       
    80     {
       
    81     iSessionTerminatedCalled = ETrue;
       
    82     }
       
    83     
       
    84     
       
    85 // -----------------------------------------------------------------------------
       
    86 //
       
    87 // -----------------------------------------------------------------------------
       
    88 //
       
    89 void CMusEngObserverStub::SessionConnectionLost()
       
    90     {
       
    91     iSessionConnectionLostCalled = ETrue;
       
    92     }
       
    93     
       
    94     
       
    95 // -----------------------------------------------------------------------------
       
    96 //
       
    97 // -----------------------------------------------------------------------------
       
    98 //
       
    99 void CMusEngObserverStub::SessionFailed()
       
   100     {
       
   101     iSessionFailedCalled = ETrue;
       
   102     }
       
   103     
       
   104             
       
   105 // -----------------------------------------------------------------------------
       
   106 //
       
   107 // -----------------------------------------------------------------------------
       
   108 //
       
   109 void CMusEngObserverStub::StreamIdle()
       
   110     {
       
   111     iStreamIdleCalled = ETrue;
       
   112     }
       
   113 
       
   114 
       
   115 // -----------------------------------------------------------------------------
       
   116 //
       
   117 // -----------------------------------------------------------------------------
       
   118 //
       
   119 void CMusEngObserverStub::StreamStreaming()
       
   120     {
       
   121     iStreamStreamingCalled = ETrue;
       
   122     }
       
   123     
       
   124 
       
   125 // -----------------------------------------------------------------------------
       
   126 //
       
   127 // -----------------------------------------------------------------------------
       
   128 //
       
   129 void CMusEngObserverStub::SessionTimeChanged( 
       
   130                         const TTimeIntervalSeconds& /*aSeconds*/ )
       
   131     {
       
   132     iSessionTimeChangedCalled = ETrue;
       
   133     }
       
   134 
       
   135 
       
   136 // -----------------------------------------------------------------------------
       
   137 //
       
   138 // -----------------------------------------------------------------------------
       
   139 //
       
   140 void CMusEngObserverStub::InactivityTimeout()
       
   141     {
       
   142     iInactivityTimeoutCalled = ETrue;
       
   143     }
       
   144 
       
   145 
       
   146 
       
   147 
       
   148 
       
   149 
       
   150 // ---- FUNCTIONS OF MMusEngOutSessionObserver --------------------------------
       
   151 
       
   152 
       
   153 // -----------------------------------------------------------------------------
       
   154 // 
       
   155 // -----------------------------------------------------------------------------
       
   156 //
       
   157 void CMusEngObserverStub::SessionRejected()
       
   158     {
       
   159     iSessionRejectedCalled = ETrue;
       
   160     }
       
   161 
       
   162 
       
   163 // -----------------------------------------------------------------------------
       
   164 // 
       
   165 // -----------------------------------------------------------------------------
       
   166 //  
       
   167 void CMusEngObserverStub::SessionBadRequest()
       
   168     {
       
   169     iSessionBadRequestCalled = ETrue;
       
   170     }
       
   171 
       
   172 
       
   173 // -----------------------------------------------------------------------------
       
   174 // 
       
   175 // -----------------------------------------------------------------------------
       
   176 //
       
   177 void CMusEngObserverStub::SessionUnauthorized()
       
   178     {
       
   179     iSessionUnauthorizedCalled = ETrue;
       
   180     }
       
   181     
       
   182 
       
   183 // -----------------------------------------------------------------------------
       
   184 // 
       
   185 // -----------------------------------------------------------------------------
       
   186 //
       
   187 void CMusEngObserverStub::SessionPaymentRequired()
       
   188     {
       
   189     iSessionPaymentRequiredCalled = ETrue;
       
   190     }
       
   191     
       
   192 
       
   193 // -----------------------------------------------------------------------------
       
   194 // 
       
   195 // -----------------------------------------------------------------------------
       
   196 //
       
   197 void CMusEngObserverStub::SessionRecipientNotFound()
       
   198     {
       
   199     iSessionRecipientNotFoundCalled = ETrue;
       
   200     }
       
   201     
       
   202 
       
   203 // -----------------------------------------------------------------------------
       
   204 // 
       
   205 // -----------------------------------------------------------------------------
       
   206 //
       
   207 void CMusEngObserverStub::SessionProxyAuthenticationRequired()
       
   208     {
       
   209     iSessionProxyAuthenticationRequiredCalled = ETrue;
       
   210     }
       
   211     
       
   212 
       
   213 // -----------------------------------------------------------------------------
       
   214 // 
       
   215 // -----------------------------------------------------------------------------
       
   216 //
       
   217 void CMusEngObserverStub::SessionRequestTimeOut()
       
   218     {
       
   219     iSessionRequestTimeOutCalled = ETrue;
       
   220     }
       
   221     
       
   222 
       
   223 // -----------------------------------------------------------------------------
       
   224 // 
       
   225 // -----------------------------------------------------------------------------
       
   226 //
       
   227 void CMusEngObserverStub::SessionUnsupportedMediaType()
       
   228     {
       
   229     iSessionUnsupportedMediaTypeCalled = ETrue;
       
   230     }
       
   231 
       
   232 
       
   233 // -----------------------------------------------------------------------------
       
   234 // 
       
   235 // -----------------------------------------------------------------------------
       
   236 //    
       
   237 void CMusEngObserverStub::SessionBusyHere()
       
   238     {
       
   239     iSessionBusyHereCalled = ETrue;
       
   240     }
       
   241     
       
   242 
       
   243 // -----------------------------------------------------------------------------
       
   244 // 
       
   245 // -----------------------------------------------------------------------------
       
   246 //
       
   247 void CMusEngObserverStub::SessionRequestCancelled()
       
   248     {
       
   249     iSessionRequestCancelledCalled = ETrue;
       
   250     }
       
   251 
       
   252 
       
   253 void CMusEngObserverStub::SessionTemporarilyNotAvailable()
       
   254     {
       
   255     iSessionTemporarilyNotAvailable = ETrue;
       
   256     }
       
   257 
       
   258 
       
   259 
       
   260 // ---- FUNCTIONS OF MMusEngLiveSessionObserver ----------------------------------
       
   261 
       
   262 
       
   263 
       
   264 // -----------------------------------------------------------------------------
       
   265 // 
       
   266 // -----------------------------------------------------------------------------
       
   267 //
       
   268 void CMusEngObserverStub::DiskFull()
       
   269     {
       
   270     iDiskFullCalled = ETrue;
       
   271     }
       
   272 
       
   273 // -----------------------------------------------------------------------------
       
   274 // 
       
   275 // -----------------------------------------------------------------------------
       
   276 //
       
   277 void CMusEngObserverStub::OrientationRefreshEnded()
       
   278     {
       
   279     iOrientationRefreshEndedCalled = ETrue;    
       
   280     }
       
   281 
       
   282 
       
   283 // ---- FUNCTIONS OF MMusEngClipSessionObserver ----------------------------------
       
   284 
       
   285 
       
   286 // -----------------------------------------------------------------------------
       
   287 // 
       
   288 // -----------------------------------------------------------------------------
       
   289 //
       
   290 void CMusEngObserverStub::EndOfClip()
       
   291     {
       
   292     iEndOfClipCalled = ETrue;
       
   293     }
       
   294 // -----------------------------------------------------------------------------
       
   295 // 
       
   296 // -----------------------------------------------------------------------------
       
   297 //
       
   298 
       
   299 void CMusEngObserverStub::RewindFromEndL()
       
   300 	{
       
   301 	iRewindFromEnd= ETrue;
       
   302 	}
       
   303 
       
   304 // -----------------------------------------------------------------------------
       
   305 // 
       
   306 // -----------------------------------------------------------------------------
       
   307 //
       
   308 void CMusEngObserverStub::TranscodingNeeded(TBool aDueUnknowCapas)
       
   309     {
       
   310     iTranscodingNeededCalled = ETrue;
       
   311     iDueUnknowCapas = aDueUnknowCapas;
       
   312     }
       
   313 
       
   314 
       
   315 // -----------------------------------------------------------------------------
       
   316 // 
       
   317 // -----------------------------------------------------------------------------
       
   318 //        
       
   319 void CMusEngObserverStub::TranscodingProgressed( TInt aPercentage )
       
   320     {
       
   321     iTranscodingProgressedPercentage = aPercentage;
       
   322     }
       
   323 
       
   324 
       
   325 // -----------------------------------------------------------------------------
       
   326 // 
       
   327 // -----------------------------------------------------------------------------
       
   328 //  
       
   329 void CMusEngObserverStub::TranscodingCompletedInit()
       
   330     {
       
   331     iTranscodingCompletedInitCalled = ETrue;
       
   332     }
       
   333 
       
   334 
       
   335 // -----------------------------------------------------------------------------
       
   336 // 
       
   337 // -----------------------------------------------------------------------------
       
   338 //  
       
   339 void CMusEngObserverStub::TranscodingCompletedFinalize()
       
   340     {
       
   341     iTranscodingCompletedFinalizeCalled = ETrue;
       
   342     }    
       
   343     
       
   344 
       
   345 // -----------------------------------------------------------------------------
       
   346 // 
       
   347 // -----------------------------------------------------------------------------
       
   348 //  
       
   349 void CMusEngObserverStub::TranscodingFailed()
       
   350     {
       
   351     iTranscodingFailedCalled = ETrue;
       
   352     }
       
   353  
       
   354 
       
   355 // ---- FUNCTIONS OF MMusEngInSessionObserver ----------------------------------
       
   356 
       
   357 
       
   358 // -----------------------------------------------------------------------------
       
   359 // 
       
   360 // -----------------------------------------------------------------------------
       
   361 //	
       
   362 void CMusEngObserverStub::IncomingSessionPreNotification()
       
   363     {
       
   364     iIncomingSessionPreNotificationCalled = ETrue;
       
   365     }
       
   366     
       
   367 
       
   368 // -----------------------------------------------------------------------------
       
   369 // 
       
   370 // -----------------------------------------------------------------------------
       
   371 //	
       
   372 void CMusEngObserverStub::IncomingSession( const TDesC& aOriginator,
       
   373                                            const TDesC& /*aOriginatorIdentity*/ )
       
   374     {
       
   375     iIncomingSessionCalled = ETrue;
       
   376     iIncomingSessionOriginator = aOriginator.Alloc();
       
   377     
       
   378     if ( !iIncomingSessionOriginator )
       
   379         {
       
   380         // TODO: Handle out of memory.
       
   381         }
       
   382     }
       
   383 
       
   384 
       
   385 // -----------------------------------------------------------------------------
       
   386 // 
       
   387 // -----------------------------------------------------------------------------
       
   388 //	
       
   389 void CMusEngObserverStub::StreamBuffering()
       
   390     {
       
   391     iStreamBufferingCalled = ETrue;
       
   392     }
       
   393 
       
   394 
       
   395 // -----------------------------------------------------------------------------
       
   396 // 
       
   397 // -----------------------------------------------------------------------------
       
   398 //	
       
   399 void CMusEngObserverStub::AudioRoutingChanged( TBool aShowNote )
    59     {
   400     {
    60     iAudioRoutingChangedCalled = ETrue;
   401     iAudioRoutingChangedCalled = ETrue;
    61     }
   402     iShowNote = aShowNote;
    62 
   403     }
    63 // -----------------------------------------------------------------------------
   404 
    64 // From MMusSipProfileUser
   405 // -----------------------------------------------------------------------------
    65 // -----------------------------------------------------------------------------
   406 // 
    66 //   
   407 // -----------------------------------------------------------------------------
    67 TBool CMusEngObserverStub::IsRoamingBetweenAPsAllowed()
   408 //    
    68     {
   409 TBool CMusEngObserverStub::AudioRouteChangeAllowed() const
    69     return iRoamingBetweenAPsAllowed;
   410     {
    70     }
   411     return iAudioRouteChangeAllowed;
    71     
   412     }
    72 // -----------------------------------------------------------------------------
   413     
    73 // From MMusSipProfileUser
   414 // -----------------------------------------------------------------------------
    74 // -----------------------------------------------------------------------------
   415 // 
    75 //   
   416 // -----------------------------------------------------------------------------
    76 void CMusEngObserverStub::ProfileRegistered()
   417 //    
    77     {
   418 void CMusEngObserverStub::VolumeChanged( TInt aVolume, TBool /*aAudioRouteChanged*/ )
    78     iProfileRegisteredCalled = ETrue;
   419     {
       
   420     iVolume = aVolume;
    79     }
   421     }
    80 
   422 
    81 // ----- HELPERS ---------------------------------------------------------------
   423 // ----- HELPERS ---------------------------------------------------------------
    82 
   424 
    83 
   425 
    85 // 
   427 // 
    86 // -----------------------------------------------------------------------------
   428 // -----------------------------------------------------------------------------
    87 //	
   429 //	
    88 TBool CMusEngObserverStub::IsReseted()
   430 TBool CMusEngObserverStub::IsReseted()
    89     {
   431     {
    90     return ( iUpdateTimerEventCalled == EFalse &&
   432     return ( !iUpdateTimerEventCalled &&
    91              iAudioRoutingChangedCalled == EFalse &&
   433              !iSessionEstablishedCalled &&
    92              iRoamingBetweenAPsAllowed == EFalse &&
   434              !iSessionTerminatedCalled &&
    93              iProfileRegisteredCalled == EFalse );
   435              !iSessionConnectionLostCalled &&
       
   436              !iSessionFailedCalled &&
       
   437              !iStreamIdleCalled &&
       
   438              !iStreamStreamingCalled &&
       
   439              !iSessionTimeChangedCalled &&
       
   440              !iInactivityTimeoutCalled &&
       
   441              !iSessionRejectedCalled &&
       
   442              !iSessionBadRequestCalled &&
       
   443         	 !iSessionUnauthorizedCalled &&
       
   444         	 !iSessionPaymentRequiredCalled &&
       
   445         	 !iSessionRecipientNotFoundCalled &&
       
   446         	 !iSessionProxyAuthenticationRequiredCalled &&
       
   447         	 !iSessionRequestTimeOutCalled &&
       
   448         	 !iSessionUnsupportedMediaTypeCalled &&
       
   449         	 !iSessionBusyHereCalled  &&
       
   450         	 !iSessionRequestCancelledCalled &&
       
   451         	 !iDiskFullCalled &&
       
   452         	 !iEndOfClipCalled &&
       
   453         	 !iRewindFromEnd &&
       
   454         	 !iTranscodingNeededCalled &&
       
   455         	 !iTranscodingCompletedInitCalled &&
       
   456         	 !iTranscodingCompletedFinalizeCalled &&
       
   457         	 !iTranscodingFailedCalled &&
       
   458         	 !iIncomingSessionPreNotificationCalled &&
       
   459              !iIncomingSessionCalled &&
       
   460              !iStreamBufferingCalled &&
       
   461              !iAudioRoutingChangedCalled &&
       
   462              iTranscodingProgressedPercentage == 0 &&
       
   463              !iSessionTemporarilyNotAvailable &&
       
   464              !iIncomingSessionOriginator &&
       
   465              !iShowNote &&
       
   466              iAudioRouteChangeAllowed &&
       
   467              !iVolume );
    94     }
   468     }
    95 
   469 
    96 // -----------------------------------------------------------------------------
   470 // -----------------------------------------------------------------------------
    97 // 
   471 // 
    98 // -----------------------------------------------------------------------------
   472 // -----------------------------------------------------------------------------
    99 //	
   473 //	
   100 void CMusEngObserverStub::Reset()
   474 void CMusEngObserverStub::Reset()
   101     {
   475     {
   102     iUpdateTimerEventCalled = EFalse;
   476     iUpdateTimerEventCalled = EFalse;
       
   477     iSessionEstablishedCalled = EFalse;
       
   478     iSessionTerminatedCalled = EFalse;
       
   479     iSessionConnectionLostCalled = EFalse;
       
   480     iSessionFailedCalled = EFalse;
       
   481     iStreamIdleCalled = EFalse;
       
   482     iStreamStreamingCalled = EFalse;
       
   483     iSessionTimeChangedCalled = EFalse;
       
   484     iInactivityTimeoutCalled = EFalse;
       
   485     iSessionRejectedCalled = EFalse;
       
   486 	iSessionBadRequestCalled = EFalse;
       
   487 	iSessionUnauthorizedCalled = EFalse;
       
   488 	iSessionPaymentRequiredCalled = EFalse;
       
   489 	iSessionRecipientNotFoundCalled = EFalse;
       
   490 	iSessionProxyAuthenticationRequiredCalled = EFalse;
       
   491 	iSessionRequestTimeOutCalled = EFalse;
       
   492 	iSessionUnsupportedMediaTypeCalled = EFalse;
       
   493 	iSessionBusyHereCalled = EFalse;
       
   494 	iSessionRequestCancelledCalled = EFalse;
       
   495 	iDiskFullCalled = EFalse;
       
   496 	iEndOfClipCalled = EFalse;
       
   497 	iRewindFromEnd = EFalse;
       
   498 	iTranscodingNeededCalled = EFalse;
       
   499     iTranscodingCompletedInitCalled = EFalse;
       
   500     iTranscodingCompletedFinalizeCalled = EFalse;
       
   501 	iTranscodingFailedCalled = EFalse;
       
   502 	iIncomingSessionPreNotificationCalled = EFalse;
       
   503     iIncomingSessionCalled = EFalse;
       
   504     iStreamBufferingCalled = EFalse;
   103     iAudioRoutingChangedCalled = EFalse;
   505     iAudioRoutingChangedCalled = EFalse;
   104     iRoamingBetweenAPsAllowed = EFalse;
   506     iTranscodingProgressedPercentage = 0;
   105     iProfileRegisteredCalled = EFalse;
   507     delete iIncomingSessionOriginator;
   106     }
   508     iSessionTemporarilyNotAvailable = EFalse;   
   107 
   509     iIncomingSessionOriginator = NULL;
   108 // -----------------------------------------------------------------------------
   510     iShowNote = EFalse;
   109 // 
   511     iAudioRouteChangeAllowed = ETrue;
   110 // -----------------------------------------------------------------------------
       
   111 //  
       
   112 TMusEngDisplayHandlerStub::TMusEngDisplayHandlerStub()
       
   113     {
       
   114     Reset();
       
   115     }
       
   116 
       
   117 void TMusEngDisplayHandlerStub::Reset()
       
   118     {
       
   119     iRect = TRect( 0, 0, 0, 0 );
       
   120     iSecondaryRect = TRect( 0, 0, 0, 0 );
       
   121     iIsEnabled = EFalse;
       
   122     iOrientation = EPortrait;
       
   123     iIsActive = ETrue;
       
   124     }
       
   125 
       
   126 TRect TMusEngDisplayHandlerStub::Rect() const
       
   127     {
       
   128     return iRect;
       
   129     }
       
   130 
       
   131 void TMusEngDisplayHandlerStub::SetRectL( const TRect& aRect )
       
   132     {
       
   133     iRect = aRect;
       
   134     }
       
   135             
       
   136 void TMusEngDisplayHandlerStub::SetSecondaryRectL( const TRect& aSecondaryRect )
       
   137     {
       
   138     iSecondaryRect = aSecondaryRect;
       
   139     }
       
   140             
       
   141 TRect TMusEngDisplayHandlerStub::SecondaryRect() const
       
   142     {
       
   143     return iSecondaryRect;
       
   144     }
       
   145             
       
   146 void TMusEngDisplayHandlerStub::EnableDisplayL( TBool aEnable )
       
   147     {
       
   148     iIsEnabled = aEnable;
       
   149     }
       
   150             
       
   151 TBool TMusEngDisplayHandlerStub::IsDisplayEnabled()
       
   152     {
       
   153     return iIsEnabled;
       
   154     }
       
   155             
       
   156 MMusEngDisplayHandler::TDisplayOrientation TMusEngDisplayHandlerStub::OrientationL()
       
   157     {
       
   158     return iOrientation;
       
   159     }
       
   160             
       
   161 void TMusEngDisplayHandlerStub::SetOrientationL( TDisplayOrientation aOrientation )
       
   162     {
       
   163     iOrientation = aOrientation;
       
   164     }
       
   165             
       
   166 TBool TMusEngDisplayHandlerStub::IsDisplayActive()
       
   167     {
       
   168     return iIsActive;
       
   169     }
       
   170     
       
   171 
       
   172 // -----------------------------------------------------------------------------
       
   173 // 
       
   174 // -----------------------------------------------------------------------------
       
   175 //        
       
   176 CLcSessionObserverStub::CLcSessionObserverStub()
       
   177     {
       
   178     } 
       
   179 
       
   180 // -----------------------------------------------------------------------------
       
   181 // 
       
   182 // -----------------------------------------------------------------------------
       
   183 //
       
   184 CLcSessionObserverStub::~CLcSessionObserverStub()
       
   185     {
       
   186     }
       
   187         
       
   188 // -----------------------------------------------------------------------------
       
   189 // 
       
   190 // -----------------------------------------------------------------------------
       
   191 //     
       
   192 void CLcSessionObserverStub::StateChanged( MLcSession& aSession )
       
   193     {
       
   194     iCalledFunction = ESessionStateChanged;
       
   195     iCurrentSession = &aSession;
       
   196     }
       
   197 
       
   198 // -----------------------------------------------------------------------------
       
   199 // 
       
   200 // -----------------------------------------------------------------------------
       
   201 //
       
   202 void CLcSessionObserverStub::StateChanged( MLcVideoPlayer& aPlayer )
       
   203     {
       
   204     iCalledFunction = EPlayerStateChanged;
       
   205     iCurrentPlayer = &aPlayer;
       
   206     }
       
   207 
       
   208 // -----------------------------------------------------------------------------
       
   209 // 
       
   210 // -----------------------------------------------------------------------------
       
   211 //
       
   212 void CLcSessionObserverStub::Updated( MLcSession& aSession )
       
   213     {
       
   214     iCalledFunction = ESessionUpdated;
       
   215     iCurrentSession = &aSession;
       
   216     }
       
   217 
       
   218 // -----------------------------------------------------------------------------
       
   219 // 
       
   220 // -----------------------------------------------------------------------------
       
   221 //
       
   222 void CLcSessionObserverStub::Updated( MLcVideoPlayer& aPlayer )
       
   223     {
       
   224     iCalledFunction = EPlayerUpdated;
       
   225     iCurrentPlayer = &aPlayer;
       
   226     }
       
   227 
       
   228 // -----------------------------------------------------------------------------
       
   229 // 
       
   230 // -----------------------------------------------------------------------------
       
   231 //
       
   232 void CLcSessionObserverStub::Failed( MLcSession& aSession, TInt aError )
       
   233     {
       
   234     iCalledFunction = ESessionFailed;
       
   235     iCurrentSession = &aSession;
       
   236     iError = aError;
       
   237     }
       
   238 
       
   239 // -----------------------------------------------------------------------------
       
   240 // 
       
   241 // -----------------------------------------------------------------------------
       
   242 //
       
   243 void CLcSessionObserverStub::Failed( MLcVideoPlayer& aPlayer, TInt aError )
       
   244     {
       
   245     iCalledFunction = EPlayerFailed;
       
   246     iCurrentPlayer = &aPlayer;
       
   247     iError = aError;
       
   248     }
       
   249 
       
   250 // -----------------------------------------------------------------------------
       
   251 // 
       
   252 // -----------------------------------------------------------------------------
       
   253 //
       
   254 void CLcSessionObserverStub::SessionTimeChanged(
       
   255     MLcSession& aSession,
       
   256     const TTimeIntervalSeconds& aSeconds )
       
   257     {
       
   258     iCalledFunction = ESessionTimeChanged;
       
   259     iCurrentSession = &aSession;
       
   260     iSessionTime = aSeconds.Int();
       
   261     }
       
   262 
       
   263 // -----------------------------------------------------------------------------
       
   264 // 
       
   265 // -----------------------------------------------------------------------------
       
   266 //
       
   267 void CLcSessionObserverStub::Reset()
       
   268     {
       
   269     iCalledFunction = EUnknown;
       
   270     iCurrentSession = NULL;
       
   271     iCurrentPlayer = NULL;
       
   272     iSessionTime = 0;
       
   273     iError = KErrNone;
       
   274     }
       
   275 
       
   276 // -----------------------------------------------------------------------------
       
   277 // 
       
   278 // -----------------------------------------------------------------------------
       
   279 //
       
   280 TBool CLcSessionObserverStub::IsReseted()
       
   281     {
       
   282     return ( iCalledFunction == EUnknown && 
       
   283              iCurrentSession == NULL &&
       
   284              iCurrentPlayer == NULL &&
       
   285              iSessionTime == 0 &&
       
   286              iError == KErrNone );
       
   287     }
       
   288 
       
   289 // -----------------------------------------------------------------------------
       
   290 // 
       
   291 // -----------------------------------------------------------------------------
       
   292 //
       
   293 CLcUiProviderStub::CLcUiProviderStub()
       
   294     {
       
   295     
       
   296     }
       
   297 
       
   298 // -----------------------------------------------------------------------------
       
   299 // 
       
   300 // -----------------------------------------------------------------------------
       
   301 //
       
   302 CLcUiProviderStub::~CLcUiProviderStub()
       
   303     {
       
   304     }
       
   305 
       
   306 // -----------------------------------------------------------------------------
       
   307 // 
       
   308 // -----------------------------------------------------------------------------
       
   309 //
       
   310 TBool CLcUiProviderStub::SelectRecipient( 
       
   311     MDesCArray& aRecipientAddresses, 
       
   312     TDes& aSelectedRecipientAddress )
       
   313     {
       
   314     iCalledFunction = ESelectRecipient;
       
   315     if ( aRecipientAddresses.MdcaCount() > 0 )
       
   316         {
       
   317         aSelectedRecipientAddress = aRecipientAddresses.MdcaPoint( 0 );
       
   318         }
       
   319     return iSimulatedReturnValue;
       
   320     }
       
   321 
       
   322 // -----------------------------------------------------------------------------
       
   323 // 
       
   324 // -----------------------------------------------------------------------------
       
   325 //
       
   326 TBool CLcUiProviderStub::InputRecipient( TDes& aRecipientAddress )
       
   327     {
       
   328     iCalledFunction = EInputRecipient;
       
   329     aRecipientAddress = iRecipient;
       
   330     return iSimulatedReturnValue;
       
   331     }
       
   332 
       
   333 // -----------------------------------------------------------------------------
       
   334 // 
       
   335 // -----------------------------------------------------------------------------
       
   336 //
       
   337 void CLcUiProviderStub::HandleForegroundStatus( TBool aForeground )
       
   338     {
       
   339     iCalledFunction = EHandleForegroundStatus;
       
   340     iForeground = aForeground;
       
   341     }
       
   342 
       
   343 // -----------------------------------------------------------------------------
       
   344 // 
       
   345 // -----------------------------------------------------------------------------
       
   346 //
       
   347 void CLcUiProviderStub::BlockUi( TBool /*aBlocked*/ )
       
   348     {
       
   349     }
       
   350     
       
   351 // -----------------------------------------------------------------------------
       
   352 // 
       
   353 // -----------------------------------------------------------------------------
       
   354 //
       
   355 void CLcUiProviderStub::Reset()
       
   356     {
       
   357     iCalledFunction = EUnknown;
       
   358     iRecipient.Set( KNullDesC );
       
   359     iSimulatedReturnValue = EFalse;
       
   360     }
       
   361 
       
   362 // -----------------------------------------------------------------------------
       
   363 // 
       
   364 // -----------------------------------------------------------------------------
       
   365 //
       
   366 TLcWindowStub::TLcWindowStub() :
       
   367     iEnabled( EFalse ),
       
   368     iRect(),
       
   369     iOrientation( MLcWindow::EPortrait )
       
   370     {
       
   371     }
       
   372 
       
   373 // -----------------------------------------------------------------------------
       
   374 // 
       
   375 // -----------------------------------------------------------------------------
       
   376 //
       
   377 void TLcWindowStub::EnableLcWindowL( TBool aEnable )
       
   378     {
       
   379     iEnabled = aEnable;
       
   380     }
       
   381 
       
   382 // -----------------------------------------------------------------------------
       
   383 // 
       
   384 // -----------------------------------------------------------------------------
       
   385 //
       
   386 TBool TLcWindowStub::IsLcWindowEnabled()
       
   387     {
       
   388     return iEnabled;
       
   389     }
       
   390 
       
   391 // -----------------------------------------------------------------------------
       
   392 // 
       
   393 // -----------------------------------------------------------------------------
       
   394 //
       
   395 void TLcWindowStub::SetLcWindowRectL( TRect aRect )
       
   396     {
       
   397     iRect = aRect;
       
   398     }
       
   399 
       
   400 // -----------------------------------------------------------------------------
       
   401 // 
       
   402 // -----------------------------------------------------------------------------
       
   403 //
       
   404 TRect TLcWindowStub::LcWindowRect()
       
   405     {
       
   406     delete HBufC::NewL( 1 );
       
   407     return iRect;
       
   408     }
       
   409 
       
   410 // -----------------------------------------------------------------------------
       
   411 // 
       
   412 // -----------------------------------------------------------------------------
       
   413 //
       
   414 void TLcWindowStub::SetLcWindowOrientationL( TLcWindowOrientation aOrientation )
       
   415     {
       
   416     delete HBufC::NewL( 1 );
       
   417     iOrientation = aOrientation;
       
   418     }
       
   419 
       
   420 // -----------------------------------------------------------------------------
       
   421 // 
       
   422 // -----------------------------------------------------------------------------
       
   423 //
       
   424 void TLcWindowStub::Reset()
       
   425     {
       
   426     iEnabled = EFalse;
       
   427     iOrientation = MLcWindow::EPortrait;
       
   428     iRect.SetSize( TSize() );
       
   429     }
       
   430 
       
   431 // -----------------------------------------------------------------------------
       
   432 // 
       
   433 // -----------------------------------------------------------------------------
       
   434 //
       
   435 MLcWindow::TLcWindowOrientation TLcWindowStub::LcWindowOrientationL()
       
   436     {
       
   437     delete HBufC::NewL( 1 );
       
   438     return iOrientation;
       
   439     }
       
   440 
       
   441 // -----------------------------------------------------------------------------
       
   442 // 
       
   443 // -----------------------------------------------------------------------------
       
   444 //
       
   445 TLcAudioControlStub::TLcAudioControlStub()
       
   446     {
       
   447     Reset();
       
   448     }
       
   449     
       
   450 // -----------------------------------------------------------------------------
       
   451 // 
       
   452 // -----------------------------------------------------------------------------
       
   453 //
       
   454 TBool TLcAudioControlStub::IsLcAudioMutedL()
       
   455     {
       
   456     delete HBufC::NewL( 1 );
       
   457     return iAudioMuted;
       
   458     }
       
   459 
       
   460 // -----------------------------------------------------------------------------
       
   461 // 
       
   462 // -----------------------------------------------------------------------------
       
   463 //
       
   464 void TLcAudioControlStub::MuteLcAudioL( TBool aMute )
       
   465     {
       
   466     delete HBufC::NewL( 1 );
       
   467     iAudioMuted = aMute;
       
   468     }
       
   469 
       
   470 // -----------------------------------------------------------------------------
       
   471 // 
       
   472 // -----------------------------------------------------------------------------
       
   473 //
       
   474 TBool TLcAudioControlStub::IsLcMicMutedL()
       
   475     {
       
   476     delete HBufC::NewL( 1 );
       
   477     return iMicMuted;
       
   478     }
       
   479 
       
   480 // -----------------------------------------------------------------------------
       
   481 // 
       
   482 // -----------------------------------------------------------------------------
       
   483 //
       
   484 void TLcAudioControlStub::MuteLcMicL( TBool aMute )
       
   485     {
       
   486     delete HBufC::NewL( 1 );
       
   487     iMicMuted = aMute;
       
   488     }
       
   489 
       
   490 // -----------------------------------------------------------------------------
       
   491 // 
       
   492 // -----------------------------------------------------------------------------
       
   493 //
       
   494 TBool TLcAudioControlStub::IsEnablingLcLoudspeakerAllowed()
       
   495     {
       
   496     return iEnablingLoudspeakerAllowed;
       
   497     }
       
   498 
       
   499 // -----------------------------------------------------------------------------
       
   500 // 
       
   501 // -----------------------------------------------------------------------------
       
   502 //
       
   503 void TLcAudioControlStub::EnableLcLoudspeakerL( TBool aEnabled )
       
   504     {
       
   505     delete HBufC::NewL( 1 );
       
   506     iLoudspeakerEnabled = aEnabled;
       
   507     }
       
   508 
       
   509 // -----------------------------------------------------------------------------
       
   510 // 
       
   511 // -----------------------------------------------------------------------------
       
   512 //
       
   513 TBool TLcAudioControlStub::IsLcLoudspeakerEnabled()
       
   514     {
       
   515     return iLoudspeakerEnabled;
       
   516     }
       
   517 
       
   518 // -----------------------------------------------------------------------------
       
   519 // 
       
   520 // -----------------------------------------------------------------------------
       
   521 //
       
   522 TInt TLcAudioControlStub::LcVolumeL()
       
   523     {
       
   524     delete HBufC::NewL( 1 );
       
   525     return iVolume;
       
   526     }
       
   527 
       
   528 // -----------------------------------------------------------------------------
       
   529 // 
       
   530 // -----------------------------------------------------------------------------
       
   531 //
       
   532 void TLcAudioControlStub::SetLcVolumeL( TInt aValue )
       
   533     {
       
   534     delete HBufC::NewL( 1 );
       
   535     iVolume = aValue;
       
   536     }
       
   537 
       
   538 // -----------------------------------------------------------------------------
       
   539 // 
       
   540 // -----------------------------------------------------------------------------
       
   541 //
       
   542 void TLcAudioControlStub::IncreaseLcVolumeL()
       
   543     {
       
   544     delete HBufC::NewL( 1 );
       
   545     iVolume++;
       
   546     }
       
   547 
       
   548 // -----------------------------------------------------------------------------
       
   549 // 
       
   550 // -----------------------------------------------------------------------------
       
   551 //
       
   552 void TLcAudioControlStub::DecreaseLcVolumeL()
       
   553     {
       
   554     delete HBufC::NewL( 1 );
       
   555     iVolume--;
       
   556     }
       
   557 
       
   558 // -----------------------------------------------------------------------------
       
   559 // 
       
   560 // -----------------------------------------------------------------------------
       
   561 //
       
   562 void TLcAudioControlStub::Reset()
       
   563     {
       
   564     iAudioMuted = EFalse;
       
   565     iMicMuted = EFalse;
       
   566     iEnablingLoudspeakerAllowed = EFalse;
       
   567     iLoudspeakerEnabled = ETrue;
       
   568     iVolume = 0;
   512     iVolume = 0;
       
   513     iDueUnknowCapas = EFalse;
       
   514     iOrientationRefreshEndedCalled = EFalse;
   569     }
   515     }
   570 
   516 
   571 
   517 
   572 // CSipProfileAlrController STUB
   518 // CSipProfileAlrController STUB
   573 CSipProfileAlrController* CSipProfileAlrController::NewL( 
   519 CSipProfileAlrController* CSipProfileAlrController::NewL( 
   608 CSipProfileAlrController::CSipProfileAlrController( 
   554 CSipProfileAlrController::CSipProfileAlrController( 
   609     CSIPProfileRegistryBase& aRegistry )
   555     CSIPProfileRegistryBase& aRegistry )
   610     : iRegistry( aRegistry )
   556     : iRegistry( aRegistry )
   611     {
   557     {
   612     }
   558     }
   613 
       
   614 void REComSession::DestroyedImplementation(TUid /*aDtorIDKey*/)
       
   615     {
       
   616     }
       
   617