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 |
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 |
123 User::LeaveIfError( settingsApi->FindPropertyL( idArray[i], |
124 TInt error = settingsApi->FindPropertyL( idArray[i], |
124 EPropertyServiceAttributeMask, *property ) ); |
125 EPropertyServiceAttributeMask, *property ); |
125 |
126 // read the value of mask property |
126 // read the value of mask property |
127 if ( KErrNone == error ) |
127 TInt mask = 0; |
|
128 if ( KErrNone == property->GetValue( mask ) ) |
128 { |
129 { |
129 TInt mask = 0; |
130 if ( ( mask & ESupportsInternetCall ) |
130 if ( KErrNone == property->GetValue( mask ) ) |
131 && ( mask & EIsVisibleInCallMenu ) ) |
131 { |
132 { |
132 if ( ( mask & ESupportsInternetCall ) |
133 aVoipServiceIds.Append( idArray[i] ); |
133 && ( mask & EIsVisibleInCallMenu ) ) |
|
134 { |
|
135 aVoipServiceIds.Append( idArray[i] ); |
|
136 } |
|
137 } |
134 } |
138 } |
135 } |
139 CleanupStack::PopAndDestroy( property ); |
136 CleanupStack::PopAndDestroy( property ); |
140 } |
137 } |
141 } |
138 } |
142 CleanupStack::PopAndDestroy( 2, settingsApi ); |
139 CleanupStack::PopAndDestroy( 2, settingsApi ); |
143 } |
140 } |