24 #include <StringLoader.h> |
24 #include <StringLoader.h> |
25 #include <aknnotewrappers.h> |
25 #include <aknnotewrappers.h> |
26 #include <cenrepnotifyhandler.h> |
26 #include <cenrepnotifyhandler.h> |
27 #include <ctsydomainpskeys.h> |
27 #include <ctsydomainpskeys.h> |
28 #include <crcseprofileregistry.h> |
28 #include <crcseprofileregistry.h> |
|
29 #include <sipprofile.h> |
|
30 #include <sipmanagedprofileregistry.h> |
29 #include <AknNotiferAppServerApplication.h> // Application Key enable/disable |
31 #include <AknNotiferAppServerApplication.h> // Application Key enable/disable |
30 |
32 |
31 #include "cchuilogger.h" |
33 #include "cchuilogger.h" |
32 #include "cchuicommon.hrh" |
34 #include "cchuicommon.hrh" |
33 #include "cchuinotifierimpl.h" |
35 #include "cchuinotifierimpl.h" |
34 #include "cchuipluginbrandinghandler.h" |
36 #include "cchuipluginbrandinghandler.h" |
35 #include "cchuinotifconnectionhandler.h" |
37 #include "cchuinotifconnectionhandler.h" |
36 #include "cchuicallstatelistener.h" |
38 #include "cchuicallstatelistener.h" |
37 |
39 |
|
40 const TUint32 KBearerSettingWlanOnly = 1; |
38 |
41 |
39 // ======== MEMBER FUNCTIONS ======== |
42 // ======== MEMBER FUNCTIONS ======== |
40 |
43 |
41 CCCHUiNotifierImpl::CCCHUiNotifierImpl() |
44 CCCHUiNotifierImpl::CCCHUiNotifierImpl() |
42 { |
45 { |
53 |
56 |
54 void CCCHUiNotifierImpl::ConstructL() |
57 void CCCHUiNotifierImpl::ConstructL() |
55 { |
58 { |
56 CCCHUiNotifierBase::ConstructL(); |
59 CCCHUiNotifierBase::ConstructL(); |
57 iCallStateListener = CCchUiCallStateListener::NewL( *this ); |
60 iCallStateListener = CCchUiCallStateListener::NewL( *this ); |
|
61 iSipProfileRegistry = CSIPManagedProfileRegistry::NewL( *this ); |
58 } |
62 } |
59 |
63 |
60 CCCHUiNotifierImpl::~CCCHUiNotifierImpl() |
64 CCCHUiNotifierImpl::~CCCHUiNotifierImpl() |
61 { |
65 { |
62 CCHUIDEBUG( "CCCHUiNotifierImpl::~CCCHUiNotifierImpl - IN" ); |
66 CCHUIDEBUG( "CCCHUiNotifierImpl::~CCCHUiNotifierImpl - IN" ); |
1102 // |
1106 // |
1103 TBool CCCHUiNotifierImpl::IsVoIPOverWCDMAAllowedL() |
1107 TBool CCCHUiNotifierImpl::IsVoIPOverWCDMAAllowedL() |
1104 { |
1108 { |
1105 CCHUIDEBUG( "CCCHUiNotifierImpl::IsVoIPOverWCDMAAllowed - IN" ); |
1109 CCHUIDEBUG( "CCCHUiNotifierImpl::IsVoIPOverWCDMAAllowed - IN" ); |
1106 |
1110 |
|
1111 TBool allowed( EFalse ); |
1107 CRCSEProfileRegistry* cRCSEProfileRegistry; |
1112 CRCSEProfileRegistry* cRCSEProfileRegistry; |
1108 cRCSEProfileRegistry = CRCSEProfileRegistry::NewLC(); |
1113 cRCSEProfileRegistry = CRCSEProfileRegistry::NewLC(); |
1109 TBool ret = EFalse; |
1114 |
1110 RPointerArray<CRCSEProfileEntry> entries; |
1115 RPointerArray<CRCSEProfileEntry> entries; |
|
1116 |
|
1117 CleanupStack::PushL( TCleanupItem ( ResetAndDestroy, &entries ) ); //CS |
|
1118 |
1111 cRCSEProfileRegistry->FindByServiceIdL( iServiceId, entries ); |
1119 cRCSEProfileRegistry->FindByServiceIdL( iServiceId, entries ); |
1112 if( entries.Count() ) |
1120 if( entries.Count() ) |
1113 { |
1121 { |
1114 ret = CRCSEProfileEntry::EOn == entries[ 0 ]->iAllowVoIPoverWCDMA; |
1122 RArray<TSettingIds> settingIdArray; |
1115 } |
1123 CleanupClosePushL( settingIdArray ); // CS 3 |
1116 |
1124 settingIdArray = entries[ 0 ]->iIds; |
1117 entries.ResetAndDestroy(); |
1125 TInt sipProfileId( KErrNotFound ); |
1118 entries.Close(); |
1126 for ( TUint i( 0 ) ; i < settingIdArray.Count() ; i++ ) |
1119 CleanupStack::PopAndDestroy(); //cRCSEProfileRegistry |
1127 { |
1120 |
1128 if ( settingIdArray[ i ].iProfileType == |
1121 return ret; |
1129 CRCSEProfileEntry::EProtocolSIP ) |
|
1130 { |
|
1131 sipProfileId = settingIdArray[ i ].iProfileId; |
|
1132 } |
|
1133 } |
|
1134 TUint32 bearerSetting( KErrNone ); |
|
1135 if ( KErrNotFound != sipProfileId ) |
|
1136 { |
|
1137 CSIPProfile* profile = |
|
1138 iSipProfileRegistry->ProfileL( sipProfileId ); |
|
1139 CleanupStack::PushL( profile ); // CS 4 |
|
1140 User::LeaveIfError( |
|
1141 profile->GetParameter( KBearerType, bearerSetting ) ); |
|
1142 if ( KBearerSettingWlanOnly != bearerSetting ) |
|
1143 { |
|
1144 allowed = ETrue; |
|
1145 } |
|
1146 CleanupStack::PopAndDestroy( profile ); // CS 3 |
|
1147 } |
|
1148 CleanupStack::Pop( &settingIdArray ); // CS 2 |
|
1149 } |
|
1150 |
|
1151 CleanupStack::PopAndDestroy( &entries ); // clItem CS 1 |
|
1152 |
|
1153 CleanupStack::PopAndDestroy(); //cRCSEProfileRegistry CS 0 |
|
1154 |
|
1155 return allowed; |
|
1156 } |
|
1157 |
|
1158 // --------------------------------------------------------------------------- |
|
1159 // For deleting RPointerArray in case of leave |
|
1160 // --------------------------------------------------------------------------- |
|
1161 // |
|
1162 void CCCHUiNotifierImpl::ResetAndDestroy( TAny* aPointerArray ) |
|
1163 { |
|
1164 CCHUIDEBUG( "CCCHUiNotifierImpl::ResetAndDestroy - IN" ); |
|
1165 if ( aPointerArray ) |
|
1166 { |
|
1167 RPointerArray<CRCSEProfileEntry>* array = |
|
1168 reinterpret_cast<RPointerArray<CRCSEProfileEntry>*>( aPointerArray ); |
|
1169 TInt i = array->Count(); |
|
1170 array->ResetAndDestroy(); |
|
1171 array->Close(); |
|
1172 } |
|
1173 CCHUIDEBUG( "CCCHUiNotifierImpl::ResetAndDestroy - OUT" ); |
1122 } |
1174 } |
1123 |
1175 |
1124 // --------------------------------------------------------------------------- |
1176 // --------------------------------------------------------------------------- |
1125 // From class CCCHUiNotifierBase. |
1177 // From class CCCHUiNotifierBase. |
1126 // --------------------------------------------------------------------------- |
1178 // --------------------------------------------------------------------------- |
1270 break; |
1322 break; |
1271 } |
1323 } |
1272 |
1324 |
1273 CCHUIDEBUG( "CCCHUiNotifierImpl::CallStateChangedL - End" ); |
1325 CCHUIDEBUG( "CCCHUiNotifierImpl::CallStateChangedL - End" ); |
1274 } |
1326 } |
|
1327 |
|
1328 // --------------------------------------------------------------------------- |
|
1329 // From class MSIPProfileRegistryObserver. |
|
1330 // --------------------------------------------------------------------------- |
|
1331 // |
|
1332 void CCCHUiNotifierImpl::ProfileRegistryEventOccurred( |
|
1333 TUint32 /*aSIPProfileId*/, |
|
1334 TEvent /*aEvent*/ ) |
|
1335 { |
|
1336 } |
|
1337 |
|
1338 |
|
1339 // --------------------------------------------------------------------------- |
|
1340 // From class MSIPProfileRegistryObserver. |
|
1341 // --------------------------------------------------------------------------- |
|
1342 // |
|
1343 void CCCHUiNotifierImpl::ProfileRegistryErrorOccurred( |
|
1344 TUint32 /*aSIPProfileId*/, |
|
1345 TInt /*aError*/ ) |
|
1346 { |
|
1347 } |