convergedcallengine/cce/src/cccecallcontainer.cpp
branchRCL_3
changeset 19 7d48bed6ce0c
parent 0 ff3b6d0fd310
child 20 987c9837762f
--- a/convergedcallengine/cce/src/cccecallcontainer.cpp	Thu Aug 19 10:28:14 2010 +0300
+++ b/convergedcallengine/cce/src/cccecallcontainer.cpp	Tue Aug 31 15:45:17 2010 +0300
@@ -61,7 +61,7 @@
 //
 void CCCECallContainer::ConstructL()
     {
-	FeatureManager::InitializeLibL();
+    FeatureManager::InitializeLibL();
     iCallStateMediator = CCCECallInfoMediator::NewL( *this );
     
     CreateCallDataArraysL();
@@ -170,7 +170,7 @@
 //
 void CCCECallContainer::AirTimeDurationSwap(
                            const CCPCall::TCallType aNewCallType)
-	{
+    {
     CCELOGSTRING("CCCECallContainer::AirTimeDurationSwap(): IN");
     
     CCCECall* call = NULL;
@@ -191,29 +191,29 @@
         }
     
     if( 1 == calls )
-    	{
-    	// After handover we will have only one active call
-    	// If we have more or less, timer swapping will not happend
-	    if (aNewCallType == CCPCall::ECallTypePS )
-	    	{
-	    	CCELOGSTRING2("CCCECallContainer::AirTimeDurationSwap(): CS Stops, PS restarts from %d",
-	    			iCSDuration->NumberOfBeats() );
-	    	iCSDuration->Stop();
-	    	iPSDuration->RestartAirTimeDuration(iCSDuration->NumberOfBeats());
-	    	iCSDuration->Reset();
-	    	}
-	    else
-	    	{
-	    	CCELOGSTRING2("CCCECallContainer::AirTimeDurationSwap(): PS Stops, CS restarts from %d",
-	    			iPSDuration->NumberOfBeats() );
-	    	iPSDuration->Stop();
-	    	iCSDuration->RestartAirTimeDuration(iPSDuration->NumberOfBeats());
-	    	iPSDuration->Reset();
-	    	}
-    	}
+        {
+        // After handover we will have only one active call
+        // If we have more or less, timer swapping will not happend
+        if (aNewCallType == CCPCall::ECallTypePS )
+            {
+            CCELOGSTRING2("CCCECallContainer::AirTimeDurationSwap(): CS Stops, PS restarts from %d",
+                    iCSDuration->NumberOfBeats() );
+            iCSDuration->Stop();
+            iPSDuration->RestartAirTimeDuration(iCSDuration->NumberOfBeats());
+            iCSDuration->Reset();
+            }
+        else
+            {
+            CCELOGSTRING2("CCCECallContainer::AirTimeDurationSwap(): PS Stops, CS restarts from %d",
+                    iPSDuration->NumberOfBeats() );
+            iPSDuration->Stop();
+            iCSDuration->RestartAirTimeDuration(iPSDuration->NumberOfBeats());
+            iPSDuration->Reset();
+            }
+        }
     CCELOGSTRING("CCCECallContainer::AirTimeDurationSwap(): OUT");
-	}
-	
+    }
+    
 // ---------------------------------------------------------------------------
 // AirTimeDurationStop()
 // ---------------------------------------------------------------------------
@@ -294,7 +294,7 @@
         call = GetCall( i );
         if ( call->State() == CCPCall::EStateConnected ||
              call->State() == CCPCall::EStateHold  )
-            { 	   
+            {      
             if ( IsCsPlugin( call, EFalse ) )
                 {
                 csCalls++;
@@ -370,7 +370,7 @@
     TCallReleaseEntry entry;
     entry.iCallToRelease = &aCalltoRemove;
     entry.iUid = aUid;
-    iCallstoRelease.Append(entry);
+    iCallstoRelease.Append(entry); 
     if (!iIdle->IsActive())
         {
         iIdle->Start( TCallBack(ReleaseCalls,this) );
@@ -699,7 +699,9 @@
             {
             if( call->ImplementationUid() == aImplementationUid )
                 {
-                aCallArray.Append(call);
+                // return value ignored. Ownership of the call object is not 
+                // transferred to array. 
+                aCallArray.Append(call); 
                 }
             }
         }
@@ -729,8 +731,10 @@
                  callState == CCPCall::EStateConnecting ||
                  callState == CCPCall::EStateConnected )
                 {
-                aCallArray.Append( call );
-                err = KErrNone;
+                // Ownership of the call object is not 
+                // transferred to array.
+                err = aCallArray.Append( call );
+                
                 }
             }
         }
@@ -742,8 +746,8 @@
              callState == CCPCall::EStateConnecting ||
              callState == CCPCall::EStateConnected )
             {
-            aCallArray.Append( iEmergencyCall );
-            err = KErrNone;
+            // Ownership of the iEmergencyCall object is not transfered.
+            err = aCallArray.Append( iEmergencyCall );
             }
         }
         
@@ -985,8 +989,8 @@
                 // Do nothing when there is only cscalls
 
                 if ( IsCsPlugin( aCall, ETrue ) )
-                	{
-                	
+                    {
+                    
                     break;
                     }
                     
@@ -1288,24 +1292,24 @@
 // -----------------------------------------------------------------------------
 // 
 TBool CCCECallContainer::GetLifeTime( TDes8& aLifeTimeInfo )
-	{
+    {
     CCELOGSTRING("CCCE::GetLifeTime()");
     
-	CConvergedCallProvider* plugin = NULL;
-	
+    CConvergedCallProvider* plugin = NULL;
+    
     TRAP_IGNORE( plugin = iPluginManager->GetPluginL(KCSServiceId));
     
     if( plugin )
-    	{
-    	plugin->GetLifeTime(aLifeTimeInfo);
-    	}
-	else
-		{
-    	CCELOGSTRING("CCCE::GetLifeTime() - CS plugin not found!");
-    	return EFalse;
-		}
+        {
+        plugin->GetLifeTime(aLifeTimeInfo);
+        }
+    else
+        {
+        CCELOGSTRING("CCCE::GetLifeTime() - CS plugin not found!");
+        return EFalse;
+        }
 
-   	return ETrue;
+    return ETrue;
     }
 
 // -----------------------------------------------------------------------------
@@ -1313,26 +1317,26 @@
 // -----------------------------------------------------------------------------
 // 
 TBool CCCECallContainer::GetCSInfo( CSInfo& aCSInfo )
-	{
+    {
     CCELOGSTRING("CCCE::GetCSInfo()");
 
-	CConvergedCallProvider* plugin = NULL;
-	
-	TRAP_IGNORE( plugin = iPluginManager->GetPluginL(KCSServiceId));
+    CConvergedCallProvider* plugin = NULL;
+    
+    TRAP_IGNORE( plugin = iPluginManager->GetPluginL(KCSServiceId));
         
     
     if( plugin )
-    	{
-    	plugin->GetCSInfo(aCSInfo);
-    	}
-	else
-		{
-    	CCELOGSTRING("CCCE::GetCSInfo() - CS plugin not found!");
-    	return EFalse;
-		}
+        {
+        plugin->GetCSInfo(aCSInfo);
+        }
+    else
+        {
+        CCELOGSTRING("CCCE::GetCSInfo() - CS plugin not found!");
+        return EFalse;
+        }
 
-   	return ETrue;
-	}
+    return ETrue;
+    }
 
 // ---------------------------------------------------------------------------
 // CCCECallContainer::IsCsPlugin