phoneapp/phoneuicontrol/src/cphonecallheadermanager.cpp
branchRCL_3
changeset 62 5266b1f337bd
parent 61 41a7f70b3818
child 81 c26cc2a7c548
equal deleted inserted replaced
61:41a7f70b3818 62:5266b1f337bd
   267 // ---------------------------------------------------------------------------
   267 // ---------------------------------------------------------------------------
   268 //  CPhoneCallHeaderManager::SetCallHeaderType
   268 //  CPhoneCallHeaderManager::SetCallHeaderType
   269 // ---------------------------------------------------------------------------
   269 // ---------------------------------------------------------------------------
   270 //
   270 //
   271 void CPhoneCallHeaderManager::SetCallHeaderType( 
   271 void CPhoneCallHeaderManager::SetCallHeaderType( 
   272     TInt aCallHeaderType )
   272     const CBubbleManager::TPhoneCallTypeFlags aCallHeaderType )
   273     {
   273     {
   274     __LOGMETHODSTARTEND( EPhoneControl, "CPhoneCallHeaderManager::SetCallHeaderType() ");
   274     __LOGMETHODSTARTEND( EPhoneControl, "CPhoneCallHeaderManager::SetCallHeaderType() ");
   275     iCallHeaderParam->SetCallHeaderType( aCallHeaderType ); 
   275     iCallHeaderParam->SetCallHeaderType( aCallHeaderType ); 
   276     }
   276     }
   277 
   277 
   278 // ---------------------------------------------------------------------------
   278 // ---------------------------------------------------------------------------
   279 //  CPhoneCallHeaderManager::~CPhoneCallHeaderManager
   279 //  CPhoneCallHeaderManager::~CPhoneCallHeaderManager
   280 // ---------------------------------------------------------------------------
   280 // ---------------------------------------------------------------------------
   281 //
   281 //
   282 TInt CPhoneCallHeaderManager::CallHeaderType() const
   282 CBubbleManager::TPhoneCallTypeFlags CPhoneCallHeaderManager::CallHeaderType() const
   283     {
   283     {
   284     __LOGMETHODSTARTEND( EPhoneControl, "CPhoneCallHeaderManager::CallHeaderType() ");
   284     __LOGMETHODSTARTEND( EPhoneControl, "CPhoneCallHeaderManager::CallHeaderType() ");
   285     return iCallHeaderParam->CallHeaderType();            
   285     return iCallHeaderParam->CallHeaderType();            
   286     }
   286     }
   287 
   287 
   288 // ---------------------------------------------------------------------------
   288 // ---------------------------------------------------------------------------
   289 //  CPhoneCallHeaderManager::SetDivertIndication
       
   290 // ---------------------------------------------------------------------------
       
   291 //
       
   292 void CPhoneCallHeaderManager::SetDivertIndication( const TBool aDivertIndication )
       
   293     {
       
   294     __LOGMETHODSTARTEND( EPhoneControl, "CPhoneCallHeaderManager::SetDivertIndication()");
       
   295     iCallHeaderParam->SetDivertIndication( aDivertIndication );           
       
   296     }
       
   297 
       
   298 // ---------------------------------------------------------------------------
       
   299 // CPhoneCallHeaderManager::SetPhoneNumberAvailabilityL
   289 // CPhoneCallHeaderManager::SetPhoneNumberAvailabilityL
   300 // ---------------------------------------------------------------------------
   290 // ---------------------------------------------------------------------------
   301 //
   291 //
   302 void CPhoneCallHeaderManager::SetPhoneNumberAvailabilityL( 
   292 void CPhoneCallHeaderManager::SetPhoneNumberAvailabilityL( 
   303         const TInt /*aNumberLength*/,
   293         const TInt aNumberLength,
   304         const TBool /*aContactInfoAvailable*/ )
   294         const TBool aContactInfoAvailable )
   305     {
   295     {
   306     __LOGMETHODSTARTEND( 
   296     __LOGMETHODSTARTEND( 
   307             EPhoneControl, 
   297             EPhoneControl, 
   308             "CPhoneCallHeaderManager::SetPhoneNumberAvailabilityL() ");
   298             "CPhoneCallHeaderManager::SetPhoneNumberAvailabilityL() ");
   309      
   299     TPhoneCmdParamBoolean phoneNumberAvailable;
       
   300     if( aNumberLength || aContactInfoAvailable )
       
   301         {
       
   302         // Phone number is available straight or via contact info
       
   303         // so switch to video/voice call is possible
       
   304         __PHONELOG( EBasic, 
       
   305                 EPhoneControl, 
       
   306                 "CPhoneCallHeaderManager::SetPhoneNumberAvailabilityL - Phonenumber is available" );
       
   307         phoneNumberAvailable.SetBoolean( ETrue );
       
   308         }
       
   309     else
       
   310         {
       
   311         __PHONELOG( EBasic, 
       
   312                 EPhoneControl, 
       
   313                 "CPhoneCallHeaderManager::SetPhoneNumberAvailabilityL - Phonenumber is not available" );
       
   314         phoneNumberAvailable.SetBoolean( EFalse );              
       
   315         }
       
   316     iViewCommandHandle.ExecuteCommandL( 
       
   317             EPhoneViewSetPhoneNumberAvailableInPhoneEngine, 
       
   318             &phoneNumberAvailable );        
   310     }
   319     }
   311 
   320 
   312 // -----------------------------------------------------------
   321 // -----------------------------------------------------------
   313 // CPhoneCallHeaderManager::LoadCallHeaderTexts
   322 // CPhoneCallHeaderManager::LoadCallHeaderTexts
   314 // -----------------------------------------------------------
   323 // -----------------------------------------------------------
   332             aCallHeaderData->SetShortLabelText( shortLabelText );        
   341             aCallHeaderData->SetShortLabelText( shortLabelText );        
   333             }
   342             }
   334         }
   343         }
   335     }
   344     }
   336 
   345 
       
   346 // -----------------------------------------------------------
       
   347 // CPhoneCallHeaderManager::GetInCallNumberTextL
       
   348 // -----------------------------------------------------------
       
   349 //
       
   350 void CPhoneCallHeaderManager::GetInCallNumberTextL( 
       
   351         TInt aCallId, 
       
   352         TDes& aData ) const
       
   353     {
       
   354     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneCallHeaderManager::GetInCallNumberTextL( ) ");    
       
   355     // Display "Call n", n = callId-8 for video and callId+1 for voice call
       
   356     HBufC* tmp = StringLoader::LoadL( 
       
   357         CPhoneMainResourceResolver::Instance()->
       
   358         ResolveResourceID( EPhoneInCallNumberText ), 
       
   359         aCallId + ( IsVideoCall( aCallId ) ? -8 : 1 ), 
       
   360         CCoeEnv::Static() );
       
   361     
       
   362     aData = *tmp;
       
   363     delete tmp;
       
   364     }
       
   365