logsui/AppSrc/CLogsBaseView.cpp
branchRCL_3
changeset 21 9da50d567e3c
parent 20 f4a778e096c2
equal deleted inserted replaced
20:f4a778e096c2 21:9da50d567e3c
    46 #include <AknsUtils.h>
    46 #include <AknsUtils.h>
    47 #include <logs.mbg>     // logs own icons
    47 #include <logs.mbg>     // logs own icons
    48 #include <LogsApiConsts.h>      //additional event uids
    48 #include <LogsApiConsts.h>      //additional event uids
    49 #include <CPhCltEmergencyCall.h>
    49 #include <CPhCltEmergencyCall.h>
    50 
    50 
    51 #include <Logs.rsg>
    51 #include <logs.rsg>
    52 
    52 
    53 #include "LogsIcons.hrh"
    53 #include "LogsIcons.hrh"
    54 #include "LogsConsts.h"
    54 #include "LogsConsts.h"
    55 #include "LogsConstants.hrh"
    55 #include "LogsConstants.hrh"
    56 #include "LogsUID.h"
    56 #include "LogsUID.h"
  1713     const MLogsEventGetter* aEvent )
  1713     const MLogsEventGetter* aEvent )
  1714     {
  1714     {
  1715     TRACE_ENTRY_POINT;
  1715     TRACE_ENTRY_POINT;
  1716     CAiwGenericParamList& paramList = iServHandlerRef->InParamListL();
  1716     CAiwGenericParamList& paramList = iServHandlerRef->InParamListL();
  1717 
  1717 
       
  1718     // identify the call type to hide the matching call type from the menu
       
  1719     // The call items (voice, video and VoIP are located in the main level
       
  1720     // of the menu when the parameter EGenericParamHideCallSubmenu is passed
       
  1721     // to the aiw provider
       
  1722     if( !this-> OriginalCallMenuIsVisible() && ( NULL!= aEvent )&&( NULL!= aEvent->LogsEventData()))
       
  1723     	{
       
  1724     	TAiwVariant variant;
       
  1725     	
       
  1726     	// Video call
       
  1727         if ( aEvent->LogsEventData()->VT() )
       
  1728             {
       
  1729             variant.Set( EGenericParamVideoCall );
       
  1730             }
       
  1731         // VoIP call
       
  1732         else if ( aEvent->LogsEventData()->VoIP() )
       
  1733             {
       
  1734             variant.Set( EGenericParamVoIPCall );
       
  1735             }
       
  1736         // voice call
       
  1737         else 
       
  1738             {
       
  1739             variant.Set( EGenericParamVoiceCall );            
       
  1740             }
       
  1741         TAiwGenericParam param( EGenericParamHideCallSubmenu, variant );
       
  1742         paramList.AppendL( param );
       
  1743     	}   
  1718     //Check do we provide only voice call (i.e. skip video call option)
  1744     //Check do we provide only voice call (i.e. skip video call option)
  1719     if ( !aVideo ) 
  1745     if ( !aVideo ) 
  1720         {
  1746         {
  1721         TAiwVariant variant;
  1747         TAiwVariant variant;
  1722         TAiwGenericParam param( EGenericParamPhoneNumber, variant );
  1748         TAiwGenericParam param( EGenericParamPhoneNumber, variant );
  1730     //So this would unnecessarily exclude voip calls in which both sip-uri and msisdn is available.
  1756     //So this would unnecessarily exclude voip calls in which both sip-uri and msisdn is available.
  1731     //if( aEvent && aEvent->LogsEventData()->VoIP() && SipUriAvailable( aEvent ) && !aEvent->Number() )
  1757     //if( aEvent && aEvent->LogsEventData()->VoIP() && SipUriAvailable( aEvent ) && !aEvent->Number() )
  1732  
  1758  
  1733 // Sawfish VoIP changes  >>>>
  1759 // Sawfish VoIP changes  >>>>
  1734     TPtrC8 tempPtr( KNullDesC8 );
  1760     TPtrC8 tempPtr( KNullDesC8 );
  1735     TInt result;
  1761     TInt result = KErrNotFound;
  1736     CLogsCntLinkChecker* contactCheckerPtr;
  1762     CLogsCntLinkChecker* contactCheckerPtr;
  1737     result = aEvent->LogsEventData()->GetContactLink( tempPtr );
  1763     if (( NULL!= aEvent )&&( NULL!= aEvent->LogsEventData()))
       
  1764         {
       
  1765          result = aEvent->LogsEventData()->GetContactLink( tempPtr );
       
  1766         }
  1738     
  1767     
  1739     if ( KErrNone == result )
  1768     if ( KErrNone == result )
  1740         {   
  1769         {   
  1741         contactCheckerPtr = Engine()->CntLinkCheckerL();
  1770         contactCheckerPtr = Engine()->CntLinkCheckerL();
  1742         contactCheckerPtr->SetObserver( this );
  1771         contactCheckerPtr->SetObserver( this );
  1780     //Add requested menu options to menu pane
  1809     //Add requested menu options to menu pane
  1781     iServHandlerRef->InitializeMenuPaneL(    
  1810     iServHandlerRef->InitializeMenuPaneL(    
  1782         *aMenuPane,    //Handle of menu pane to initialise                                                  
  1811         *aMenuPane,    //Handle of menu pane to initialise                                                  
  1783         aResourceId,   //MenuResourceId                                                                     
  1812         aResourceId,   //MenuResourceId                                                                     
  1784         KAiwCmdCall,   //Base ID for the handler to generate menu IDs for placeholders                      
  1813         KAiwCmdCall,   //Base ID for the handler to generate menu IDs for placeholders                      
  1785         paramList );   //input parameter list for provider's parameters checking                  
  1814         paramList,     //input parameter list for provider's parameters checking 
       
  1815         EFalse,        //Not use submenu
       
  1816         ETrue );                    
  1786     
  1817     
  1787     TRACE_EXIT_POINT;    
  1818     TRACE_EXIT_POINT;    
  1788     }
  1819     }
  1789 
  1820 
  1790 // --------------------------------------------------------------------------
  1821 // --------------------------------------------------------------------------
  3073         toolbar->DrawDeferred();
  3104         toolbar->DrawDeferred();
  3074         } 
  3105         } 
  3075     TRACE_EXIT_POINT;  
  3106     TRACE_EXIT_POINT;  
  3076     }
  3107     }
  3077 
  3108 
       
  3109 // ----------------------------------------------------------------------------
       
  3110 // CLogsBaseView::OriginalCallMenuIsVisible
       
  3111 // ----------------------------------------------------------------------------
       
  3112 //
       
  3113 TBool CLogsBaseView::OriginalCallMenuIsVisible()
       
  3114 	{
       
  3115 	// Original CallMenu is not visible
       
  3116 	return EFalse;
       
  3117 	}
       
  3118 
  3078 //  End of File
  3119 //  End of File
  3079 
  3120 
  3080 
  3121