201043 default
authorhgs
Thu, 28 Oct 2010 13:13:30 +0300
changeset 73 70ee5458c95d
parent 72 0c32cf868819
201043
alwayson_net_plugin/pdpcontextmanager2/src/caoconnectionmanager.cpp
alwayson_net_plugin/pdpcontextmanager2/src/caosettings.cpp
bearermanagement/S60MCPR/src/s60mcprsimpleselectactivity.cpp
bearermanagement/S60MCPR/src/s60mpmrequests.cpp
bearermanagement/mpm/inc/mpmcommsdataccess.h
bearermanagement/mpm/inc/mpmconnmonevents.h
bearermanagement/mpm/inc/mpmserver.h
bearermanagement/mpm/inc/mpmsuttest.h
bearermanagement/mpm/src/mpmcommsdataccess.cpp
bearermanagement/mpm/src/mpmconnmonevents.cpp
bearermanagement/mpm/src/mpmiapselection.cpp
bearermanagement/mpm/src/mpmlauncher.cpp
bearermanagement/mpm/src/mpmserver.cpp
bearermanagement/mpm/src/mpmserversession.cpp
bearermanagement/mpm/src/rmpm.cpp
cmmanager/cmmanager.pro
cmmanager/cmmgr/cmmserver/group/bld.inf
cmmanager/cmmgr/cmmserver/rom/cmmanager_resources.iby
cmmanager/cpdestinationplugin/src/cpdestinationentryitem.cpp
connectionmonitoring/connectionview/connectionview.pro
connectionmonitoring/connectionview/inc/connectionview.h
connectionmonitoring/connectionview/inc/scrollareawidget.h
connectionmonitoring/connectionview/src/connectionview.cpp
connectionmonitoring/connectionview/src/scrollareawidget.cpp
connectionmonitoring/connmon/dataconnectionlogger/inc/dclTimer.h
connectionmonitoring/connmon/dataconnectionlogger/src/dcl.cpp
connectionmonitoring/connmon/dataconnectionlogger/src/dclTimer.cpp
connectionmonitoring/connmon/dataconnectionlogger/src/saeobserver.cpp
connectionmonitoring/indicatorobserver/inc/indicatorobserver.h
connectionmonitoring/indicatorobserver/indicatorobserver.pro
connectionmonitoring/indicatorobserver/src/indicatorobserver.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/cellulardataconfirmation.cpp
connectionutilities/ConnectionDialogs/group/bld.inf
connectionutilities/ConnectionDialogs/rom/connectionstatuspopups_resources.iby
connectionutilities/connectionutilities.pro
--- a/alwayson_net_plugin/pdpcontextmanager2/src/caoconnectionmanager.cpp	Wed Oct 27 18:01:02 2010 +0300
+++ b/alwayson_net_plugin/pdpcontextmanager2/src/caoconnectionmanager.cpp	Thu Oct 28 13:13:30 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004,2006 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -418,11 +418,16 @@
                                        connInfo, 
                                        iSettings, 
                                        &iSocketServ );
-                                   
-        iLingerArray.Append( ptr );
+
+        err = iLingerArray.Append( ptr );
+        if ( err )
+            {
+            LOG_2( _L("iLingerArray.Append: err: %d"), err );
+            delete ptr;
+            return;
+            }
         }
-                                   
-                                           
+
     if ( iSettings.AccessPointId() == aIapId )
         {
         // Always-on-iap
--- a/alwayson_net_plugin/pdpcontextmanager2/src/caosettings.cpp	Wed Oct 27 18:01:02 2010 +0300
+++ b/alwayson_net_plugin/pdpcontextmanager2/src/caosettings.cpp	Thu Oct 28 13:13:30 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004,2006 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -509,53 +509,57 @@
 void CAOSettings::UpdateLingerTimerSetting()
     {
     LOG_1( _L("CAOSettings::UpdateLingerTimerSetting"));
-        
+
     TInt           count( 0 );
     TInt           err( KErrNone );
     TLingerSetting ls;
-        
+
     iLingerSettings.Reset();
-    
+
     // Get number of entries (iapId&linger) in Centrep
     err = iRepository->Get( KPdpContextManagerLingerArrayCount, count );
-        
+
     if ( err == KErrNone )
         {
         // read all entries from Centrep
         for ( TInt row=1; row <= count; row++ )
             {
-            err = iRepository->Get( ( KIapColumn | row ), ls.iIap ); 
-        
+            err = iRepository->Get( ( KIapColumn | row ), ls.iIap );
+
             if ( err == KErrNone )
                 {
-                err = iRepository->Get( ( KLingerColumn | row ), ls.iInterval );     
+                err = iRepository->Get( ( KLingerColumn | row ), ls.iInterval );
                 }
-                
-            if ( err == KErrNone ) 
+
+            if ( err == KErrNone )
                 {
-                iLingerSettings.Append( ls );    
+                err = iLingerSettings.Append( ls );
+                if ( err )
+                    {
+                    LOG_2( _L("iLingerSettings.Append >> err: %d"), err);
+                    }
                 }
             else
                 {
                 LOG_3( _L("CRepository::Get() failed >> err: %d, row: %d"),
                 err, row);
-                
-                return;        
-                }    
+
+                break; // for-loop
+                }
             }
         }
     else
         {
         LOG_2( _L("CRepository::Get( KPdpContextManagerLingerArrayCount) >> err: %d"),
-                err);       
-        }        
-      
-    // Write to log    
+                err);
+        }
+
+    // Write to log
     for ( TInt j=0; j < iLingerSettings.Count(); j++ )
         {
         LOG_3( _L("iLingerSettings >> iap: %d, interval: %d"),
         iLingerSettings[ j ].iIap,
-        iLingerSettings[ j ].iInterval);    
+        iLingerSettings[ j ].iInterval);
         }
     }
 
--- a/bearermanagement/S60MCPR/src/s60mcprsimpleselectactivity.cpp	Wed Oct 27 18:01:02 2010 +0300
+++ b/bearermanagement/S60MCPR/src/s60mcprsimpleselectactivity.cpp	Thu Oct 28 13:13:30 2010 +0300
@@ -632,6 +632,20 @@
         TPolicyConnPref* policypref = (TPolicyConnPref*)aCompletedRequest.iPolicyPref;
 
         iNode.SetPolicyPrefs( *policypref );
+        
+        // Change APId to match SNAP if available.
+        // policypref valid, will PolicyResponse not called otherwise.
+        //
+        TUint32 snap = policypref->SnapAPId();      
+        if ( snap > 0 )
+            {
+            S60MCPRLOGSTRING2("S60MCPR<%x>::CChooseBestIAPCb::PolicyResponse() MCPR Id changed to %d",
+                    (TInt*)&iNode,snap)
+                    
+            // Change the provider info so that it can be found by parties joining to certain SNAP.                    
+            const TProviderInfo& pi = iNode.ProviderInfo();
+            iNode.SetProviderInfo( TProviderInfo( pi.TierId(), snap, &iNode ));
+            }
 
         S60MCPRLOGSTRING3("S60MCPR<%x>::CChooseBestIAPCb::PolicyResponse() IAP %d NET %d",
                   (TInt*)&iNode,policypref->IapId(),policypref->NetId())
--- a/bearermanagement/S60MCPR/src/s60mpmrequests.cpp	Wed Oct 27 18:01:02 2010 +0300
+++ b/bearermanagement/S60MCPR/src/s60mpmrequests.cpp	Thu Oct 28 13:13:30 2010 +0300
@@ -479,7 +479,7 @@
         PolicyRequest policydata = PolicyRequest();
         policydata.iRequestType  = EPolicyRequestConnect;
         // OK because default granularity is 8 and this is done when first request arrives.
-        iPolicyRequests.Insert(policydata, 0);
+        (void) iPolicyRequests.Insert( policydata, 0 );
         }
 
     S60MCPRLOGSTRING2( "S60MCPR::CMPMPolicyRequests<%x>::IssueRequest() iRequestType %d", this, (TInt)iPolicyRequests[0].iRequestType )
--- a/bearermanagement/mpm/inc/mpmcommsdataccess.h	Wed Oct 27 18:01:02 2010 +0300
+++ b/bearermanagement/mpm/inc/mpmcommsdataccess.h	Thu Oct 28 13:13:30 2010 +0300
@@ -278,7 +278,7 @@
         * @param aIapId Iap id of the connection.
         * @return Type of the bearer.
         */
-        TMPMBearerType GetBearerTypeL( TUint32 aIapId );
+        TMPMBearerType GetBearerTypeL( const TUint32 aIapId );
 
        /**
         * Check if snap is empty.
--- a/bearermanagement/mpm/inc/mpmconnmonevents.h	Wed Oct 27 18:01:02 2010 +0300
+++ b/bearermanagement/mpm/inc/mpmconnmonevents.h	Thu Oct 28 13:13:30 2010 +0300
@@ -117,7 +117,7 @@
         * @since 3.2
         * @param aConnId Connection Id.
         */                
-        void AppendConnInfo( const TUint& aConnId );
+        void AppendConnInfoL( const TUint& aConnId );
 
         /**
         * Removing connection info.
--- a/bearermanagement/mpm/inc/mpmserver.h	Wed Oct 27 18:01:02 2010 +0300
+++ b/bearermanagement/mpm/inc/mpmserver.h	Thu Oct 28 13:13:30 2010 +0300
@@ -469,10 +469,8 @@
         * @param aConnId Connection Id
         * @param aIapId IAP Id of the connection.
         * @param aCategory Either connection lifetime or temporary. 
-        * @return KErrNone if successful, otherwise one of the
-        * system-wide error codes 
         */
-        TInt HandleServerBlackListIap( const TConnectionId   aConnId, 
+        void HandleServerBlackListIap( const TConnectionId   aConnId, 
                                        TUint32               aIapId, 
                                        TBlacklistCategory    aCategory );
 
@@ -482,10 +480,8 @@
         * @param aConnId Connection Id
         * @param aIapId IAP Id of the connection.
         * @param aCategory Either connection lifetime or temporary. 
-        * @return KErrNone if successful, otherwise one of the
-        * system-wide error codes 
         */
-        TInt BlackListIap( const TConnectionId   aConnId, 
+        void BlackListIap( const TConnectionId   aConnId, 
                            TUint32               aIapId, 
                            TBlacklistCategory    aCategory );
 
@@ -513,18 +509,16 @@
         * @since 3.1
         * @param aConnId Connection Id
         * @param aBlacklistedIAP returns blacklisted iaps.
-        * @return KErrNone if successful.
         */
-        TInt GetBlacklistedIAP( TConnectionId    aConnId, 
+        void GetBlacklistedIAP( TConnectionId    aConnId, 
                                 RArray<TUint32> &aBlacklistedIAP );
 
         /**
         * Get all blacklisted IAPs.
         * @since 3.2
         * @param aBlacklistedIAP returns blacklisted iaps.
-        * @return KErrNone if successful.
         */
-        TInt GetBlacklistedIAP( RArray<TUint32> &aBlacklistedIAP );
+        void GetBlacklistedIAP( RArray<TUint32> &aBlacklistedIAP );
 
         /**
         * Set the ConnMonEvents object.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bearermanagement/mpm/inc/mpmsuttest.h	Thu Oct 28 13:13:30 2010 +0300
@@ -0,0 +1,25 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This header is only used for testing purposes.
+*
+*/
+
+#ifndef MPMSUTTEST_H
+#define MPMSUTTEST_H
+
+//#define _MPM_SUT_TEST_EMULATOR
+
+#endif // MPMSUTTEST_H
+
+// End of file
--- a/bearermanagement/mpm/src/mpmcommsdataccess.cpp	Wed Oct 27 18:01:02 2010 +0300
+++ b/bearermanagement/mpm/src/mpmcommsdataccess.cpp	Thu Oct 28 13:13:30 2010 +0300
@@ -125,9 +125,12 @@
         TUint snapId = dnRecord->iSNAP;
         MPMLOGSTRING2( "CMPMCommsDatAccess::FindAllSnapsL snap %d", snapId )
 
-        // Insert unique ids to array
-        //
-        aSnapIds.InsertInOrder( snapId );
+        // Insert unique IDs to array.
+        TInt err = aSnapIds.InsertInOrder( snapId );
+        if ( err && err != KErrAlreadyExists )
+            {
+            User::Leave( err );
+            }
         delete dnRecord;
         }
 
@@ -240,7 +243,7 @@
                 // during the validation of next IAP to support 
                 // using existing WLAN connection SSID.
                 //
-                aSession.MyServer().Events()->AppendConnInfo( aConnId );
+                aSession.MyServer().Events()->AppendConnInfoL( aConnId );
                 aSession.MyServer().Events()->SetConnInfo( aConnId, 
                                                            aIapId, 
                                                            presumedIapId, 
@@ -302,7 +305,7 @@
         // during the validation of next IAP to support 
         // using existing PDP context per APN.
         //
-        aSession.MyServer().Events()->AppendConnInfo( aConnId );
+        aSession.MyServer().Events()->AppendConnInfoL( aConnId );
         aSession.MyServer().Events()->SetConnInfo( aConnId, 
                                                    aIapId, 
                                                    presumedIapId, 
@@ -552,8 +555,8 @@
         // 
         if ( found && KErrNotFound == prevRecordIds.Find( linkedAP->RecordId() ) )
             {
-            prevRecordIds.Append( linkedAP->RecordId() );
-            
+            prevRecordIds.AppendL( linkedAP->RecordId() );
+
             // Print the DN and host name pointed by DN-IAP entry.
             // HostName is EText field.
             // 
@@ -1414,8 +1417,8 @@
 
         if ( found && KErrNotFound == prevRecordIds.Find( linkedAP->RecordId() ) )
             {
-            prevRecordIds.Append( linkedAP->RecordId() );
-            
+            prevRecordIds.AppendL( linkedAP->RecordId() );
+
             // Print the DN and host name pointed by DN-IAP entry.
             // HostName is EText field.
             // 
@@ -1581,7 +1584,7 @@
         {
         // append this Iap to path
         //
-        aIapPath.Append( aVirtualIapId );
+        aIapPath.AppendL( aVirtualIapId );
         }
     else
         {
@@ -1767,8 +1770,7 @@
             if ( elem.iRanking > 0 )
                 {
                 // Insert elem into RArray
-                // 
-                aDestNetIds.InsertInOrderAllowRepeats(elem, TNetIap::CompareRanking);
+                aDestNetIds.InsertInOrderAllowRepeatsL( elem, TNetIap::CompareRanking );
                 }
             else
                 {
@@ -1893,7 +1895,7 @@
                 //	
                 if ( aAvailableIAPList[i] != aVirtualIapId )
                     {
-                    tempList.Append( aAvailableIAPList[i] );
+                    tempList.AppendL( aAvailableIAPList[i] );
                     }
                 }
             aSession.IapSelectionL()->ChooseBestIAPL( tempMpmConnPref, tempList );
@@ -2178,51 +2180,51 @@
 // CMPMCommsDatAccess::GetBearerTypeL
 // -----------------------------------------------------------------------------
 //
-TMPMBearerType CMPMCommsDatAccess::GetBearerTypeL( TUint32 aIapId )
+TMPMBearerType CMPMCommsDatAccess::GetBearerTypeL( const TUint32 aIapId )
     {
     MPMLOGSTRING( "CMPMCommsDatAccess::GetBearerTypeL" )
     TMPMBearerType bearerType = EMPMBearerTypeOther;
-    RArray<TUint32> wlanArray;
-    
+
     CMDBSession* db = CMDBSession::NewLC( KCDVersion1_1 );
-    
-    CleanupClosePushL( wlanArray );
-    BuildWlanArrayL(*db, wlanArray);
-    
     CCDIAPRecord* record = LoadIapRecordLC( aIapId, db );
-    
-    TBuf<KMaxTextLength> bearerTypeName( record->iBearerType.GetL() );
+
     TBuf<KMaxTextLength> serviceTypeName( record->iServiceType.GetL() );
-        
+
     if ( ( serviceTypeName == TPtrC( KCDTypeNameOutgoingWCDMA ) ) ||
-         ( serviceTypeName == TPtrC( KCDTypeNameIncomingWCDMA ) ) )
+            ( serviceTypeName == TPtrC( KCDTypeNameIncomingWCDMA ) ) )
         {
         // Packet data
         bearerType = EMPMBearerTypePacketData;
         }
-    else if ( serviceTypeName == TPtrC( KCDTypeNameLANService ) )
+    else
         {
-        // LAN or WLAN
-        TUint32 bearerId( record->iBearer );
-            
-        if ( ( bearerTypeName == TPtrC( KCDTypeNameLANBearer ) ) &&
-             ( IsWlanBearer( wlanArray, record->iBearer ) ) )
+        TBuf<KMaxTextLength> bearerTypeName( record->iBearerType.GetL() );
+        if ( serviceTypeName == TPtrC( KCDTypeNameLANService ) )
             {
-            // WLAN
-            bearerType = EMPMBearerTypeWlan;
+            // LAN or WLAN
+            RArray<TUint32> wlanArray;
+            CleanupClosePushL( wlanArray );
+            BuildWlanArrayL( *db, wlanArray );
+
+            if ( ( bearerTypeName == TPtrC( KCDTypeNameLANBearer ) ) &&
+                    ( IsWlanBearer( wlanArray, record->iBearer ) ) )
+                {
+                // WLAN
+                bearerType = EMPMBearerTypeWlan;
+                }
+            CleanupStack::PopAndDestroy( &wlanArray );
+            }
+        else if ( ( bearerTypeName == TPtrC( KCDTypeNameVirtualBearer ) ) &&
+                ( serviceTypeName == TPtrC ( KCDTypeNameVPNService ) ) )
+            {
+            // VPN
+            bearerType = EMPMBearerTypeVpn;
             }
         }
-    else if ( ( bearerTypeName == TPtrC( KCDTypeNameVirtualBearer ) ) &&
-              ( serviceTypeName == TPtrC ( KCDTypeNameVPNService ) ) )
-        {
-        // VPN
-        bearerType = EMPMBearerTypeVpn;
-        }
-    
+
     CleanupStack::PopAndDestroy( record );
-    CleanupStack::PopAndDestroy( &wlanArray );
     CleanupStack::PopAndDestroy( db );
-    
+
     return bearerType;
     }
 
--- a/bearermanagement/mpm/src/mpmconnmonevents.cpp	Wed Oct 27 18:01:02 2010 +0300
+++ b/bearermanagement/mpm/src/mpmconnmonevents.cpp	Thu Oct 28 13:13:30 2010 +0300
@@ -127,18 +127,18 @@
 // -----------------------------------------------------------------------------
 // CMPMConnMonEvents::AppendConnInfo
 // -----------------------------------------------------------------------------
-// 
-void CMPMConnMonEvents::AppendConnInfo( const TUint& aConnId  )
+//
+void CMPMConnMonEvents::AppendConnInfoL( const TUint& aConnId )
     {
     TInt index( KErrNotFound );
     TConnInfo info;
-    
+
     info.iConnId = aConnId;
     index = iConnInfoArray.Find( info );
 
     if ( index == KErrNotFound )
         {
-        iConnInfoArray.Append( info );
+        iConnInfoArray.AppendL( info );
         }
     }
 
--- a/bearermanagement/mpm/src/mpmiapselection.cpp	Wed Oct 27 18:01:02 2010 +0300
+++ b/bearermanagement/mpm/src/mpmiapselection.cpp	Thu Oct 28 13:13:30 2010 +0300
@@ -22,7 +22,9 @@
 #include "mpmconnmonevents.h"
 #include "mpmconfirmdlgstarting.h"
 #include "extendedconnpref.h"
-
+// ONLY for SUT Emualtor test purpose, a flag is defined in the header file 
+#include "mpmsuttest.h"
+// end of define
 // ---------------------------------------------------------------------------
 // CMPMIapSelection::CMPMIapSelection
 // ---------------------------------------------------------------------------
@@ -575,6 +577,24 @@
 //
 TBool CMPMIapSelection::CheckGprsServicesAllowedL( TBool aIapLanOrWlan )
     {
+#ifdef _MPM_SUT_TEST_EMULATOR
+    MPMLOGSTRING( "CMPMIapSelection::CheckGprsServicesAllowedL, SUT test ONLY" )
+    TBool retVal = iSession->MyServer().IsVoiceCallActiveL();
+    TBool retVal2 = iSession->MyServer().IsModeGSM();   
+    if ( !iSession->MyServer().IsDTMSupported() )
+        {
+        if( retVal == EFalse || retVal2 == EFalse )
+            {
+            return ETrue;
+            }        
+        if ( !aIapLanOrWlan )
+            {
+            MPMLOGSTRING( "CMPMIapSelection::CheckGprsServicesAllowedL not allowed" )
+            return EFalse;
+            }
+        }
+    return ETrue;
+#endif
     if ( iSession->MyServer().IsVoiceCallActiveL() )
         {
         // Check whether we are in GSM or 3G mode.
--- a/bearermanagement/mpm/src/mpmlauncher.cpp	Wed Oct 27 18:01:02 2010 +0300
+++ b/bearermanagement/mpm/src/mpmlauncher.cpp	Thu Oct 28 13:13:30 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -20,26 +20,22 @@
 Mobility Policy Manager client DLL entry point.
 */
 
-// INCLUDE FILES
 #include <e32std.h>
 #include "mpmlauncher.h"
 #include "mpmlogger.h"
 
-// ============================= LOCAL FUNCTIONS ===============================
-
-// ============================ MEMBER FUNCTIONS ===============================
 
 // -----------------------------------------------------------------------------
 // MPMLauncher::LaunchServer
 // -----------------------------------------------------------------------------
 //
 TInt MPMLauncher::LaunchServer(
-    const TDesC& aServerFileName,
-    const TUid& aServerUid2,
-    const TUid& aServerUid3)
+        const TDesC& aServerFileName,
+        const TUid& aServerUid2,
+        const TUid& aServerUid3 )
     {
     MPMLOGSTRING("MPMLauncher::LaunchServer")
-    const TUidType serverUid(KNullUid,aServerUid2,aServerUid3);
+    const TUidType serverUid( KNullUid, aServerUid2, aServerUid3 );
     RSemaphore semaphore;
     TInt err( KErrNone );
 
@@ -47,15 +43,15 @@
     if ( err != KErrNone )
         {
         // Creating semaphore failed, which means some other thread is
-        // creating the server right. Propagate error KErrServerBusy
+        // creating the server right now. Propagate error KErrServerBusy
         // to inform the client it should try connecting again.
         return KErrServerBusy;
         }
-    
+
     MPMLOGSTRING("Create a new server process")
     RProcess server;
-    TInt r=server.Create(aServerFileName,KNullDesC,serverUid);
-    
+    TInt r = server.Create( aServerFileName, KNullDesC, serverUid );
+
     if ( r != KErrNone )
         {
         MPMLOGSTRING2("Server process creation returned error: %d", r)
@@ -63,28 +59,23 @@
         return r;
         }
     TRequestStatus stat;
-    server.Rendezvous(stat);
+    server.Rendezvous( stat );
     if ( stat != KRequestPending )
         {
-        server.Kill(0);        // abort startup
+        server.Kill( 0 ); // Abort startup.
         }
     else
         {
-        server.Resume();    // logon OK - start the server
+        server.Resume(); // Start the server.
         }
-    User::WaitForRequest(stat);        // wait for start or death
-    // we can't use the 'exit reason' if the server panicked as this
+    User::WaitForRequest( stat ); // Wait for start or death.
+    // We can't use the 'exit reason' if the server panicked as this
     // is the panic 'reason' and may be '0' which cannot be distinguished
-    // from KErrNone
+    // from KErrNone.
     r = ( server.ExitType() == EExitPanic ) ? KErrGeneral : stat.Int();
     server.Close();
     semaphore.Close();
     return r;
     }
 
-
-// ========================== OTHER EXPORTED FUNCTIONS =========================
-
-
-//  End of File 
-
+// End of File
--- a/bearermanagement/mpm/src/mpmserver.cpp	Wed Oct 27 18:01:02 2010 +0300
+++ b/bearermanagement/mpm/src/mpmserver.cpp	Thu Oct 28 13:13:30 2010 +0300
@@ -401,7 +401,11 @@
         {
         // If this connInfo is not yet there, insert it at the end of array
         //
-        iActiveBMConns.Append( conn );
+        TInt err = iActiveBMConns.Append( conn );
+        if ( err )
+            {
+            MPMLOGSTRING2( "CMPMServer::AppendBMConnection - CRITICAL ERROR, append failed with %d", err )
+            }
         }
     else
         {
@@ -972,129 +976,64 @@
 // CMPMServer::HandleServerBlackListIap
 // -----------------------------------------------------------------------------
 //
-TInt CMPMServer::HandleServerBlackListIap( const TConnectionId  aConnId,
-                                           TUint32              aIapId, 
-                                           TBlacklistCategory   aCategory )
+void CMPMServer::HandleServerBlackListIap(
+        const TConnectionId aConnId,
+        TUint32 aIapId,
+        TBlacklistCategory aCategory )
     {
-    MPMLOGSTRING3(
-        "CMPMServer::HandleServerBlackListIap - aConnId = 0x%x, iapId = %i",
-        aConnId, aIapId )
-
-    MPMLOGSTRING2(
-        "CMPMServer::HandleServerBlackListIap - aCategory = %i", aCategory )
-
-    BlackListIap( aConnId, aIapId, aCategory ); 
+    MPMLOGSTRING3( "CMPMServer::HandleServerBlackListIap - aConnId = 0x%x, iapId = %i", aConnId, aIapId )
+    MPMLOGSTRING2( "CMPMServer::HandleServerBlackListIap - aCategory = %i", aCategory )
 
-    TUint32 presumedIap = Events()->PresumedIapId( aConnId, 
-                                                   aIapId );
-    if ( ( presumedIap != 0 ) && 
-         ( presumedIap != aIapId ) )
+    BlackListIap( aConnId, aIapId, aCategory );
+
+    TUint32 presumedIap = Events()->PresumedIapId( aConnId, aIapId );
+    if ( ( presumedIap != 0 ) && ( presumedIap != aIapId ) )
         {
-        MPMLOGSTRING2(
-            "CMPMServer::HandleServerBlackListIap - presumedIap = %i",
-            presumedIap )
-        BlackListIap( aConnId, presumedIap, aCategory ); 
+        MPMLOGSTRING2( "CMPMServer::HandleServerBlackListIap - presumedIap = %i", presumedIap )
+        BlackListIap( aConnId, presumedIap, aCategory );
         }
-
-    return KErrNone;
     }
 
-
 // -----------------------------------------------------------------------------
 // CMPMServer::BlackListIap
 // -----------------------------------------------------------------------------
 //
-TInt CMPMServer::BlackListIap( const TConnectionId  aConnId,
-                               TUint32              aIapId, 
-                               TBlacklistCategory   aCategory )
+void CMPMServer::BlackListIap(
+        const TConnectionId aConnId,
+        TUint32 aIapId,
+        TBlacklistCategory aCategory )
     {
-    TInt i;
-    TBool found = EFalse;
+    TInt index( 0 );
+    TBool found( EFalse );
 
-    found = FindBlacklistedConnIndex( aConnId, i );
+    found = FindBlacklistedConnIndex( aConnId, index );
     if ( found )
         {
-        TMPMBlackListConnId connIdInfo = iBlackListIdList[i];
+        TMPMBlackListConnId connIdInfo = iBlackListIdList[index];
         connIdInfo.Append( aIapId, aCategory );
-        iBlackListIdList.Remove( i );
-        iBlackListIdList.Insert( connIdInfo, 0 );
+        // Since TMPMBlackListConnId is NOT really a T-class, Remove() then Insert() is necessary.
+        iBlackListIdList.Remove( index );
+        (void) iBlackListIdList.Insert( connIdInfo, 0 ); // Errors ignored intentionally.
         }
     else
         {
+        TInt err( KErrNone );
         TMPMBlackListConnId connIdInfo;
         connIdInfo.iConnId = aConnId;
         connIdInfo.Append( aIapId, aCategory );
-        iBlackListIdList.Insert( connIdInfo, 0 );
-        }
-
-    return KErrNone;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CMPMServer::HandleServerUnblackListIap
-// -----------------------------------------------------------------------------
-//
-TInt CMPMServer::HandleServerUnblackListIap( 
-    const TConnectionId aConnId,
-    TUint32             aIapId )
-    {
-    MPMLOGSTRING3(
-        "CMPMServer::HandleServerUnblackListIap - aConnId = 0x%x, iapId = %i"
-        ,aConnId, aIapId )
-
-    TInt i;
-    TBool found = EFalse;
-
-    found = FindBlacklistedConnIndex( aConnId, i );
-    if ( found )
-        {
-        // found blacklisted Connection Id
-        TMPMBlackListConnId connIdInfo = iBlackListIdList[i];
-        iBlackListIdList.Remove( i ); // remove from the list 
-        
-        MPMLOGSTRING2( "CMPMServer::HandleServerUnblackListIap - \
-connIdInfo count: %d", connIdInfo.Count() )
-
-        if ( aIapId == 0 )
-            { // 0 will reset Connection Id blacklisted iap list 
-            MPMLOGSTRING( "CMPMServer::HandleServerUnblackListIap - \
-reset Connection Id blacklisted iap list" )
-
+        if ( connIdInfo.Count() > 0 )
+            {
+            err = iBlackListIdList.Insert( connIdInfo, 0 );
+            }
+        else
+            {
+            err = KErrNoMemory; // Append failed.
+            }
+        if ( err )
+            {
+            MPMLOGSTRING2( "CMPMServer::BlackListIap - array insert failed, err %d", err )
             connIdInfo.Close();
-            return KErrNone;
             }
-
-        found = EFalse;
-        for (TInt j = 0; j < connIdInfo.Count(); j++)
-            {
-            if ( connIdInfo.Iap( j ) == aIapId )
-                {
-                // found and remove blacklisted iap
-                connIdInfo.Remove( j ); 
-                MPMLOGSTRING2( "CMPMServer::HandleServerUnblackListIap - \
-removed blacklisted iap in index = %d", j )
-                
-                if ( connIdInfo.Count() == 0 )
-                    {
-                    return KErrNone;
-                    }
-
-                // reinsert connIdInfo at the beginning to reflect activeness
-                iBlackListIdList.Insert( connIdInfo, 0 ); 
-                return KErrNone;
-                }
-            }
-        // nothing found and reinsert at the beginning 
-        // connIdInfo to reflect activeness
-        iBlackListIdList.Insert( connIdInfo, 0 ); 
-        return KErrNotFound;
-        }
-    else
-        {
-        MPMLOGSTRING( "CMPMServer::HandleServerUnblackListIap - \
-not found blacklisted Connection Id" )
-        return KErrNotFound;
         }
     }
 
@@ -1102,40 +1041,97 @@
 // CMPMServer::HandleServerUnblackListIap
 // -----------------------------------------------------------------------------
 //
-void CMPMServer::HandleServerUnblackListIap( 
-    TBlacklistCategory  aCategory )
+TInt CMPMServer::HandleServerUnblackListIap(
+        const TConnectionId aConnId,
+        TUint32 aIapId )
     {
-    MPMLOGSTRING3( "CMPMServer::HandleServerUnblackListIap -\
-aCategory = %i blacklisted Id count = %d", 
-                   aCategory, iBlackListIdList.Count() )
+    MPMLOGSTRING3( "CMPMServer::HandleServerUnblackListIap - aConnId = 0x%x, iapId = %i", aConnId, aIapId )
+
+    TInt result( KErrNone );
+    TInt index( 0 );
+    TBool found = EFalse;
 
-    for (TInt i = iBlackListIdList.Count()-1; i >= 0; i--)
+    found = FindBlacklistedConnIndex( aConnId, index );
+    if ( found )
         {
-        // found blacklisted Connection Id
-        TMPMBlackListConnId connIdInfo = iBlackListIdList[i];
-        iBlackListIdList.Remove( i ); // remove from the list 
+        // Found blacklist for connection ID.
+        TMPMBlackListConnId connIdInfo = iBlackListIdList[index];
+        MPMLOGSTRING2( "CMPMServer::HandleServerUnblackListIap - connIdInfo count: %d", connIdInfo.Count() )
+
+        if ( aIapId == 0 )
+            {
+            // ID 0 will reset blacklist for this connection ID.
+            MPMLOGSTRING( "CMPMServer::HandleServerUnblackListIap - reset Connection Id blacklisted iap list" );
 
-        MPMLOGSTRING3( "CMPMServer::HandleServerUnblackListIap - \
-aConnId = 0x%x, blacklisted IapId count = %d", connIdInfo.iConnId, 
-        connIdInfo.Count() )
-        
-        for (TInt j = connIdInfo.Count()-1; j >= 0; j--)
+            iBlackListIdList.Remove( index ); // Remove blacklist from array.
+            connIdInfo.Close();
+            result = KErrNone;
+            }
+        else
             {
-            if ( connIdInfo.Category( j ) == aCategory ) 
+            result = KErrNotFound;
+            for ( TInt j = 0; j < connIdInfo.Count(); j++ )
                 {
-                // found and remove blacklisted iap
-                MPMLOGSTRING3( "CMPMServer::HandleServerUnblackListIap - \
-removed blacklisted iap id %i in index: %d", connIdInfo.Iap( j ), j )
-                connIdInfo.Remove( j ); 
+                if ( connIdInfo.Iap( j ) == aIapId )
+                    {
+                    // IAP found, unblacklist it.
+                    iBlackListIdList.Remove( index ); // Remove blacklist from array.
+                    if ( connIdInfo.Count() > 1 )
+                        {
+                        connIdInfo.Remove( j );
+                        // Blacklist is not empty, insert the changed blacklist back to array.
+                        (void) iBlackListIdList.Insert( connIdInfo, 0 ); // Errors ignored intentionally.
+                        }
+                    else
+                        {
+                        connIdInfo.Close();
+                        }
+                    MPMLOGSTRING2( "CMPMServer::HandleServerUnblackListIap - removed blacklisted iap in index = %d", j )
+                    result = KErrNone;
+                    break;
+                    }
                 }
             }
-        // If any blacklisted iaps remain reinsert at the 
-        // beginning connIdInfo to reflect activeness
-        //
-        if( connIdInfo.Count() > 0 )
+        }
+    else
+        {
+        MPMLOGSTRING( "CMPMServer::HandleServerUnblackListIap - not found blacklisted Connection Id" )
+        result = KErrNotFound;
+        }
+    return result;
+    }
+
+// -----------------------------------------------------------------------------
+// CMPMServer::HandleServerUnblackListIap
+// -----------------------------------------------------------------------------
+//
+void CMPMServer::HandleServerUnblackListIap(
+        TBlacklistCategory aCategory )
+    {
+    MPMLOGSTRING3( "CMPMServer::HandleServerUnblackListIap - aCategory = %i blacklisted Id count = %d",
+            aCategory, iBlackListIdList.Count() )
+
+    for ( TInt i = iBlackListIdList.Count() - 1; i >= 0; i-- )
+        {
+        TMPMBlackListConnId connIdInfo = iBlackListIdList[i];
+        iBlackListIdList.Remove( i ); // Remove blacklist from array.
+        MPMLOGSTRING3( "CMPMServer::HandleServerUnblackListIap - aConnId = 0x%x, blacklisted IapId count = %d",
+                connIdInfo.iConnId, connIdInfo.Count() )
+
+        for ( TInt j = connIdInfo.Count() - 1; j >= 0; j-- )
             {
-            MPMLOGSTRING( "reinsert connIdInfo to reflect activeness" )
-            iBlackListIdList.Insert( connIdInfo, 0 );             
+            if ( connIdInfo.Category( j ) == aCategory )
+                {
+                // Found matching category, unblacklisting IAP.
+                MPMLOGSTRING3( "CMPMServer::HandleServerUnblackListIap - removed blacklisted iap id %i in index: %d",
+                        connIdInfo.Iap( j ), j )
+                connIdInfo.Remove( j );
+                }
+            }
+        // If any IAPs remain in the blacklist, insert it back into the array.
+        if ( connIdInfo.Count() > 0 )
+            {
+            (void) iBlackListIdList.Insert( connIdInfo, 0 ); // Errors ignored intentionally.
             }
         }
     }
@@ -1144,81 +1140,67 @@
 // CMPMServer::GetBlacklistedIAP
 // -----------------------------------------------------------------------------
 //
-TInt CMPMServer::GetBlacklistedIAP( TConnectionId    aConnId, 
-                                    RArray<TUint32> &aBlacklistedIAP )
+void CMPMServer::GetBlacklistedIAP(
+        TConnectionId aConnId,
+        RArray<TUint32>& aBlacklistedIAP )
     {
-    TInt  i;
-    TBool found = EFalse;
-
-    found = FindBlacklistedConnIndex( aConnId, i );
-    if ( !found )
-        {
-        return KErrNotFound;
-        }
+    TInt index( 0 );
+    TBool found( EFalse );
 
-    TMPMBlackListConnId connIdInfo = iBlackListIdList[i];
-    iBlackListIdList.Remove( i );
-    iBlackListIdList.Insert( connIdInfo, 0 );
-
-    for (TInt j = 0; j < connIdInfo.Count(); j++)
+    found = FindBlacklistedConnIndex( aConnId, index );
+    if ( found )
         {
-        aBlacklistedIAP.Append( connIdInfo.Iap( j ) );
+        TMPMBlackListConnId connIdInfo = iBlackListIdList[index];
+        for ( TInt j = 0; j < connIdInfo.Count(); j++ )
+            {
+            (void) aBlacklistedIAP.Append( connIdInfo.Iap( j ) ); // Errors ignored intentionally.
+            }
         }
-
-    return KErrNone;
     }
 
-
 // -----------------------------------------------------------------------------
 // CMPMServer::GetBlacklistedIAP
 // -----------------------------------------------------------------------------
 //
-TInt CMPMServer::GetBlacklistedIAP( RArray<TUint32> &aBlacklistedIAP )
+void CMPMServer::GetBlacklistedIAP( RArray<TUint32>& aBlacklistedIAP )
     {
-    // Returns all blacklisted IAPs regardless of Connection Id 
-    // 
+    // Returns all blacklisted IAPs regardless of connection ID.
     for ( TInt i( 0 ); i < iBlackListIdList.Count(); i++ )
         {
-        for ( TInt j( 0 ); j < iBlackListIdList[i].Count(); 
-              j++ )
+        for ( TInt j( 0 ); j < iBlackListIdList[i].Count(); j++ )
             {
-            // Inserts an object into the array in ascending unsigned 
-            // key order. No duplicate entries are permitted. 
-            // 
-            // The array remains unchanged following an attempt to 
+            // Inserts an object into the array in ascending unsigned
+            // key order. No duplicate entries are permitted.
+            //
+            // The array remains unchanged following an attempt to
             // insert a duplicate entry.
-            // 
-            aBlacklistedIAP.InsertInUnsignedKeyOrder( 
-                                    iBlackListIdList[i].Iap( j ) );
+            //
+            (void) aBlacklistedIAP.InsertInUnsignedKeyOrder( iBlackListIdList[i].Iap( j ) ); // Errors ignored intentionally.
             }
         }
-    return KErrNone;
     }
 
-
 // -----------------------------------------------------------------------------
 // CMPMServer::FindId
 // -----------------------------------------------------------------------------
 //
-TBool CMPMServer::FindBlacklistedConnIndex( const TConnectionId aConnId, 
-                                            TInt                &aIndex )
+TBool CMPMServer::FindBlacklistedConnIndex(
+        const TConnectionId aConnId,
+        TInt& aIndex )
     {
-    TInt  i;
-    TBool found = EFalse;
-
-    for (i = 0;( (i < iBlackListIdList.Count()) && !found ); i++)
+    TBool found( EFalse );
+    for ( TInt i = 0; i < iBlackListIdList.Count(); i++ )
         {
         if ( iBlackListIdList[i].iConnId == aConnId )
             {
             found = ETrue;
+            aIndex = i;
+            break;
             }
         }
-    i--; // Since i is incremented after finding the correct iConnId
-    aIndex = i;
     return found;
     }
 
-
 // -----------------------------------------------------------------------------
 // CMPMServer::IsVoiceCallActiveL
 // 
@@ -1854,29 +1836,28 @@
     {
     MPMLOGSTRING( "CMPMServer::StopCellularConns" )
 
-    TUint32 iapId;
+    TUint32 iapId( 0 );
 	TMPMBearerType bearerType = EMPMBearerTypeNone;
 
 	// No cleanup stack used cause this function doesn't leave.
     RArray<TUint32> stoppedIaps;
 
-    // Check through active connections
-    for (TInt i = 0; i < iActiveBMConns.Count(); i++)
+    // Check through active connections.
+    for ( TInt i = 0; i < iActiveBMConns.Count(); i++ )
         {
         iapId = iActiveBMConns[i].iConnInfo.iIapId;
 
-        // Don't stop the same IAP twice.
-        if (stoppedIaps.Find( iapId ) == KErrNotFound)
+        // Don't stop the same IAP twice. (Trying to stop same IAP many times
+        // is not really a problem, just slows things a bit).
+        if ( iapId != 0 && stoppedIaps.Find( iapId ) == KErrNotFound )
             {
             TRAPD( err, bearerType = CommsDatAccess()->GetBearerTypeL( iapId ) );
-            if (err == KErrNone &&
-                    iapId != 0 &&
-                    bearerType == EMPMBearerTypePacketData)
+            if ( err == KErrNone && bearerType == EMPMBearerTypePacketData )
                 {
                 TInt mmsIap( 0 );
                 err = RProperty::Get( KMPMCathegory, KMPMPropertyKeyMMS, mmsIap );
                 // Check that it's not MMS IAP.
-                if (!(err == KErrNone && iapId == mmsIap))
+                if ( !( err == KErrNone && iapId == mmsIap ) )
                     {
                     // Stop the conn / IAP.
 					if ( aSilentOnly )
@@ -1887,7 +1868,7 @@
                         {
                         StopConnections( iapId );
                         }
-                    stoppedIaps.Append( iapId );
+                    (void) stoppedIaps.Append( iapId ); // Errors ignored intentionally.
                     }
                 }
             }
@@ -2145,20 +2126,18 @@
 //
 void CMPMServer::CheckIapForDisconnect( TInt aIapId )
     {
-    MPMLOGSTRING2( "CMPMServer::CheckIapForDisconnect - aIapId = 0x%x", 
-        aIapId )
+    MPMLOGSTRING2( "CMPMServer::CheckIapForDisconnect - aIapId = 0x%x", aIapId )
 
-    // Fix for case ou1cimx1#468999: stop sessions to cellular iap
-    // when there is only silent connections to it, and cellular usage is set
-    // to always ask
-    
+    // Stop sessions to cellular iap when there is only silent connections to
+    // it, and cellular usage is set to always ask.
+
     // Check iap type and usage policy
     TMPMBearerType bearerType( EMPMBearerTypeNone );
     TRAP_IGNORE( bearerType = CommsDatAccess()->GetBearerTypeL( aIapId ) );
 
     TBool closeIap = ( bearerType == EMPMBearerTypePacketData
-                && DataUsageWatcher()->CellularDataUsage() == ECmCellularDataUsageConfirm ); 
-    
+                && DataUsageWatcher()->CellularDataUsage() == ECmCellularDataUsageConfirm );
+
     // No need to put iapSessions to CleanupStack; there are no leaves
     RPointerArray<CMPMServerSession> iapSessions;
     if ( closeIap )
@@ -2167,7 +2146,6 @@
         // closeIap is left true also when there are no sessions using the iap
         for ( TInt i = 0; i < iActiveBMConns.Count(); i++ )
             {
-
             CMPMServerSession* session
                 = GetServerSession( iActiveBMConns[i].iConnInfo.iConnId );
 
@@ -2179,8 +2157,8 @@
 
             if ( sessionIapId == aIapId )
                 {
-                iapSessions.Append( session ); // Don't mind if Append fails
-                
+                (void) iapSessions.Append( session ); // Don't mind if Append fails
+
                 TBool silent( ETrue );
                 TRAP_IGNORE( silent = session->IapSelectionL()->MpmConnPref().NoteBehaviour()
                                       & TExtendedConnPref::ENoteBehaviourConnDisableNotes );
@@ -2193,13 +2171,13 @@
                 }
             }
         }
-    
+
     if ( closeIap )
         {
-        MPMLOGSTRING2( "CMPMServer::CheckIapForDisconnect - stopping silent sessions to iap 0x%x", 
+        MPMLOGSTRING2( "CMPMServer::CheckIapForDisconnect - stopping silent sessions to iap 0x%x",
             aIapId )
         // Stop all (silent) sessions to iap
-        for ( TInt i = 0; i < iapSessions.Count(); i++)
+        for ( TInt i = 0; i < iapSessions.Count(); i++ )
             {
             MPMLOGSTRING2( "CMPMServer::CheckIapForDisconnect - stopping connId 0x%x",
                     iapSessions[i]->ConnectionId());
@@ -2208,18 +2186,24 @@
         }
 
     iapSessions.Close();
-    
     }
 
-
 // -----------------------------------------------------------------------------
 // TMPMBlackListConnId::Append
 // -----------------------------------------------------------------------------
 //
 void TMPMBlackListConnId::Append( TUint32 aIap, TBlacklistCategory aCategory )
     {
-    iBlackListIap.Append( aIap );
-    iCategory.Append( aCategory );
+    // If first append fails, stop. If second append fails, need undo the first append.
+    TInt err = iBlackListIap.Append( aIap );
+    if ( !err )
+        {
+        err = iCategory.Append( aCategory );
+        if ( err )
+            {
+            iBlackListIap.Remove( iBlackListIap.Count() - 1 );
+            }
+        }
     }
 
 // -----------------------------------------------------------------------------
@@ -2229,7 +2213,7 @@
 void TMPMBlackListConnId::Remove( TInt aIndex )
     {
     iBlackListIap.Remove( aIndex );
-    iCategory.Remove( aIndex );    
+    iCategory.Remove( aIndex );
     }
 
 // -----------------------------------------------------------------------------
@@ -2239,7 +2223,7 @@
 void TMPMBlackListConnId::Close()
     {
     iBlackListIap.Close();
-    iCategory.Close();    
+    iCategory.Close();
     }
 
 // -----------------------------------------------------------------------------
@@ -2255,10 +2239,10 @@
 // TConnectionInfo::TConnectionInfo
 // -----------------------------------------------------------------------------
 //
-TConnectionInfo::TConnectionInfo() 
+TConnectionInfo::TConnectionInfo()
     : iConnId( 0 ),
       iSnap( 0 ),
-      iIapId( 0 ), 
+      iIapId( 0 ),
       iState( EIdle ),
       iAppUid( 0 )
     {
--- a/bearermanagement/mpm/src/mpmserversession.cpp	Wed Oct 27 18:01:02 2010 +0300
+++ b/bearermanagement/mpm/src/mpmserversession.cpp	Thu Oct 28 13:13:30 2010 +0300
@@ -3272,6 +3272,7 @@
             TPolicyConnPref pref;
             pref.SetIapId( aPolicyPref->IapId() );
             pref.SetNetId( aPolicyPref->NetId() );
+            pref.SetSnapAPId( aPolicyPref->SnapId() );
             TInt serviceid(0);
             
             // Resolve the original serviceid for the application.
--- a/bearermanagement/mpm/src/rmpm.cpp	Wed Oct 27 18:01:02 2010 +0300
+++ b/bearermanagement/mpm/src/rmpm.cpp	Thu Oct 28 13:13:30 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -15,22 +15,19 @@
 *
 */
 
-
 /**
 @file rmpm.cpp
 Mobility Policy Manager server client interface.
 */
 
-// INCLUDE FILES
 #include "rmpm.h"
 #include "mpmcommon.h"
 #include "mpmlauncher.h"
 #include "mpmlogger.h"
 
-// ============================= LOCAL FUNCTIONS ===============================
 
 // -----------------------------------------------------------------------------
-// Panic 
+// Panic
 // Panics the client in case of programming error.
 // -----------------------------------------------------------------------------
 //
@@ -39,9 +36,6 @@
     User::Panic( KPanicCategory, aPanic );
     }
 
-
-// ============================ MEMBER FUNCTIONS ===============================
-
 // -----------------------------------------------------------------------------
 // RMPM::LaunchServer
 // -----------------------------------------------------------------------------
@@ -51,12 +45,11 @@
     return KErrNone;
     }
 
-
 // -----------------------------------------------------------------------------
 // RMPM::Connect
 // -----------------------------------------------------------------------------
 //
-EXPORT_C TInt RMPM::Connect(  )
+EXPORT_C TInt RMPM::Connect()
     {
     TRequestStatus status;
     Connect( status );
@@ -66,7 +59,7 @@
         {
         iConnected = EFalse;
         MPMLOGSTRING2( "RMPM::Connect - Error <%i> in CreateSession", err )
-        } 
+        }
     return err;
     }
 
@@ -81,21 +74,20 @@
     if ( !iConnected )
         {
         MPMLOGSTRING( "RMPM::Connect: Client connecting to MPM Server" )
-        err = CreateSession( 
+        TVersion version = Version();
+        err = CreateSession(
                 KMPMServerName,
-                Version(),
+                version,
                 KNumMessageSlots,
                 EIpcSession_Unsharable,
                 (TSecurityPolicy*)0,
                 &aStatus );
         if ( err != KErrNone )
             {
-            //Connecting failed, probably because this is the first Connect() attempt.
-            TVersion version = Version();
-            MPMLOGSTRING3("Mobility Policy Manager version %d.%d", version.iMajor, 
-                                                                   version.iMinor )
-            err = MPMLauncher::LaunchServer( KMPMServerImg, 
-                                             KServerUid2, 
+            // Connecting failed, probably because this is the first Connect() attempt.
+            MPMLOGSTRING3("Mobility Policy Manager version %d.%d", version.iMajor, version.iMinor )
+            err = MPMLauncher::LaunchServer( KMPMServerImg,
+                                             KServerUid2,
                                              KServerUid3 );
             if ( err != KErrNone )
                 {
@@ -103,48 +95,49 @@
                 }
             else
                 {
-                err = CreateSession( 
+                err = CreateSession(
                     KMPMServerName,
-                    Version(),
+                    version,
                     KNumMessageSlots,
                     EIpcSession_Unsharable,
                     (TSecurityPolicy*)0,
                     &aStatus );
 #ifdef _DEBUG
-                if (err != KErrNone)
+                if ( err != KErrNone )
+                    {
                     MPMLOGSTRING2( "RMPM::Connect - Error <%i> in CreateSession", err )
+                    }
 #endif
                 }
-            }   
-        
-        //This can't be else, in case the inner CreateSession() succeeds.
-        if (err == KErrNone)
-           {
-           // session ok but waiting for MPM startup.
-           // We have to assume that it'll be ok.
-           TPtr8 ptr( reinterpret_cast< TUint8* >( NULL ), 0 );
-           TBool errFound = EFalse;
-           for (TUint i=0; ( (i < KNumPtrs) && !errFound ); i++)
-               {
-               err = iPtrArray.Append( ptr );
-               if ( err != KErrNone )
-                   {
-                   MPMLOGSTRING2(
-                       "RMPM::Connect - Error <%i> in ptrArray Append", err )
+            }
+
+        // This can't be else, in case the inner CreateSession() succeeds.
+        if ( err == KErrNone )
+            {
+            // Session ok but waiting for MPM startup.
+            // We have to assume that it'll be ok.
+            TPtr8 ptr( reinterpret_cast< TUint8* >( NULL ), 0 );
+            TBool errFound = EFalse;
+            for ( TUint i = 0; ( ( i < KNumPtrs ) && !errFound ); i++ )
+                {
+                err = iPtrArray.Append( ptr );
+                if ( err != KErrNone )
+                    {
+                    MPMLOGSTRING2( "RMPM::Connect - Error <%i> in ptrArray Append", err )
                     errFound = ETrue;
-                   }
-               }
-           // If everything is fine, set client connected to true.
-           if ( err == KErrNone )
-               {
-               iConnected = ETrue;
-               }
-           // Else close the created session.
-           else
-               {
-               Close();
-               }
-           }
+                    }
+                }
+            // If everything is fine, set client connected to true.
+            if ( err == KErrNone )
+                {
+                iConnected = ETrue;
+                }
+            // Else close the created session.
+            else
+                {
+                Close();
+                }
+            }
         }
     else
         {
@@ -152,7 +145,7 @@
         err = KErrNone;
         }
 
-    // Finally, always complete the failing connects 
+    // Finally, always complete the failing connects.
     if ( err != KErrNone )
         {
         TRequestStatus* status = &aStatus;
@@ -160,8 +153,6 @@
         }
     }
 
-
-
 // -----------------------------------------------------------------------------
 // RMPM::ChooseBestIAP
 // -----------------------------------------------------------------------------
--- a/cmmanager/cmmanager.pro	Wed Oct 27 18:01:02 2010 +0300
+++ b/cmmanager/cmmanager.pro	Thu Oct 28 13:13:30 2010 +0300
@@ -24,8 +24,6 @@
     cppacketdataapplugin \
     cpwlanapplugin
 
-CONFIG += ordered
+CONFIG += ordered hb
 
-symbian*: {
-    SYMBIAN_PLATFORMS = WINSCW ARMV5
-} 
+TRANSLATIONS = cmmanager.ts
\ No newline at end of file
--- a/cmmanager/cmmgr/cmmserver/group/bld.inf	Wed Oct 27 18:01:02 2010 +0300
+++ b/cmmanager/cmmgr/cmmserver/group/bld.inf	Thu Oct 28 13:13:30 2010 +0300
@@ -26,6 +26,7 @@
 PRJ_EXPORTS
 // export iby files
 ../rom/cmmserver.iby      CORE_MW_LAYER_IBY_EXPORT_PATH(cmmserver.iby)
+../rom/cmmanager_resources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(cmmanager_resources.iby)
 
 ../conf/cmmanager.confml            MW_LAYER_CONFML(cmmanager.confml)
 ../conf/cmmanager_10207376.crml     MW_LAYER_CRML(cmmanager_10207376.crml)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmmanager/cmmgr/cmmserver/rom/cmmanager_resources.iby	Thu Oct 28 13:13:30 2010 +0300
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ * Cm Manager resource iby file.
+ */
+
+#ifndef CMMANAGER_RESOURCES_IBY
+#define CMMANAGER_RESOURCES_IBY
+
+#include <data_caging_paths_for_iby.hrh> 
+
+data=DATAZ_/QT_TRANSLATIONS_DIR/cmmanager.qm QT_TRANSLATIONS_DIR/cmmanager.qm 
+
+#endif // CMMANAGER_RESOURCES_IBY
--- a/cmmanager/cpdestinationplugin/src/cpdestinationentryitem.cpp	Wed Oct 27 18:01:02 2010 +0300
+++ b/cmmanager/cpdestinationplugin/src/cpdestinationentryitem.cpp	Thu Oct 28 13:13:30 2010 +0300
@@ -147,11 +147,16 @@
     CpBaseSettingView* view = new CpBaseSettingView();
     constructSettingView(view);
     
-    // Toolbar. Allow arrange if more than one AP is shown
+    // Toolbar and menu. Allow arrange if more than one AP is shown.
     if (mDestinationId != 0 && mAps->count() > 1) {
         HbToolBar *tb = view->toolBar();
         HbIcon arrangeIcon("qtg_mono_sort");
         (void) tb->addAction(arrangeIcon, "", this, SLOT(activateArrangeMode()));
+        HbMenu *menu = view->menu();
+        (void) menu->addAction(
+            hbTrId("txt_occ_opt_arrange"),
+            this,
+            SLOT(activateArrangeMode()));
     }
     OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_CREATESETTINGVIEW_EXIT);
     return view;        
@@ -254,10 +259,12 @@
         CpBaseSettingView  *cpView = static_cast<CpBaseSettingView  *>(view);
         constructSettingView(cpView);
         
-        // Remove Toolbar if necessary
+        // Remove toolbar and menu actions if necessary
         if (mDestinationId != 0 && mAps->count() <= 1) {
             HbToolBar *tb = view->toolBar();
             tb->clearActions();
+            HbMenu *menu = view->menu();
+            menu->clearActions();
         }
     }
     OstTrace0(TRACE_NORMAL, CPDESTINATIONENTRYITEMDATA_UPDATEDESTINATIONVIEW, "CpDestinationEntryItemData::updateDestinationView: Emit destination changed");
@@ -621,6 +628,7 @@
     CmDestinationShim *destination = NULL;
     mList = new HbListWidget();
     view->setWidget(mList);
+    view->setTitle(hbTrId("txt_cp_title_control_panel"));
     
     try {
         destination = mCmm->destination(mDestinationId);
--- a/connectionmonitoring/connectionview/connectionview.pro	Wed Oct 27 18:01:02 2010 +0300
+++ b/connectionmonitoring/connectionview/connectionview.pro	Thu Oct 28 13:13:30 2010 +0300
@@ -17,8 +17,9 @@
 TEMPLATE = app
 TARGET = connview
 
-CONFIG += hb no_icon mobility
-MOBILITY+=bearer
+CONFIG += hb no_icon
+
+QT += network
 
 DEPENDPATH += . inc src
 INCLUDEPATH += .
--- a/connectionmonitoring/connectionview/inc/connectionview.h	Wed Oct 27 18:01:02 2010 +0300
+++ b/connectionmonitoring/connectionview/inc/connectionview.h	Thu Oct 28 13:13:30 2010 +0300
@@ -35,10 +35,6 @@
 
 // Forward declarations
 class HbTranslator;
-
-
-QTM_USE_NAMESPACE
-
 class QSignalMapper;
 
 const QString bearer2G = "2G";
--- a/connectionmonitoring/connectionview/inc/scrollareawidget.h	Wed Oct 27 18:01:02 2010 +0300
+++ b/connectionmonitoring/connectionview/inc/scrollareawidget.h	Thu Oct 28 13:13:30 2010 +0300
@@ -22,8 +22,6 @@
 #include <QGraphicsWidget>
 #include <qnetworkconfigmanager.h>
 
-QTM_USE_NAMESPACE
-
 class ScrollAreaWidget: public QGraphicsWidget
 {
     Q_OBJECT
--- a/connectionmonitoring/connectionview/src/connectionview.cpp	Wed Oct 27 18:01:02 2010 +0300
+++ b/connectionmonitoring/connectionview/src/connectionview.cpp	Thu Oct 28 13:13:30 2010 +0300
@@ -40,12 +40,10 @@
 #include "connectionviewTraces.h"
 #endif
 
-
-QTM_USE_NAMESPACE
-
 const qreal typeLabelWidth = 18.0;
 const QString iapIdentifierPrefix = "I_";
 
+
 ConnectionView::ConnectionView():
     mNetConfigurationManager(new QNetworkConfigurationManager(this)),
     mSignalMapper(new QSignalMapper(this)),
@@ -57,7 +55,7 @@
     mTranslator = QSharedPointer<HbTranslator>(new HbTranslator("connectionview"));
    
     // Register custom layout location
-    bool registerStatus = HbStyleLoader::registerFilePath(":/layout/");
+    bool registerStatus = HbStyleLoader::registerFilePath(":connectionview.css");
     Q_ASSERT(registerStatus);
     
     // Map the configurationChanged signal to a slot in order to get
@@ -69,6 +67,7 @@
             SLOT(handleConfigurationChanged(const QNetworkConfiguration&)));
     
     // Create the view and show it
+    setContentsMargins( 0, 0, 0, 0 );
     createView();
     OstTraceFunctionExit0( CONNECTIONVIEW_CONNECTIONVIEW_EXIT );
 }
@@ -123,6 +122,7 @@
     mScrollArea->setScrollDirections(Qt::Vertical);
     mScrollArea->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
     mMainLayout->addItem(mScrollArea);
+    mMainLayout->setContentsMargins( 0, 0, 0, 0 );
 
     // Create the mainView and the layout for the window
     mMainView = new HbView();
@@ -130,12 +130,14 @@
     ScrollAreaWidget *scrollContent = new ScrollAreaWidget();
     scrollContent->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
     mScrollArea->installEventFilter(scrollContent);
+    mMainView->setContentsMargins( 0, 0, 0, 0 );
     
     mBoxLayout = new QGraphicsLinearLayout(Qt::Vertical);
     mBoxLayout->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
     scrollContent->setLayout(mBoxLayout);
     mMainView->setLayout(mMainLayout);
     mScrollArea->setContentWidget(scrollContent);
+    mBoxLayout->setContentsMargins( 0, 0, 0, 0 );
     
     // Create the toolbar and the disconnection action
     mToolBar = new HbToolBar();    
@@ -300,6 +302,8 @@
     groupBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum);
     groupBox->setHeading(hbTrId("txt_occ_subhead_connection_details"));
     groupBox->setCollapsable(true);
+  	mMainLayout->addItem( groupBox );
+    groupBox->setContentsMargins( 0, 0, 0, 0 );
     
     // Create the disconnection button
     HbPushButton* button = new HbPushButton(
@@ -308,11 +312,13 @@
     button->setSizePolicy(QSizePolicy::Preferred, 
                           QSizePolicy::Preferred, 
                           QSizePolicy::PushButton);
+   	mMainLayout->addItem( button );
     
     // Create the horizontal layout for the labels
     QGraphicsLinearLayout *labelLayout = new QGraphicsLinearLayout(Qt::Horizontal);
     labelLayout->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
     HbLabel *typeLabel = new HbLabel(hbTrId("txt_occ_list_name"));
+    labelLayout->setContentsMargins( 0, 0, 0, 0 );
 
     // get the pixel size matching the spesified 18 units using the HbDeviceProfile
     // and set the width of the label
--- a/connectionmonitoring/connectionview/src/scrollareawidget.cpp	Wed Oct 27 18:01:02 2010 +0300
+++ b/connectionmonitoring/connectionview/src/scrollareawidget.cpp	Thu Oct 28 13:13:30 2010 +0300
@@ -25,9 +25,6 @@
 #endif
 
 
-QTM_USE_NAMESPACE
-
-
 ScrollAreaWidget::ScrollAreaWidget(QGraphicsItem *parent):
     QGraphicsWidget(parent)
 {
--- a/connectionmonitoring/connmon/dataconnectionlogger/inc/dclTimer.h	Wed Oct 27 18:01:02 2010 +0300
+++ b/connectionmonitoring/connmon/dataconnectionlogger/inc/dclTimer.h	Thu Oct 28 13:13:30 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -43,9 +43,10 @@
         * Starts the timer mode logging for a connection.
         * @param aConnectionId Id of the connection.
         * @since
-        * @return void.
+        * @return KErrNone if successful, otherwise one of the system-wide
+        * error codes.
         */
-        void Add( const TUint& aConnectionId );
+        TInt Add( const TUint& aConnectionId );
 
         /**
         * Stops the timer mode logging for a connection.
--- a/connectionmonitoring/connmon/dataconnectionlogger/src/dcl.cpp	Wed Oct 27 18:01:02 2010 +0300
+++ b/connectionmonitoring/connmon/dataconnectionlogger/src/dcl.cpp	Thu Oct 28 13:13:30 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2003-2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -1661,17 +1661,25 @@
             }
         }
 
-    iConnectionMonitor.SetUintAttribute(
+    TInt err = iConnectionMonitor.SetUintAttribute(
             aConnectionId,
             KSubConnectionId,
             KDownlinkDataThreshold,
             threshold );
+    if ( err )
+        {
+        LOGIT1("FAILED to set KDownlinkDataThreshold to ConnMon <%d>", err)
+        }
 
-    iConnectionMonitor.SetUintAttribute(
+    err = iConnectionMonitor.SetUintAttribute(
             aConnectionId,
             KSubConnectionId,
             KUplinkDataThreshold,
             threshold );
+    if ( err )
+        {
+        LOGIT1("FAILED to set KUplinkDataThreshold to ConnMon <%d>", err)
+        }
 
     LOGIT1("Switched to threshold mode, id %d", aConnectionId)
 
@@ -1687,22 +1695,36 @@
     LOGENTRFN("CEngine::SwitchToTimerMode()")
     if ( iDclTimerAO != 0 )
         {
-        // Set thresholds to zero.
-        iConnectionMonitor.SetUintAttribute(
-                aConnectionId,
-                KSubConnectionId,
-                KDownlinkDataThreshold,
-                0 );
+        TInt err = iDclTimerAO->Add( aConnectionId );
+        if ( !err )
+            {
+            // Set thresholds to zero.
+            err = iConnectionMonitor.SetUintAttribute(
+                    aConnectionId,
+                    KSubConnectionId,
+                    KDownlinkDataThreshold,
+                    0 );
+            if ( err )
+                {
+                LOGIT1("FAILED to set KDownlinkDataThreshold to ConnMon <%d>", err)
+                }
 
-        iConnectionMonitor.SetUintAttribute(
-                aConnectionId,
-                KSubConnectionId,
-                KUplinkDataThreshold,
-                0 );
+            err = iConnectionMonitor.SetUintAttribute(
+                    aConnectionId,
+                    KSubConnectionId,
+                    KUplinkDataThreshold,
+                    0 );
+            if ( err )
+                {
+                LOGIT1("FAILED to set KUplinkDataThreshold to ConnMon <%d>", err)
+                }
 
-        iDclTimerAO->Add( aConnectionId );
-
-        LOGIT1("Switched to timer mode, id %d", aConnectionId)
+            LOGIT1("Switched to timer mode, id %d", aConnectionId)
+            }
+        else
+            {
+            LOGIT1("Error, RArray::Append failed: %d", err)
+            }
         }
     LOGEXITFN("CEngine::SwitchToTimerMode()")
     }
--- a/connectionmonitoring/connmon/dataconnectionlogger/src/dclTimer.cpp	Wed Oct 27 18:01:02 2010 +0300
+++ b/connectionmonitoring/connmon/dataconnectionlogger/src/dclTimer.cpp	Thu Oct 28 13:13:30 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -59,11 +59,16 @@
 // CDclTimerAO::Add
 // -----------------------------------------------------------------------------
 //
-void CDclTimerAO::Add( const TUint& aConnectionId )
+TInt CDclTimerAO::Add( const TUint& aConnectionId )
     {
-    iConnectionIds.Append( aConnectionId );
+    TInt err( KErrNone );
+    err = iConnectionIds.Append( aConnectionId );
 
-    NextTimerAfter();
+    if ( !err )
+        {
+        NextTimerAfter();
+        }
+    return err;
     }
 
 // -----------------------------------------------------------------------------
--- a/connectionmonitoring/connmon/dataconnectionlogger/src/saeobserver.cpp	Wed Oct 27 18:01:02 2010 +0300
+++ b/connectionmonitoring/connmon/dataconnectionlogger/src/saeobserver.cpp	Thu Oct 28 13:13:30 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -787,9 +787,9 @@
     if ( conns && (conns->Find(aConnId) == KErrNotFound) &&
         ((aConnId != EBearerIdGPRS) && (aConnId != EBearerIdWCDMA)) )
         {
-        conns->Append( aConnId );
-        LOG( Log::Printf( _L("DCL: Contexts: GPRS %d, WCDMA %d"),
-             iGPRSConnections.Count(), iWCDMAConnections.Count() ));
+        TInt err = conns->Append( aConnId );
+        LOG( Log::Printf( _L("DCL: Contexts: GPRS %d, WCDMA %d, error: %d"),
+             iGPRSConnections.Count(), iWCDMAConnections.Count(), err ));
         }
     }
 
--- a/connectionmonitoring/indicatorobserver/inc/indicatorobserver.h	Wed Oct 27 18:01:02 2010 +0300
+++ b/connectionmonitoring/indicatorobserver/inc/indicatorobserver.h	Thu Oct 28 13:13:30 2010 +0300
@@ -27,8 +27,6 @@
 class XQSettingsManager;
 class HbIndicator;
 
-QTM_USE_NAMESPACE
-
 const int wlanNotConnected = 0;
 const int wlanConnected = 1;
 
--- a/connectionmonitoring/indicatorobserver/indicatorobserver.pro	Wed Oct 27 18:01:02 2010 +0300
+++ b/connectionmonitoring/indicatorobserver/indicatorobserver.pro	Thu Oct 28 13:13:30 2010 +0300
@@ -16,8 +16,7 @@
 
 TEMPLATE = app
 TARGET = indicatorobserver
-CONFIG += hb no_icon mobility
-MOBILITY += bearer
+CONFIG += hb no_icon
 
 INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE \
                ./inc \
--- a/connectionmonitoring/indicatorobserver/src/indicatorobserver.cpp	Wed Oct 27 18:01:02 2010 +0300
+++ b/connectionmonitoring/indicatorobserver/src/indicatorobserver.cpp	Thu Oct 28 13:13:30 2010 +0300
@@ -33,8 +33,6 @@
 #include "indicatorobserverTraces.h"
 #endif
 
-QTM_USE_NAMESPACE
-
 /*!
     IndicatorObserver::IndicatorObserver
 */
@@ -52,7 +50,7 @@
     mCellularIndicator(NULL)
     
 {
-    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_CONSTRUCTOR_ENTRY, "-->");
+    OstTraceFunctionEntry0(INDICATOROBSERVER_CONSTRUCTOR_ENTRY);
 
     bool connectStatus = false;
 
@@ -97,7 +95,7 @@
 
     initializeIndicators();
     
-    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_CONSTRUCTOR_EXIT, "<--");
+    OstTraceFunctionExit0(INDICATOROBSERVER_CONSTRUCTOR_EXIT);
 }
 
 
@@ -106,7 +104,7 @@
 */
 IndicatorObserver::~IndicatorObserver()
 {
-    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_DESTRUCTOR_ENTRY, "-->");
+    OstTraceFunctionEntry0(INDICATOROBSERVER_DESTRUCTOR_ENTRY);
      
     if(mCellularIndicatorIsActivated) {
         deactivateCellularIndicatorPlugin();
@@ -130,7 +128,7 @@
     delete mCellularIndicator;
     delete mWlanIndicator;
     
-    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_DESTRUCTOR_EXIT, "<--");
+    OstTraceFunctionExit0(INDICATOROBSERVER_DESTRUCTOR_EXIT);
 }
 
 /*!
@@ -139,7 +137,7 @@
 void IndicatorObserver::initializeIndicators()
 {
 
-    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_INITIALIZEINDICATORS_ENTRY, "-->");
+    OstTraceFunctionEntry0(INDICATOROBSERVER_INITIALIZEINDICATORS_ENTRY);
     
     // create the indicators and make connections
     mCellularIndicator = new HbIndicator();  
@@ -164,7 +162,7 @@
     updateWlanIndicator();
     updateCellularIndicator();
     
-    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_INITIALIZEINDICATORS_EXIT, "<--");
+    OstTraceFunctionExit0(INDICATOROBSERVER_INITIALIZEINDICATORS_EXIT);
 }
 
 /*!
@@ -172,7 +170,7 @@
 */
 void IndicatorObserver::updateWlanRadioStatus(const XQSettingsKey &key, const QVariant &value)
 {
-    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_UPDATEWLANRADIOSTATUS_ENTRY, "-->");
+    OstTraceFunctionEntry0(INDICATOROBSERVER_UPDATEWLANRADIOSTATUS_ENTRY);
     
     // The change notification is received either for the WlanOnoff key, or the
     // ForceDisableWlan key
@@ -187,7 +185,7 @@
     } else {
         updateWlanIndicator();
     }
-    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_UPDATEWLANRADIOSTATUS_EXIT, "<--");
+    OstTraceFunctionExit0(INDICATOROBSERVER_UPDATEWLANRADIOSTATUS_EXIT);
 }
 
 /*!
@@ -195,7 +193,7 @@
 */
 void IndicatorObserver::findActiveConfigurations()
 {
-    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_FINDACTIVECONFIGURATIONS_ENTRY, "-->");
+    OstTraceFunctionEntry0(INDICATOROBSERVER_FINDACTIVECONFIGURATIONS_ENTRY);
     
     mActiveWlanConfigurations->clear();
     mActiveCellularConfigurations->clear();
@@ -219,7 +217,7 @@
             }  
         }
     }
-    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_FINDACTIVECONFIGURATIONS_EXIT, "<--");
+    OstTraceFunctionExit0(INDICATOROBSERVER_FINDACTIVECONFIGURATIONS_EXIT);
 }
 
 /*!
@@ -227,7 +225,7 @@
 */
 void IndicatorObserver::updateWlanIndicator()
 {
-    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_UPDATEWLANINDICATOR_ENTRY, "-->");
+    OstTraceFunctionEntry0(INDICATOROBSERVER_UPDATEWLANINDICATOR_ENTRY);
     QList<QVariant> list;
     
     int count = mActiveWlanConfigurations->count();
@@ -244,7 +242,7 @@
             activateWlanIndicatorPlugin(list);
         }
     }
-    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_UPDATEWLANINDICATOR_EXIT, "<--");
+    OstTraceFunctionExit0(INDICATOROBSERVER_UPDATEWLANINDICATOR_EXIT);
 }
 
 /*!
@@ -252,7 +250,7 @@
 */
 void IndicatorObserver::updateCellularIndicator()
 {
-    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_UPDATECELLULARINDICATOR_ENTRY, "-->");
+    OstTraceFunctionEntry0(INDICATOROBSERVER_UPDATECELLULARINDICATOR_ENTRY);
     
     QList<QVariant> list;
 
@@ -273,7 +271,7 @@
         } 
         activateCellularIndicatorPlugin(list);        
     }
-    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_UPDATECELLULARINDICATOR_EXIT, "<--");
+    OstTraceFunctionExit0(INDICATOROBSERVER_UPDATECELLULARINDICATOR_EXIT);
 }
 
 /*!
@@ -281,7 +279,7 @@
 */
 void IndicatorObserver::handleConfigurationChanged(const QNetworkConfiguration& config)
 {
-    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_HANDLECONFIGURATIONCHANGED_ENTRY, "-->");
+    OstTraceFunctionEntry0(INDICATOROBSERVER_HANDLECONFIGURATIONCHANGED_ENTRY);
     
     switch (config.state())
     {   
@@ -307,31 +305,31 @@
         default:
             break;
     }
-    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_HANDLECONFIGURATIONCHANGED_EXIT, "<--");
+    OstTraceFunctionExit0(INDICATOROBSERVER_HANDLECONFIGURATIONCHANGED_EXIT);
 }
 
 void IndicatorObserver::userActivateCellularIndicator(const QString &type, const QVariantMap &data)
 {
-    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_USERACTIVATECELLULARINDICATOR_ENTRY, "-->");
+    OstTraceFunctionEntry0(INDICATOROBSERVER_USERACTIVATECELLULARINDICATOR_ENTRY);
     
     Q_UNUSED(data);
     Q_UNUSED(type);
     // Show connection view
     QProcess::startDetached("connview");
     
-    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_USERACTIVATECELLULARINDICATOR_EXIT, "<--");
+    OstTraceFunctionExit0(INDICATOROBSERVER_USERACTIVATECELLULARINDICATOR_EXIT);
 }
 
 void IndicatorObserver::userActivateWlanIndicator(const QString &type, const QVariantMap &data)
 {
-    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_USERACTIVATEWLANINDICATOR_ENTRY, "-->");
+    OstTraceFunctionEntry0(INDICATOROBSERVER_USERACTIVATEWLANINDICATOR_ENTRY);
     
     Q_UNUSED(data);
     Q_UNUSED(type);
     // Show wlan list view
     QProcess::startDetached("WlanSniffer");
 
-    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_USERACTIVATEWLANINDICATOR_EXIT, "<--");
+    OstTraceFunctionExit0(INDICATOROBSERVER_USERACTIVATEWLANINDICATOR_EXIT);
 }
 
 /*!
@@ -339,7 +337,7 @@
 */
 void IndicatorObserver::activateCellularIndicatorPlugin(QList<QVariant> list)
 {
-    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_ACTIVATECELLULARINDICATORPLUGIN_ENTRY, "-->");
+    OstTraceFunctionEntry0(INDICATOROBSERVER_ACTIVATECELLULARINDICATORPLUGIN_ENTRY);
     
     bool success = mCellularIndicator->activate("com.nokia.hb.indicator.connectivity.cellularindicatorplugin/1.0", list);
      
@@ -350,7 +348,7 @@
         mCellularIndicatorIsActivated = true;
     }
     
-    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_ACTIVATECELLULARINDICATORPLUGIN_EXIT, "<--");
+    OstTraceFunctionExit0(INDICATOROBSERVER_ACTIVATECELLULARINDICATORPLUGIN_EXIT);
 }
 
 /*!
@@ -358,12 +356,12 @@
 */
 void IndicatorObserver::deactivateCellularIndicatorPlugin()
 {
-    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_DEACTIVATECELLULARINDICATORPLUGIN_ENTRY, "-->");
+    OstTraceFunctionEntry0(INDICATOROBSERVER_DEACTIVATECELLULARINDICATORPLUGIN_ENTRY);
     
     mCellularIndicator->deactivate("com.nokia.hb.indicator.connectivity.cellularindicatorplugin/1.0");
     mCellularIndicatorIsActivated = false;
     
-    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_DEACTIVATECELLULARINDICATORPLUGIN_EXIT, "<--");
+    OstTraceFunctionExit0(INDICATOROBSERVER_DEACTIVATECELLULARINDICATORPLUGIN_EXIT);
 }
 
 /*!
@@ -371,7 +369,7 @@
 */
 void IndicatorObserver::activateWlanIndicatorPlugin(QList<QVariant> list)
 {
-    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_ACTIVATEWLANINDICATORPLUGIN_ENTRY, "-->");
+    OstTraceFunctionEntry0(INDICATOROBSERVER_ACTIVATEWLANINDICATORPLUGIN_ENTRY);
     
     bool success = mWlanIndicator->activate("com.nokia.hb.indicator.connectivity.wlanindicatorplugin/1.0", list);
    
@@ -382,7 +380,7 @@
         mWlanIndicatorIsActivated = true;
     }
     
-    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_ACTIVATEWLANINDICATORPLUGIN_EXIT, "<--");    
+    OstTraceFunctionExit0(INDICATOROBSERVER_ACTIVATEWLANINDICATORPLUGIN_EXIT);    
 }
 
 /*!
@@ -390,10 +388,10 @@
 */
 void IndicatorObserver::deactivateWlanIndicatorPlugin()
 {
-    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_DEACTIVATEWLANINDICATORPLUGIN_ENTRY, "-->");
+    OstTraceFunctionEntry0(INDICATOROBSERVER_DEACTIVATEWLANINDICATORPLUGIN_ENTRY);
 
     mWlanIndicator->deactivate("com.nokia.hb.indicator.connectivity.wlanindicatorplugin/1.0");
     mWlanIndicatorIsActivated = false;
     
-    OstTrace0(TRACE_FLOW, INDICATOROBSERVER_DEACTIVATEWLANINDICATORPLUGIN_EXIT, "<--");   
+    OstTraceFunctionExit0(INDICATOROBSERVER_DEACTIVATEWLANINDICATORPLUGIN_EXIT);   
 }
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/cellulardataconfirmation.cpp	Wed Oct 27 18:01:02 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/src/cellulardataconfirmation.cpp	Thu Oct 28 13:13:30 2010 +0300
@@ -93,15 +93,15 @@
     // information whether we are in home network is needed
     if ( aHomeNetwork ) 
         {
-        choices.Append( EMsgQueryAutomatically );
-        choices.Append( EMsgQueryThisTime );
-        choices.Append( EMsgQueryCancelled );
+        choices.AppendL( EMsgQueryAutomatically );
+        choices.AppendL( EMsgQueryThisTime );
+        choices.AppendL( EMsgQueryCancelled );
         }
     else
         {
-        choices.Append( EMsgQueryThisTime );
-        choices.Append( EMsgQueryAutomatically );
-        choices.Append( EMsgQueryCancelled );
+        choices.AppendL( EMsgQueryThisTime );
+        choices.AppendL( EMsgQueryAutomatically );
+        choices.AppendL( EMsgQueryCancelled );
         }
 
     // Observer is needed in order to get the user inputs
--- a/connectionutilities/ConnectionDialogs/group/bld.inf	Wed Oct 27 18:01:02 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/group/bld.inf	Thu Oct 28 13:13:30 2010 +0300
@@ -36,6 +36,8 @@
 ../rom/DisconnectDlg.iby			CORE_MW_LAYER_IBY_EXPORT_PATH(DisconnectDlg.iby)
 ../rom/DisconnectDlgResources.iby		LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(DisconnectDlgResources.iby)
 
+../rom/connectionstatuspopups_resources.iby     LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(connectionstatuspopups_resources.iby)
+
 // export localised loc file
 ../cconndlg/loc/agentdialog.loc				MW_LAYER_LOC_EXPORT_PATH(agentdialog.loc)
 ../ConnectionUiUtilities/loc/connectionuiutilities.loc	MW_LAYER_LOC_EXPORT_PATH(connectionuiutilities.loc)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectionutilities/ConnectionDialogs/rom/connectionstatuspopups_resources.iby	Thu Oct 28 13:13:30 2010 +0300
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ * Connection status popups resource iby file.
+ */
+
+#ifndef CONNECTIONSTATUSPOPUPS_RESOURCES_IBY
+#define CONNECTIONSTATUSPOPUPS_RESOURCES_IBY
+
+#include <data_caging_paths_for_iby.hrh> 
+
+data=DATAZ_/QT_TRANSLATIONS_DIR/connectionstatuspopups.qm QT_TRANSLATIONS_DIR/connectionstatuspopups.qm 
+
+#endif // CONNECTIONSTATUSPOPUPS_RESOURCES_IBY
--- a/connectionutilities/connectionutilities.pro	Wed Oct 27 18:01:02 2010 +0300
+++ b/connectionutilities/connectionutilities.pro	Thu Oct 28 13:13:30 2010 +0300
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of "Eclipse Public License v1.0"
@@ -18,5 +18,7 @@
 
 SUBDIRS  += confirmqueries
 
-CONFIG += ordered
-						
\ No newline at end of file
+CONFIG += ordered hb
+
+TRANSLATIONS = connectionstatuspopups.ts
+