browserui/browser/BrowserAppSrc/BrowserPreferences.cpp
branchRCL_3
changeset 50 c9249d037530
parent 48 5c11946e75b3
child 55 08ffbd51e3fd
equal deleted inserted replaced
48:5c11946e75b3 50:c9249d037530
   482     //Read suppress security UI setting
   482     //Read suppress security UI setting
   483     iAllPreferences.iHTTPSecuritySupressed = GetIntValue ( KBrowserSecurityUI );
   483     iAllPreferences.iHTTPSecuritySupressed = GetIntValue ( KBrowserSecurityUI );
   484 
   484 
   485     //Read show connection queries setting
   485     //Read show connection queries setting
   486     iAllPreferences.iConnDialogs = GetIntValue( KBrowserConnectionDialogs );
   486     iAllPreferences.iConnDialogs = GetIntValue( KBrowserConnectionDialogs );
   487 
   487    
   488     if( !iAllPreferences.iHTTPSecuritySupressed )
   488     // Read HTTP security warnings setting
   489         {
   489     // value 0 :we don't want to see sec warning because they're supressed
   490         // Read HTTP security warnings setting
   490     // value 1 : want to see sec warning and warnings are enabled
   491 	    iAllPreferences.iHttpSecurityWarnings = GetIntValue (
   491     iAllPreferences.iHttpSecurityWarnings = GetIntValue (
   492 		                            KBrowserNGShowSecurityWarnings );
   492     		                            KBrowserNGShowSecurityWarnings );
   493         }
   493     	    
   494     else
       
   495         {
       
   496         //we don't want to see sec warning because they're supressed
       
   497         iAllPreferences.iHttpSecurityWarnings = EFalse;
       
   498         }
       
   499 
       
   500     // Media Volume uses different SD ini. Revert to Browser SD ini after use
   494     // Media Volume uses different SD ini. Revert to Browser SD ini after use
   501     iAllPreferences.iMediaVolume = GetIntValue( KBrowserMediaVolumeControl );
   495     iAllPreferences.iMediaVolume = GetIntValue( KBrowserMediaVolumeControl );
   502 
   496 
   503     // Pop up Blocking
   497     // Pop up Blocking
   504     iAllPreferences.iPopupBlocking = GetIntValue( KBrowserNGPopupBlocking );
   498     iAllPreferences.iPopupBlocking = GetIntValue( KBrowserNGPopupBlocking );
   543 
   537 
   544     // If something fails for an option, the default value will be used
   538     // If something fails for an option, the default value will be used
   545     TInt ap;
   539     TInt ap;
   546 
   540 
   547     // Read Accesss point selection mode for advanced settings
   541     // Read Accesss point selection mode for advanced settings
       
   542 #ifdef BRDO_OCC_ENABLED_FF
       
   543     const TInt selectionMode = GetIntValue( KBrowserOccAccessPointSelectionMode ); //2 Destination
       
   544     BROWSER_LOG( ( _L( " OCC Ap Selection mode : %d" ), selectionMode ) );
       
   545 #else
   548     const TInt selectionMode = GetIntValue( KBrowserAccessPointSelectionMode );
   546     const TInt selectionMode = GetIntValue( KBrowserAccessPointSelectionMode );
       
   547 #endif
   549 
   548 
   550     switch ( selectionMode )
   549     switch ( selectionMode )
   551         {
   550         {
   552         case EBrowserCenRepApSelModeUserDefined:
   551         case EBrowserCenRepApSelModeUserDefined:
   553              {
   552              {
   579 
   578 
   580         SetDefaultAccessPointL( ap );
   579         SetDefaultAccessPointL( ap );
   581 		}
   580 		}
   582     else if (iAllPreferences.iAccessPointSelectionMode == EDestination)
   581     else if (iAllPreferences.iAccessPointSelectionMode == EDestination)
   583 		{
   582 		{
       
   583 #ifdef BRDO_OCC_ENABLED_FF
       
   584         iAllPreferences.iDefaultSnapId = GetIntValue( KBrowserOccNGDefaultSnapId );
       
   585         if ( iAllPreferences.iDefaultSnapId == 0)
       
   586             {
       
   587             BROWSER_LOG( ( _L( " Cenrep OCC Default Snap id is : %d" ), iAllPreferences.iDefaultSnapId ) );
       
   588             TUint32 snapId(0);
       
   589             RCmManager manager;
       
   590             manager.OpenLC();
       
   591             RArray<TUint32> destIdArray;
       
   592             CleanupClosePushL(destIdArray);
       
   593             manager.AllDestinationsL( destIdArray );
       
   594             const TInt count = destIdArray.Count();
       
   595             for ( TInt i = 0; i < count && !snapId; i++ )
       
   596                 {
       
   597                 RCmDestination dests = manager.DestinationL( destIdArray[i] );
       
   598                 CleanupClosePushL( dests );
       
   599                 if ( CMManager::TSnapPurpose( dests.MetadataL( CMManager::ESnapMetadataPurpose ) ) 
       
   600                         == CMManager::ESnapPurposeInternet )
       
   601                     {
       
   602                     BROWSER_LOG( ( _L( " Using Internet snap for connection" ) ) );
       
   603                     snapId = destIdArray[i];
       
   604                     SetDefaultSnapId(snapId);
       
   605                     }
       
   606                 CleanupStack::PopAndDestroy( 1 ); //dests
       
   607                 }
       
   608                 CleanupStack::PopAndDestroy( 2 ); //  destIdArray, manager
       
   609            }
       
   610 #else
   584    		iAllPreferences.iDefaultSnapId = GetIntValue( KBrowserNGDefaultSnapId );
   611    		iAllPreferences.iDefaultSnapId = GetIntValue( KBrowserNGDefaultSnapId );
       
   612 #endif
   585 		}
   613 		}
   586 
   614 
   587     // For Short Cut keys
   615     // For Short Cut keys
   588     if ( iAllPreferences.iShortCutFuncHomePg )
   616     if ( iAllPreferences.iShortCutFuncHomePg )
   589         {
   617         {
   961 // CBrowserPreferences::SetDefaultSnapId: DestNetChange
   989 // CBrowserPreferences::SetDefaultSnapId: DestNetChange
   962 // ----------------------------------------------------------------------------
   990 // ----------------------------------------------------------------------------
   963 //
   991 //
   964  void CBrowserPreferences::SetDefaultSnapId (TUint aSnapId)
   992  void CBrowserPreferences::SetDefaultSnapId (TUint aSnapId)
   965 		{
   993 		{
   966 
   994         LOG_ENTERFN("CBrowserPreferences::SetDefaultSnapId");
   967 		//storing the value of the default snap ID
   995         //storing the value of the default snap ID
   968 		iAllPreferences.iDefaultSnapId = aSnapId;
   996         iAllPreferences.iDefaultSnapId = aSnapId;
   969 
   997 #ifdef BRDO_OCC_ENABLED_FF
       
   998         SetIntValueL ( KBrowserOccNGDefaultSnapId, iAllPreferences.iDefaultSnapId );
       
   999         BROWSER_LOG( ( _L( " Setting OCC Snap id : %d" ), iAllPreferences.iDefaultSnapId ) );
       
  1000 #else
   970         SetIntValueL ( KBrowserNGDefaultSnapId,
  1001         SetIntValueL ( KBrowserNGDefaultSnapId,
   971                                         iAllPreferences.iDefaultSnapId );
  1002                                         iAllPreferences.iDefaultSnapId );
   972 
  1003 #endif
   973 		}
  1004 		}
   974 
  1005 
   975 
  1006 
   976 // ----------------------------------------------------------------------------
  1007 // ----------------------------------------------------------------------------
   977 // CBrowserPreferences::SetAutoLoadContentL
  1008 // CBrowserPreferences::SetAutoLoadContentL
  1899     LOG_ENTERFN("CBrowserPreferences::SetAccessPointSelectionModeL");
  1930     LOG_ENTERFN("CBrowserPreferences::SetAccessPointSelectionModeL");
  1900 
  1931 
  1901 	if ( aAccessPointSelectionMode != iAllPreferences.iAccessPointSelectionMode )
  1932 	if ( aAccessPointSelectionMode != iAllPreferences.iAccessPointSelectionMode )
  1902 		{
  1933 		{
  1903 		iAllPreferences.iAccessPointSelectionMode = aAccessPointSelectionMode;
  1934 		iAllPreferences.iAccessPointSelectionMode = aAccessPointSelectionMode;
  1904 
  1935         TUint32 cenrepKey;
       
  1936 #ifdef BRDO_OCC_ENABLED_FF
       
  1937         BROWSER_LOG( ( _L( " Setting OCC parameter " )) );
       
  1938         cenrepKey= KBrowserOccAccessPointSelectionMode;
       
  1939 #else
       
  1940         cenrepKey = KBrowserAccessPointSelectionMode;
       
  1941 #endif
  1905         switch ( aAccessPointSelectionMode )
  1942         switch ( aAccessPointSelectionMode )
  1906             {
  1943            {
  1907             case EAlwaysAsk:
  1944            case EAlwaysAsk:
  1908                 {
  1945                {
  1909                 SetIntValueL ( KBrowserAccessPointSelectionMode, EBrowserCenRepApSelModeAlwaysAsk );
  1946                SetIntValueL ( cenrepKey, EBrowserCenRepApSelModeAlwaysAsk );
  1910                 break;
  1947                break;
  1911                 }
  1948                }
  1912             case EDestination:
  1949            case EDestination:
  1913                 {
  1950                {
  1914                 SetIntValueL ( KBrowserAccessPointSelectionMode, EBrowserCenRepApSelModeDestination );
  1951                SetIntValueL ( cenrepKey, EBrowserCenRepApSelModeDestination );
  1915                 break;
  1952                break;
  1916                 }
  1953                }
  1917             case EConnectionMethod:
  1954            case EConnectionMethod:
  1918                 {
  1955                {
  1919                 SetIntValueL ( KBrowserAccessPointSelectionMode, EBrowserCenRepApSelModeUserDefined );
  1956                SetIntValueL ( cenrepKey, EBrowserCenRepApSelModeUserDefined );
  1920                 break;
  1957                break;
  1921                 }
  1958                }
  1922             default:
  1959            default:
  1923                 {
  1960                {
  1924                 SetIntValueL ( KBrowserAccessPointSelectionMode, EBrowserCenRepApSelModeAlwaysAsk );
  1961                SetIntValueL ( cenrepKey, EBrowserCenRepApSelModeAlwaysAsk );
  1925                 break;
  1962                break;
  1926                 }
  1963                }
  1927             }
  1964            }
  1928 		}
  1965        }
  1929     }
  1966     }
  1930 
  1967 
  1931 // ----------------------------------------------------------------------------
  1968 // ----------------------------------------------------------------------------
  1932 // CBrowserPreferences::SetAutomaticUpdatingApL
  1969 // CBrowserPreferences::SetAutomaticUpdatingApL
  1933 // ----------------------------------------------------------------------------
  1970 // ----------------------------------------------------------------------------