phoneclientserver/CallUI/Src/CaUiEngine/CaUiVoIPExtension.cpp
branchRCL_3
changeset 20 987c9837762f
parent 19 7d48bed6ce0c
equal deleted inserted replaced
19:7d48bed6ce0c 20:987c9837762f
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 
    19 
    20 // INCLUDE FILES
    20 // INCLUDE FILES
    21 #include    "cauivoipextension.h" 
    21 #include    "CaUiVoIPExtension.h"
    22 #include    <callui.rsg> 
    22 #include    <CallUI.rsg>
    23 #include    <featmgr.h> 
    23 #include    <featmgr.h> 
    24 #include    <spsettings.h>
    24 #include    <spsettings.h>
    25 #include    <spproperty.h>
    25 #include    <spproperty.h>
    26 #include    <stringloader.h> // String Loader. 
    26 #include    <StringLoader.h>            // String Loader.
    27 
    27 
    28 
    28 
    29 
    29 
    30 // ============================ MEMBER FUNCTIONS ===============================
    30 // ============================ MEMBER FUNCTIONS ===============================
    31 
    31 
    88         {
    88         {
    89         isProfiles = ETrue;
    89         isProfiles = ETrue;
    90         }
    90         }
    91     CleanupStack::PopAndDestroy( &voipServiceIds );
    91     CleanupStack::PopAndDestroy( &voipServiceIds );
    92           
    92           
    93     return isProfiles; 
    93 	return isProfiles; 
    94     }
    94     }
    95 
    95 
    96 // -----------------------------------------------------------------------------
    96 // -----------------------------------------------------------------------------
    97 // CCaUiVoIPExtension::GetVoIPServiceIdsL()
    97 // CCaUiVoIPExtension::GetVoIPServiceIdsL()
    98 // 
    98 // 
   115     
   115     
   116         // go throught all the services and check if any
   116         // go throught all the services and check if any
   117         // of them supports internet call        
   117         // of them supports internet call        
   118         for ( TInt i = 0; idArray.Count() > i; i++)
   118         for ( TInt i = 0; idArray.Count() > i; i++)
   119             {                        
   119             {                        
   120             // check if the service supports internet call                                                              
   120             // check if the service supports internet call                     	                                        
   121             CSPProperty* property = CSPProperty::NewLC();
   121             CSPProperty* property = CSPProperty::NewLC();
   122             // get attribute mask of the service
   122             // get attribute mask of the service
   123             User::LeaveIfError( settingsApi->FindPropertyL( idArray[i], 
   123 
   124                 EPropertyServiceAttributeMask, *property ) );
   124             TInt error = settingsApi->FindPropertyL( idArray[i], 
   125             
   125                 EPropertyServiceAttributeMask, *property );
   126             // read the value of mask property
   126             // read the value of mask property
   127             TInt mask = 0;                    
   127             if ( KErrNone == error )
   128             if ( KErrNone == property->GetValue( mask ) )
       
   129                 {
   128                 {
   130                 if ( ( mask & ESupportsInternetCall )
   129                 TInt mask = 0;                    
   131                     && ( mask & EIsVisibleInCallMenu ) ) 
   130                 if ( KErrNone == property->GetValue( mask ) )
   132                     {
   131                     {
   133                     aVoipServiceIds.Append( idArray[i] );
   132                     if ( ( mask & ESupportsInternetCall )
       
   133                         && ( mask & EIsVisibleInCallMenu ) ) 
       
   134                         {
       
   135                         aVoipServiceIds.Append( idArray[i] );
       
   136                         }
   134                     }
   137                     }
   135                 }
   138                 }   
   136             CleanupStack::PopAndDestroy( property );     
   139             CleanupStack::PopAndDestroy( property );     
   137             }                                   
   140             }                                   
   138         }
   141         }
   139     CleanupStack::PopAndDestroy( 2, settingsApi );
   142     CleanupStack::PopAndDestroy( 2, settingsApi );
   140     }
   143     }