cellular/telephonysettings/xqbindings/psetwrapper/src/psetnetworkwrapper_p.cpp
changeset 45 61f927bc9441
parent 32 1f002146abb4
--- a/cellular/telephonysettings/xqbindings/psetwrapper/src/psetnetworkwrapper_p.cpp	Wed Aug 18 10:19:22 2010 +0300
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/src/psetnetworkwrapper_p.cpp	Thu Sep 02 21:00:29 2010 +0300
@@ -49,6 +49,12 @@
     m_psetNetwork->SetNetSAObserver(*this);
     QT_TRAP_THROWING(
         m_psetNetworkMode.reset(psetContainer.CreateNetworkModeObjectL(*this)));
+    QT_TRAP_THROWING(
+        m_refreshHandler.reset(psetContainer.CreateRefreshHandlerL()));
+    QT_TRAP_THROWING(m_refreshHandler->NotifyFileChangeL(
+                *this,
+                KCsp1Ef,
+                EFileChangeNotification));
     
     QT_TRAP_THROWING(m_csp.reset(CPsetCustomerServiceProfile::NewL()));
     QT_TRAP_THROWING(m_csp->OpenCSProfileL());
@@ -461,6 +467,9 @@
     }    
 }
 
+/*!
+     PSetNetworkWrapperPrivate::isManualNetworkSelectionSupported
+*/
 bool PSetNetworkWrapperPrivate::isManualNetworkSelectionSupported() const
 {
     DPRINT << ": IN ";
@@ -478,3 +487,39 @@
     return settingSupported;
 }
 
+/*!
+     PSetNetworkWrapperPrivate::AllowRefresh
+*/
+TBool PSetNetworkWrapperPrivate::AllowRefresh(
+                const TSatRefreshType aType,
+                const TSatElementaryFiles aFiles )
+{
+    DPRINT << "aType: " << aType;
+    DPRINT << "aFiles: " << aFiles;
+    
+    return ETrue;
+}
+
+/*!
+     PSetNetworkWrapperPrivate::Refresh
+*/
+void PSetNetworkWrapperPrivate::Refresh(
+                const TSatRefreshType aType,
+                const TSatElementaryFiles aFiles )
+{
+    DPRINT << "aType: " << aType;
+    DPRINT << "aFiles: " << aFiles;
+    
+    if ((aType != EFileChangeNotification) ||
+        ((aType == EFileChangeNotification) &&
+        (aFiles == KCsp1Ef))) {
+        TBool networkSelectionSupported;
+        if (KErrNone == m_csp->IsNetworkSelectionSupported(networkSelectionSupported)) {
+            DPRINT << "networkSelectionSupported " << networkSelectionSupported;
+            emit m_owner.chageVisbilityOfManualNetworkSelection(networkSelectionSupported);
+        }
+    }
+    
+    DPRINT << ": OUT";
+}
+